--- rpms/smeserver-mediawiki/contribs7/smeserver-mediawiki.spec 2008/04/02 15:03:57 1.2 +++ rpms/smeserver-mediawiki/contribs7/smeserver-mediawiki.spec 2008/06/02 14:34:11 1.4 @@ -1,24 +1,21 @@ -# $Id$ -# Authority: cool34000 -# Name: Sylvain Gomez - %define name smeserver-mediawiki %define version 1.6.10 -%define release 6 +%define release 8 %define rpmver 4.0.4 Summary: Mediawiki Web Application for SME Server 7.x based on Mediawiki 1.6.10 Name: %{name} Version: %{version} -Release: %{release}%{?dist} -License: GPL +Release: %{release} +License: GPL Group: /Web/Applications Source: %{name}-%{version}.tar.gz -URL: http://group-office.com/ +Patch0: smeserver-mediawiki-1.6.10-1.patch +Packager: Dietmar Berteld +URL: http://mediawiki.org/ BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot BuildArchitectures: noarch Requires: e-smith-base, e-smith-release >= 7 -BuildRequires: e-smith-devtools %description This RPM is an unofficial addon for the SME Server 7.x. @@ -29,6 +26,15 @@ After installation open your webbrowser http://your_e-smith-server_adress/wiki %changelog +* Mon May 12 2008 Dietmar Berteld> +- [1.6.10-8] Adding PwAuth-function, SME users can login with their SME passwords + Automatic creation of a few default mw_groups and list them in the + configuration file as well so admins only need to add users to the proper + groups in the server-manager + +* Thu Feb 26 2008 Dietmar Berteld> +- [1.6.10-7] Fixed httpd-settings for local access only + * Thu Oct 23 2007 Dietmar Berteld> - [1.6.10-6] Fixed automated uninstall issue for MySQL-DB and MySQL-user @@ -60,6 +66,8 @@ rm -rf $RPM_BUILD_ROOT %setup +%patch0 -p1 + %build %install @@ -122,18 +130,29 @@ esac rm -rf /opt/mediawiki-1.6.10 cp $INSTALLDIR/sme.* $HTMLDIR/skins/common/images #Prepare config settings -if [ "$UPDATE" = "0" ]; then - sed 's.mediawikipassword.'$MYSQLPASS'.g' $INSTALLDIR/LocalSettings.php > $HTMLDIR/LocalSettings.php - sed "s/mydomain/$DOMAIN/g" $HTMLDIR/LocalSettings.php > $HTMLDIR/LocalSettings2.php - case "$LANG" in +sed 's.mediawikipassword.'$MYSQLPASS'.g' $INSTALLDIR/LocalSettings.php > $HTMLDIR/LocalSettings.php +sed "s/mydomain/$DOMAIN/g" $HTMLDIR/LocalSettings.php > $HTMLDIR/LocalSettings2.php +case "$LANG" in de_DE) sed 's.$wgLanguageCode = "en";.$wgLanguageCode = "de";.g' $HTMLDIR/LocalSettings2.php > $HTMLDIR/LocalSettings.php ;; es_ES) sed 's.$wgLanguageCode = "en";.$wgLanguageCode = "es";.g' $HTMLDIR/LocalSettings2.php > $HTMLDIR/LocalSettings.php ;; fr_FR) sed 's.$wgLanguageCode = "en";.$wgLanguageCode = "fr";.g' $HTMLDIR/LocalSettings2.php > $HTMLDIR/LocalSettings.php ;; it_IT) sed 's.$wgLanguageCode = "en";.$wgLanguageCode = "it";.g' $HTMLDIR/LocalSettings2.php > $HTMLDIR/LocalSettings.php ;; *) sed 's.$wgLanguageCode = "en";.$wgLanguageCode = "en";.g' $HTMLDIR/LocalSettings2.php > $HTMLDIR/LocalSettings.php ;; - esac - rm $HTMLDIR/LocalSettings2.php -fi +esac +rm $HTMLDIR/LocalSettings2.php +cp $INSTALLDIR/PwAuthPlugin.php $HTMLDIR/extensions/PwAuthPlugin.php +#Creating SME-Groups for MediaWiki (disabled) +#/sbin/e-smith/db accounts set mw_read group +#/sbin/e-smith/db accounts setprop mw_read Description "MediaWiki Read" +#/sbin/e-smith/db accounts set mw_edit group +#/sbin/e-smith/db accounts setprop mw_edit Description "MediaWiki Edit" +#/sbin/e-smith/db accounts set mw_createpage group +#/sbin/e-smith/db accounts setprop mw_createpage Description "MediaWiki Create Page" +#/sbin/e-smith/db accounts set mw_createtalk group +#/sbin/e-smith/db accounts setprop mw_createtalk Description "MediaWiki Create Talk" +#/sbin/e-smith/signal-event group-create +#Changing some rights +chmod 644 $HTMLDIR/extensions/PwAuthPlugin.php chown -R root:root $HTMLDIR chown root:www $HTMLDIR/images chown root:www $HTMLDIR/LocalSettings.php @@ -158,6 +177,9 @@ esac # Rebuilding Wiki language menus php $HTMLDIR/maintenance/rebuildMessages.php --rebuild echo "Applying modifications to services..." +# Uncomment the PwAuth-function +sed 's.#!..g' $HTMLDIR/LocalSettings.php > $HTMLDIR/LocalSettings2.php +mv $HTMLDIR/LocalSettings2.php $HTMLDIR/LocalSettings.php /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf /usr/local/bin/svc -h /service/httpd-e-smith echo "-------------------------------------------------------------------------------" @@ -167,20 +189,20 @@ case $UPDATE in echo "Reminder:" echo "- Website open globally" echo "- go to http://$DOMAIN/$URL" - echo "- Username : admin" - echo "- Password : admin" - echo "- Please change admin password" + echo "- Usernames are identical with SME users" + echo "- Passwords are identical with SME passwords" + echo "- MediaWiki admin = SME admin" ;; *) - echo "GroupOffice update completed." + echo "$APP update completed." echo "Reminder:" echo "- The old install was backed up and can be found in /opt/MW_RPM_BACKUP" echo " PLEASE MOVE THIS DIRECTORY TO A SAFE PLACE!!!" echo "- Website open globally" echo "- go to http://$DOMAIN/$URL" - echo "- Username : admin" - echo "- Password : admin" - echo "- Please change admin password" + echo "- Usernames are identical with SME users" + echo "- Passwords are identical with SME passwords" + echo "- MediaWiki admin = SME admin" ;; esac echo "-------------------------------------------------------------------------------"