/[smecontribs]/rpms/smeserver-mediawiki/contribs10/smeserver-mediawiki.spec
ViewVC logotype

Diff of /rpms/smeserver-mediawiki/contribs10/smeserver-mediawiki.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.10 by brianr, Fri Jun 3 09:35:35 2022 UTC Revision 1.14 by brianr, Tue Jul 12 15:13:30 2022 UTC
# Line 1  Line 1 
1  # $Id: smeserver-mediawiki.spec,v 1.9 2022/06/01 13:28:34 brianr Exp $  # $Id: smeserver-mediawiki.spec,v 1.13 2022/07/12 11:47:01 brianr Exp $
2  # Authority: ber_die  # Authority: ber_die
3  # Name: Dietmar Berteld  # Name: Dietmar Berteld
4    
5  %define name smeserver-mediawiki  %define name smeserver-mediawiki
6  %define version 1.38.0  %define version 1.38.2
7  %define release 1  %define release 1
8    
9  Summary:       Mediawiki Web Application for SME Server 7.x based on Mediawiki 1.38.0  Summary:       Mediawiki Web Application for SME Server 7.x based on Mediawiki 1.38.0
# Line 13  Release:       %{release}%{?dist} Line 13  Release:       %{release}%{?dist}
13  License:       GPL  License:       GPL
14  Group:         /Web/Applications  Group:         /Web/Applications
15  Source:        %{name}-%{version}.tar.gz  Source:        %{name}-%{version}.tar.gz
16    
17    #Patch0:        smeserver-mediawiki-1.38.1-Fix-sql-create.patch
18  #Patch0:        smeserver-mediawiki-1.37.2-Fix-up-password-generation-and-localsettings.patch  #Patch0:        smeserver-mediawiki-1.37.2-Fix-up-password-generation-and-localsettings.patch
19  #Patch1:        smeserver-mediawiki-1.6.10-Update-to-SME10.patch  #Patch1:        smeserver-mediawiki-1.6.10-Update-to-SME10.patch
20    
# Line 31  After installation open your webbrowser Line 33  After installation open your webbrowser
33  http://your_e-smith-server_adress/wiki  http://your_e-smith-server_adress/wiki
34    
35  %changelog  %changelog
36    * Tue Jul 12 2022 Brian Read <brianr@bjsystems.co.uk> 1.38.2-1.sme
37    - Update version to Mediawiki-1.38.2 [sme: 11987]
38    - Fix initial admin user
39    
40    * Thu Jun 09 2022 Brian Read <brianr@bjsystems.co.uk> 1.38.1-2.sme
41    - fix sql user create [SME: 11987]
42    
43    * Wed Jun 08 2022 Brian Read <brianr@bjsystems.co.uk> 1.38.0-2.sme
44    - Update version to Mediawiki-1.38.1 [sme: 11987]
45    
46    * Fri Jun 03 2022 Brian Read <brianr@bjsystems.co.uk> 1.38.0-2.sme
47    - update sql create [SME: 11987]
48    
49  * Fri Jun 03 2022 Brian Read <brianr@bjsystems.co.uk> 1.38.0-1.sme  * Fri Jun 03 2022 Brian Read <brianr@bjsystems.co.uk> 1.38.0-1.sme
50  - Rollup tar file to include mediawiki 1.38.0  [SME: 11987]  - Rollup tar file to include mediawiki 1.38.0  [SME: 11987]
51    
# Line 97  rm -rf $RPM_BUILD_ROOT Line 112  rm -rf $RPM_BUILD_ROOT
112  #%patch1 -p1  #%patch1 -p1
113    
114  %build  %build
115    perl createlinks
116    
117  %install  %install
118  rm -rf $RPM_BUILD_ROOT  rm -rf $RPM_BUILD_ROOT
# Line 134  esac Line 150  esac
150  APP=MediaWiki  APP=MediaWiki
151  URL=wiki  URL=wiki
152  WORKDIR=/root  WORKDIR=/root
153  MEDIAWIKIVERSION='1.38.0'  MEDIAWIKIVERSION='1.38.2'
154  INSTALLDIR=/usr/share/doc/mediawiki-$MEDIAWIKIVERSION/Sources  INSTALLDIR=/usr/share/doc/mediawiki-$MEDIAWIKIVERSION/Sources
155  HTMLDIR=/opt/mediawiki  HTMLDIR=/opt/mediawiki
156  MYSQLDB=mediawiki  MYSQLDB=mediawiki
# Line 151  rm -rf lang* Line 167  rm -rf lang*
167  #Untar application  #Untar application
168  echo "Decompressing files..."  echo "Decompressing files..."
169  mkdir -p $HTMLDIR  mkdir -p $HTMLDIR
170  tar xzf $INSTALLDIR/mediawiki-1.37.2.tar.gz -C /opt  tar xzf $INSTALLDIR/mediawiki-$MEDIAWIKIVERSION.tar.gz -C /opt
171  case $UPDATE in  case $UPDATE in
172     0) mv -f /opt/mediawiki-$MEDIAWIKIVERSION/* $HTMLDIR ;;     0) mv -f /opt/mediawiki-$MEDIAWIKIVERSION/* $HTMLDIR ;;
173     *) cp -ufR /opt/mediawiki-$MEDIAWIKIVERSION/* $HTMLDIR --reply=yes ;;     *) cp -ufR /opt/mediawiki-$MEDIAWIKIVERSION/* $HTMLDIR ;;
174  esac  esac
175  rm -rf /opt/mediawiki-$MEDIAWIKIVERSION  rm -rf /opt/mediawiki-$MEDIAWIKIVERSION
176  cp $INSTALLDIR/sme.* $HTMLDIR/skins/common/images  cp $INSTALLDIR/sme.* $HTMLDIR/skins/common/images
177  #Prepare config settings  #Prepare config settings
178  sed 's.mediawikipassword.'$MYSQLPASS'.g' $INSTALLDIR/LocalSettings.php > $HTMLDIR/LocalSettings.php  sed 's.mediawikipassword.'$MYSQLPASS'.g' $INSTALLDIR/LocalSettings.php > $HTMLDIR/LocalSettings.php
179  sed "s/mydomain/$DOMAIN/g" $HTMLDIR/LocalSettings.php > $HTMLDIR/LocalSettings2.php  sed "s/mydomain/$DOMAIN/g" $HTMLDIR/LocalSettings.php > $HTMLDIR/LocalSettings1.php
180    sed "s/myhost/$SRVNAME/g" $HTMLDIR/LocalSettings1.php > $HTMLDIR/LocalSettings2.php
181  case "$LANG" in  case "$LANG" in
182          de_DE) sed 's.$wgLanguageCode = "en";.$wgLanguageCode = "de";.g' $HTMLDIR/LocalSettings2.php > $HTMLDIR/LocalSettings.php ;;          de_DE) sed 's.$wgLanguageCode = "en";.$wgLanguageCode = "de";.g' $HTMLDIR/LocalSettings2.php > $HTMLDIR/LocalSettings.php ;;
183          es_ES) sed 's.$wgLanguageCode = "en";.$wgLanguageCode = "es";.g' $HTMLDIR/LocalSettings2.php > $HTMLDIR/LocalSettings.php ;;          es_ES) sed 's.$wgLanguageCode = "en";.$wgLanguageCode = "es";.g' $HTMLDIR/LocalSettings2.php > $HTMLDIR/LocalSettings.php ;;
# Line 168  case "$LANG" in Line 185  case "$LANG" in
185          it_IT) sed 's.$wgLanguageCode = "en";.$wgLanguageCode = "it";.g' $HTMLDIR/LocalSettings2.php > $HTMLDIR/LocalSettings.php ;;          it_IT) sed 's.$wgLanguageCode = "en";.$wgLanguageCode = "it";.g' $HTMLDIR/LocalSettings2.php > $HTMLDIR/LocalSettings.php ;;
186              *) sed 's.$wgLanguageCode = "en";.$wgLanguageCode = "en";.g' $HTMLDIR/LocalSettings2.php > $HTMLDIR/LocalSettings.php ;;              *) sed 's.$wgLanguageCode = "en";.$wgLanguageCode = "en";.g' $HTMLDIR/LocalSettings2.php > $HTMLDIR/LocalSettings.php ;;
187  esac  esac
188    rm $HTMLDIR/LocalSettings1.php
189  rm $HTMLDIR/LocalSettings2.php  rm $HTMLDIR/LocalSettings2.php
190  cp $INSTALLDIR/PwAuthPlugin.php $HTMLDIR/extensions/PwAuthPlugin.php  #cp $INSTALLDIR/PwAuthPlugin.php $HTMLDIR/extensions/PwAuthPlugin.php
191  #Creating SME-Groups for MediaWiki (disabled)  #Creating SME-Groups for MediaWiki (disabled)
192  #/sbin/e-smith/db accounts set mw_read group  #/sbin/e-smith/db accounts set mw_read group
193  #/sbin/e-smith/db accounts setprop mw_read Description "MediaWiki Read"  #/sbin/e-smith/db accounts setprop mw_read Description "MediaWiki Read"
# Line 194  case $UPDATE in Line 212  case $UPDATE in
212      echo "Creating MySQL User and DataBase..."      echo "Creating MySQL User and DataBase..."
213      mysqladmin -u root create $MYSQLDB      mysqladmin -u root create $MYSQLDB
214      mysql $MYSQLDB < $INSTALLDIR/$MYSQLDB.sql      mysql $MYSQLDB < $INSTALLDIR/$MYSQLDB.sql
215        mysql $MYSQLDB -e "UPDATE user SET user_password = MD5( CONCAT( user_id, '-', MD5( 'mediawikiadmin' ) ) ) WHERE user_id =1 "
216      mysql -u root -e "SET PASSWORD FOR $MYSQLUSER@localhost = PASSWORD( '$MYSQLPASS' ) "      mysql -u root -e "SET PASSWORD FOR $MYSQLUSER@localhost = PASSWORD( '$MYSQLPASS' ) "
217      mysqladmin flush-privileges      mysqladmin flush-privileges
218      ;;      ;;
# Line 204  case $UPDATE in Line 223  case $UPDATE in
223      ;;      ;;
224  esac  esac
225  # Rebuilding Wiki language menus  # Rebuilding Wiki language menus
226  php $HTMLDIR/maintenance/rebuildMessages.php --rebuild  #php $HTMLDIR/maintenance/rebuildMessages.php --rebuild
227  echo "Applying modifications to services..."  #echo "Applying modifications to services..."
228  # Uncomment the PwAuth-function  # Uncomment the PwAuth-function
229  sed 's.#!..g' $HTMLDIR/LocalSettings.php > $HTMLDIR/LocalSettings2.php  sed 's.#!..g' $HTMLDIR/LocalSettings.php > $HTMLDIR/LocalSettings2.php
230  mv $HTMLDIR/LocalSettings2.php $HTMLDIR/LocalSettings.php  mv $HTMLDIR/LocalSettings2.php $HTMLDIR/LocalSettings.php
231  /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf  #Handled in the -update event
232  systemctl restart httpd-e-smith.service  #/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
233    #systemctl restart httpd-e-smith.service
234  echo "-------------------------------------------------------------------------------"  echo "-------------------------------------------------------------------------------"
235  case $UPDATE in  case $UPDATE in
236    0)    0)
# Line 247  echo "For more details, see http://wiki. Line 267  echo "For more details, see http://wiki.
267  echo "-------------------------------------------------------------------------------"  echo "-------------------------------------------------------------------------------"
268    
269  %preun  %preun
270    MEDIAWIKIVERSION='1.38.2'
271  INSTALLDIR=/usr/share/doc/mediawiki-$MEDIAWIKIVERSION/Sources  INSTALLDIR=/usr/share/doc/mediawiki-$MEDIAWIKIVERSION/Sources
272  if [ $1 = 0 ] ; then  if [ $1 = 0 ] ; then
273    mv $INSTALLDIR/DO_NOT_USE_OR_DELETE/MW-Full-Uninstall.sh /root/    mv $INSTALLDIR/DO_NOT_USE_OR_DELETE/MW-Full-Uninstall.sh /root/


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed