/[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.2 by brianr, Wed Jun 1 09:14:52 2022 UTC Revision 1.16 by jpp, Tue Aug 2 05:43:47 2022 UTC
# Line 1  Line 1 
1  # $Id: smeserver-mediawiki.spec,v 1.1 2022/05/31 02:55:04 jpp Exp $  # $Id: smeserver-mediawiki.spec,v 1.15 2022/07/12 15:37:07 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.6.10  %define version 1.38.2
7  %define release 10  %define release 2
8    
9  Summary:       Mediawiki Web Application for SME Server 7.x based on Mediawiki 1.37.2  Summary:       Mediawiki Web Application for SME Server 7.x based on Mediawiki 1.38.0
10  Name:          %{name}  Name:          %{name}
11  Version:       %{version}  Version:       %{version}
12  Release:       %{release}%{?dist}  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  Patch0:        smeserver-mediawiki-1.6.10-1.patch  
17  Patch1:        smeserver-mediawiki-1.6.10-Update-to-SME10.patch  Patch0:         smeserver-mediawiki-1.38.2-bz12133-httpd24.patch
18    
19  URL:           http://mediawiki.org/  URL:           http://mediawiki.org/
20  BuildRoot:     /var/tmp/%{name}-%{version}-%{release}-buildroot  BuildRoot:     /var/tmp/%{name}-%{version}-%{release}-buildroot
21  BuildArch:     noarch  BuildArch:     noarch
22  Requires:      e-smith-base, e-smith-release >= 7  Requires:      e-smith-base, e-smith-release >= 10
23  BuildRequires: e-smith-devtools  BuildRequires: e-smith-devtools
24    
25  %description  %description
26  This RPM is an unofficial addon for the SME Server 7.x.  This RPM is an addon for the SME Server v10
27  The target audience is the Linux/E-smith administrator  The target audience is the Linux/E-smith administrator
28  who wants to add Wikipedia-SW.  who wants to add Wikipedia-SW.
29  Mediawiki is a very popular Wiki and is used by the wikipedia-project.  Mediawiki is a very popular Wiki and is used by the wikipedia-project.
# Line 31  After installation open your webbrowser Line 31  After installation open your webbrowser
31  http://your_e-smith-server_adress/wiki  http://your_e-smith-server_adress/wiki
32    
33  %changelog  %changelog
34  * Tue May 31 2022 Brian Read <brianr@bjsystems.co.uk> 1.6.10-10.sme  * Tue Aug 02 2022 Jean-Philippe Pialasse <tests@pialasse.com> 1.38.2-2.sme
35    - update to httpd 2.4 access syntax [SME: 12133]
36    
37    * Tue Jul 12 2022 Brian Read <brianr@bjsystems.co.uk> 1.38.2-1.sme
38    - Update version to Mediawiki-1.38.2 [sme: 11987]
39    - Fix initial admin user password
40    
41    * Thu Jun 09 2022 Brian Read <brianr@bjsystems.co.uk> 1.38.1-2.sme
42    - fix sql user create [SME: 11987]
43    
44    * Wed Jun 08 2022 Brian Read <brianr@bjsystems.co.uk> 1.38.0-2.sme
45    - Update version to Mediawiki-1.38.1 [sme: 11987]
46    
47    * Fri Jun 03 2022 Brian Read <brianr@bjsystems.co.uk> 1.38.0-2.sme
48    - update sql create [SME: 11987]
49    
50    * Fri Jun 03 2022 Brian Read <brianr@bjsystems.co.uk> 1.38.0-1.sme
51    - Rollup tar file to include mediawiki 1.38.0  [SME: 11987]
52    
53    * Wed Jun 01 2022 Brian Read <brianr@bjsystems.co.uk> 1.37.2-3.sme
54    - Fix-up-password-generation-and-localsettings  [SME: 11987]
55    
56    * Wed Jun 01 2022 BogusDateBot
57    - Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday,
58      by assuming the date is correct and changing the weekday.
59      Thu Oct 23 2007 --> Thu Oct 18 2007 or Tue Oct 23 2007 or Thu Oct 25 2007 or ....
60      Thu Feb 26 2008 --> Thu Feb 21 2008 or Tue Feb 26 2008 or Thu Feb 28 2008 or ....
61    
62    * Tue May 31 2022 Brian Read <brianr@bjsystems.co.uk> 1.6.10-10 sme
63  - Update to SME10 [SME:11987]  - Update to SME10 [SME:11987]
64  - Add php-fpm stuff to httpd.conf  - Add php-fpm stuff to httpd.conf
65  - Add in createlinks  - Update to mw 1.37.2
66    
67  * Mon May 12 2008 Dietmar Berteld> 1.6.10-9  * Mon May 12 2008 Dietmar Berteld> 1.6.10-9
68  - Disabing automatic creation of SME groups. No idea to synchronise them to mediawiki groups.  - Disabing automatic creation of SME groups. No idea to synchronise them to mediawiki groups.
# Line 45  http://your_e-smith-server_adress/wiki Line 73  http://your_e-smith-server_adress/wiki
73    configuration file as well so admins only need to add users to the proper    configuration file as well so admins only need to add users to the proper
74    groups in the server-manager    groups in the server-manager
75    
76  * Thu Feb 26 2008 Dietmar Berteld>  * Tue Feb 26 2008 Dietmar Berteld>
77      Thu Feb 26 2008 --> Thu Feb 21 2008 or Tue Feb 26 2008 or Thu Feb 28 2008 or ....
78  - [1.6.10-7] Fixed httpd-settings for local access only  - [1.6.10-7] Fixed httpd-settings for local access only
79    
80  * Thu Oct 23 2007 Dietmar Berteld>  * Tue Oct 23 2007 Dietmar Berteld>
81      Thu Oct 23 2007 --> Thu Oct 18 2007 or Tue Oct 23 2007 or Thu Oct 25 2007 or ....
82  - [1.6.10-6] Fixed automated uninstall issue for MySQL-DB and MySQL-user  - [1.6.10-6] Fixed automated uninstall issue for MySQL-DB and MySQL-user
83    
84  * Fri Oct 19 2007 Dietmar Berteld>  * Fri Oct 19 2007 Dietmar Berteld>
# Line 80  rm -rf $RPM_BUILD_ROOT Line 110  rm -rf $RPM_BUILD_ROOT
110  %setup  %setup
111    
112  %patch0 -p1  %patch0 -p1
113  %patch1 -p1  #%patch1 -p1
114    
115  %build  %build
116    perl createlinks
117    
118  %install  %install
119  rm -rf $RPM_BUILD_ROOT  rm -rf $RPM_BUILD_ROOT
# Line 120  esac Line 151  esac
151  APP=MediaWiki  APP=MediaWiki
152  URL=wiki  URL=wiki
153  WORKDIR=/root  WORKDIR=/root
154  INSTALLDIR=/usr/share/doc/mediawiki-1.6.10/Sources  MEDIAWIKIVERSION='1.38.2'
155    INSTALLDIR=/usr/share/doc/mediawiki-$MEDIAWIKIVERSION/Sources
156  HTMLDIR=/opt/mediawiki  HTMLDIR=/opt/mediawiki
157  MYSQLDB=mediawiki  MYSQLDB=mediawiki
158  MYSQLUSER=mediawikiuser  MYSQLUSER=mediawikiuser
# Line 136  rm -rf lang* Line 168  rm -rf lang*
168  #Untar application  #Untar application
169  echo "Decompressing files..."  echo "Decompressing files..."
170  mkdir -p $HTMLDIR  mkdir -p $HTMLDIR
171  tar xzf $INSTALLDIR/mediawiki-1.37.2.tar.gz -C /opt  tar xzf $INSTALLDIR/mediawiki-$MEDIAWIKIVERSION.tar.gz -C /opt
172  case $UPDATE in  case $UPDATE in
173     0) mv -f /opt/mediawiki-1.37.2/* $HTMLDIR ;;     0) mv -f /opt/mediawiki-$MEDIAWIKIVERSION/* $HTMLDIR ;;
174     *) cp -ufR /opt/mediawiki-1.37.2/* $HTMLDIR --reply=yes ;;     *) cp -ufR /opt/mediawiki-$MEDIAWIKIVERSION/* $HTMLDIR ;;
175  esac  esac
176  rm -rf /opt/mediawiki-1.37.2  rm -rf /opt/mediawiki-$MEDIAWIKIVERSION
177  cp $INSTALLDIR/sme.* $HTMLDIR/skins/common/images  cp $INSTALLDIR/sme.* $HTMLDIR/skins/common/images
178  #Prepare config settings  #Prepare config settings
179  sed 's.mediawikipassword.'$MYSQLPASS'.g' $INSTALLDIR/LocalSettings.php > $HTMLDIR/LocalSettings.php  sed 's.mediawikipassword.'$MYSQLPASS'.g' $INSTALLDIR/LocalSettings.php > $HTMLDIR/LocalSettings.php
180  sed "s/mydomain/$DOMAIN/g" $HTMLDIR/LocalSettings.php > $HTMLDIR/LocalSettings2.php  sed "s/mydomain/$DOMAIN/g" $HTMLDIR/LocalSettings.php > $HTMLDIR/LocalSettings1.php
181    sed "s/myhost/$SRVNAME/g" $HTMLDIR/LocalSettings1.php > $HTMLDIR/LocalSettings2.php
182  case "$LANG" in  case "$LANG" in
183          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 ;;
184          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 153  case "$LANG" in Line 186  case "$LANG" in
186          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 ;;
187              *) 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 ;;
188  esac  esac
189    rm $HTMLDIR/LocalSettings1.php
190  rm $HTMLDIR/LocalSettings2.php  rm $HTMLDIR/LocalSettings2.php
191  cp $INSTALLDIR/PwAuthPlugin.php $HTMLDIR/extensions/PwAuthPlugin.php  #cp $INSTALLDIR/PwAuthPlugin.php $HTMLDIR/extensions/PwAuthPlugin.php
192  #Creating SME-Groups for MediaWiki (disabled)  #Creating SME-Groups for MediaWiki (disabled)
193  #/sbin/e-smith/db accounts set mw_read group  #/sbin/e-smith/db accounts set mw_read group
194  #/sbin/e-smith/db accounts setprop mw_read Description "MediaWiki Read"  #/sbin/e-smith/db accounts setprop mw_read Description "MediaWiki Read"
# Line 178  case $UPDATE in Line 212  case $UPDATE in
212    0)    0)
213      echo "Creating MySQL User and DataBase..."      echo "Creating MySQL User and DataBase..."
214      mysqladmin -u root create $MYSQLDB      mysqladmin -u root create $MYSQLDB
215      #mysql $MYSQLDB < $INSTALLDIR/$MYSQLDB.sql      mysql $MYSQLDB < $INSTALLDIR/$MYSQLDB.sql
216        mysql $MYSQLDB -e "UPDATE user SET user_password = MD5( CONCAT( user_id, '-', MD5( 'mediawikiadmin' ) ) ) WHERE user_id =1 "
217      mysql -u root -e "SET PASSWORD FOR $MYSQLUSER@localhost = PASSWORD( '$MYSQLPASS' ) "      mysql -u root -e "SET PASSWORD FOR $MYSQLUSER@localhost = PASSWORD( '$MYSQLPASS' ) "
218      mysqladmin flush-privileges      mysqladmin flush-privileges
219      ;;      ;;
# Line 189  case $UPDATE in Line 224  case $UPDATE in
224      ;;      ;;
225  esac  esac
226  # Rebuilding Wiki language menus  # Rebuilding Wiki language menus
227  php $HTMLDIR/maintenance/rebuildMessages.php --rebuild  #php $HTMLDIR/maintenance/rebuildMessages.php --rebuild
228  echo "Applying modifications to services..."  #echo "Applying modifications to services..."
229  # Uncomment the PwAuth-function  # Uncomment the PwAuth-function
230  sed 's.#!..g' $HTMLDIR/LocalSettings.php > $HTMLDIR/LocalSettings2.php  sed 's.#!..g' $HTMLDIR/LocalSettings.php > $HTMLDIR/LocalSettings2.php
231  mv $HTMLDIR/LocalSettings2.php $HTMLDIR/LocalSettings.php  mv $HTMLDIR/LocalSettings2.php $HTMLDIR/LocalSettings.php
232  /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf  #Handled in the -update event
233  /usr/local/bin/svc -h /service/httpd-e-smith  #/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
234    #systemctl restart httpd-e-smith.service
235  echo "-------------------------------------------------------------------------------"  echo "-------------------------------------------------------------------------------"
236  case $UPDATE in  case $UPDATE in
237    0)    0)
# Line 226  echo "    # config setprop $MYSQLDB Publ Line 262  echo "    # config setprop $MYSQLDB Publ
262  echo " "  echo " "
263  echo "Don't forget to apply modifications with following commands:"  echo "Don't forget to apply modifications with following commands:"
264  echo "    # expand-template /etc/httpd/conf/httpd.conf"  echo "    # expand-template /etc/httpd/conf/httpd.conf"
265  echo "    # svc -h /service/httpd-e-smith"  echo "    # systemctl restart httpd-e-smith.service"
266  echo " "  echo " "
267  echo "For more details, see http://wiki.contribs.org/Mediawiki"  echo "For more details, see http://wiki.contribs.org/Mediawiki"
268  echo "-------------------------------------------------------------------------------"  echo "-------------------------------------------------------------------------------"
269    
270  %preun  %preun
271  INSTALLDIR=/usr/share/doc/mediawiki-1.6.10/Sources  MEDIAWIKIVERSION='1.38.2'
272    INSTALLDIR=/usr/share/doc/mediawiki-$MEDIAWIKIVERSION/Sources
273  if [ $1 = 0 ] ; then  if [ $1 = 0 ] ; then
274    mv $INSTALLDIR/DO_NOT_USE_OR_DELETE/MW-Full-Uninstall.sh /root/    mv $INSTALLDIR/DO_NOT_USE_OR_DELETE/MW-Full-Uninstall.sh /root/
275  fi  fi


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