/[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.20 by brianr, Thu Dec 1 15:14:03 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.19 2022/12/01 15:06:30 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.39.0
7  %define release 10  %define release 1
8    
9  Summary:       Mediawiki Web Application for SME Server 7.x based on Mediawiki 1.37.2  Summary:       Mediawiki Web Application for SME Server 10.x based on Mediawiki 1.39.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    #Patch1:        smeserver-mediawiki-1.38.2-bz12134-backup.patch
19    
20  URL:           http://mediawiki.org/  URL:           http://mediawiki.org/
21  BuildRoot:     /var/tmp/%{name}-%{version}-%{release}-buildroot  BuildRoot:     /var/tmp/%{name}-%{version}-%{release}-buildroot
22  BuildArch:     noarch  BuildArch:     noarch
23  Requires:      e-smith-base, e-smith-release >= 7  Requires:      e-smith-base, e-smith-release >= 10
24    Requires:      e-smith-apache >= 2.6.0-19
25    Requires:      smeserver-php >= 3.0.0-43
26  BuildRequires: e-smith-devtools  BuildRequires: e-smith-devtools
27    
28  %description  %description
29  This RPM is an unofficial addon for the SME Server 7.x.  This RPM is an addon for the SME Server v10
30  The target audience is the Linux/E-smith administrator  The target audience is the Linux/E-smith administrator
31  who wants to add Wikipedia-SW.  who wants to add Wikipedia-SW.
32  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 34  After installation open your webbrowser
34  http://your_e-smith-server_adress/wiki  http://your_e-smith-server_adress/wiki
35    
36  %changelog  %changelog
37  * Tue May 31 2022 Brian Read <brianr@bjsystems.co.uk> 1.6.10-10.sme  
38    * Thu Dec 01 2022 Brian Read <brianr@bjsystems.co.uk> 1.39.0-1.sme
39    - Update to LTS version 1.39.0 (Supported until dec 2025)[SME: 12250]
40    
41    * Tue Aug 02 2022 Jean-Philippe Pialasse <tests@pialasse.com> 1.38.2-2.sme
42    - update to httpd 2.4 access syntax [SME: 12133]
43    - add to core backup [SME: 12134]
44    
45    * Tue Jul 12 2022 Brian Read <brianr@bjsystems.co.uk> 1.38.2-1.sme
46    - Update version to Mediawiki-1.38.2 [sme: 11987]
47    - Fix initial admin user password
48    
49    * Thu Jun 09 2022 Brian Read <brianr@bjsystems.co.uk> 1.38.1-2.sme
50    - fix sql user create [SME: 11987]
51    
52    * Wed Jun 08 2022 Brian Read <brianr@bjsystems.co.uk> 1.38.0-2.sme
53    - Update version to Mediawiki-1.38.1 [sme: 11987]
54    
55    * Fri Jun 03 2022 Brian Read <brianr@bjsystems.co.uk> 1.38.0-2.sme
56    - update sql create [SME: 11987]
57    
58    * Fri Jun 03 2022 Brian Read <brianr@bjsystems.co.uk> 1.38.0-1.sme
59    - Rollup tar file to include mediawiki 1.38.0  [SME: 11987]
60    
61    * Wed Jun 01 2022 Brian Read <brianr@bjsystems.co.uk> 1.37.2-3.sme
62    - Fix-up-password-generation-and-localsettings  [SME: 11987]
63    
64    * Wed Jun 01 2022 BogusDateBot
65    - Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday,
66      by assuming the date is correct and changing the weekday.
67      Thu Oct 23 2007 --> Thu Oct 18 2007 or Tue Oct 23 2007 or Thu Oct 25 2007 or ....
68      Thu Feb 26 2008 --> Thu Feb 21 2008 or Tue Feb 26 2008 or Thu Feb 28 2008 or ....
69    
70    * Tue May 31 2022 Brian Read <brianr@bjsystems.co.uk> 1.6.10-10 sme
71  - Update to SME10 [SME:11987]  - Update to SME10 [SME:11987]
72  - Add php-fpm stuff to httpd.conf  - Add php-fpm stuff to httpd.conf
73  - Add in createlinks  - Update to mw 1.37.2
74    
75  * Mon May 12 2008 Dietmar Berteld> 1.6.10-9  * Mon May 12 2008 Dietmar Berteld> 1.6.10-9
76  - 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 81  http://your_e-smith-server_adress/wiki
81    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
82    groups in the server-manager    groups in the server-manager
83    
84  * Thu Feb 26 2008 Dietmar Berteld>  * Tue Feb 26 2008 Dietmar Berteld>
85      Thu Feb 26 2008 --> Thu Feb 21 2008 or Tue Feb 26 2008 or Thu Feb 28 2008 or ....
86  - [1.6.10-7] Fixed httpd-settings for local access only  - [1.6.10-7] Fixed httpd-settings for local access only
87    
88  * Thu Oct 23 2007 Dietmar Berteld>  * Tue Oct 23 2007 Dietmar Berteld>
89      Thu Oct 23 2007 --> Thu Oct 18 2007 or Tue Oct 23 2007 or Thu Oct 25 2007 or ....
90  - [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
91    
92  * Fri Oct 19 2007 Dietmar Berteld>  * Fri Oct 19 2007 Dietmar Berteld>
# Line 79  rm -rf $RPM_BUILD_ROOT Line 117  rm -rf $RPM_BUILD_ROOT
117    
118  %setup  %setup
119    
120  %patch0 -p1  #%patch0 -p1
121  %patch1 -p1  #%patch1 -p1
122    
123  %build  %build
124    perl createlinks
125    
126  %install  %install
127  rm -rf $RPM_BUILD_ROOT  rm -rf $RPM_BUILD_ROOT
# Line 120  esac Line 159  esac
159  APP=MediaWiki  APP=MediaWiki
160  URL=wiki  URL=wiki
161  WORKDIR=/root  WORKDIR=/root
162  INSTALLDIR=/usr/share/doc/mediawiki-1.6.10/Sources  MEDIAWIKIVERSION='1.39.0'
163    INSTALLDIR=/usr/share/doc/mediawiki-$MEDIAWIKIVERSION/Sources
164  HTMLDIR=/opt/mediawiki  HTMLDIR=/opt/mediawiki
165  MYSQLDB=mediawiki  MYSQLDB=mediawiki
166  MYSQLUSER=mediawikiuser  MYSQLUSER=mediawikiuser
# Line 136  rm -rf lang* Line 176  rm -rf lang*
176  #Untar application  #Untar application
177  echo "Decompressing files..."  echo "Decompressing files..."
178  mkdir -p $HTMLDIR  mkdir -p $HTMLDIR
179  tar xzf $INSTALLDIR/mediawiki-1.37.2.tar.gz -C /opt  tar xzf $INSTALLDIR/mediawiki-$MEDIAWIKIVERSION.tar.gz -C /opt
180  case $UPDATE in  case $UPDATE in
181     0) mv -f /opt/mediawiki-1.37.2/* $HTMLDIR ;;     0) mv -f /opt/mediawiki-$MEDIAWIKIVERSION/* $HTMLDIR ;;
182     *) cp -ufR /opt/mediawiki-1.37.2/* $HTMLDIR --reply=yes ;;     *) cp -ufR /opt/mediawiki-$MEDIAWIKIVERSION/* $HTMLDIR ;;
183  esac  esac
184  rm -rf /opt/mediawiki-1.37.2  rm -rf /opt/mediawiki-$MEDIAWIKIVERSION
185  cp $INSTALLDIR/sme.* $HTMLDIR/skins/common/images  cp $INSTALLDIR/sme.* $HTMLDIR/skins/common/images
186  #Prepare config settings  #Prepare config settings
187  sed 's.mediawikipassword.'$MYSQLPASS'.g' $INSTALLDIR/LocalSettings.php > $HTMLDIR/LocalSettings.php  sed 's.mediawikipassword.'$MYSQLPASS'.g' $INSTALLDIR/LocalSettings.php > $HTMLDIR/LocalSettings.php
188  sed "s/mydomain/$DOMAIN/g" $HTMLDIR/LocalSettings.php > $HTMLDIR/LocalSettings2.php  sed "s/mydomain/$DOMAIN/g" $HTMLDIR/LocalSettings.php > $HTMLDIR/LocalSettings1.php
189    sed "s/myhost/$SRVNAME/g" $HTMLDIR/LocalSettings1.php > $HTMLDIR/LocalSettings2.php
190  case "$LANG" in  case "$LANG" in
191          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 ;;
192          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 194  case "$LANG" in
194          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 ;;
195              *) 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 ;;
196  esac  esac
197    rm $HTMLDIR/LocalSettings1.php
198  rm $HTMLDIR/LocalSettings2.php  rm $HTMLDIR/LocalSettings2.php
199  cp $INSTALLDIR/PwAuthPlugin.php $HTMLDIR/extensions/PwAuthPlugin.php  #cp $INSTALLDIR/PwAuthPlugin.php $HTMLDIR/extensions/PwAuthPlugin.php
200  #Creating SME-Groups for MediaWiki (disabled)  #Creating SME-Groups for MediaWiki (disabled)
201  #/sbin/e-smith/db accounts set mw_read group  #/sbin/e-smith/db accounts set mw_read group
202  #/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 220  case $UPDATE in
220    0)    0)
221      echo "Creating MySQL User and DataBase..."      echo "Creating MySQL User and DataBase..."
222      mysqladmin -u root create $MYSQLDB      mysqladmin -u root create $MYSQLDB
223      #mysql $MYSQLDB < $INSTALLDIR/$MYSQLDB.sql      mysql $MYSQLDB < $INSTALLDIR/$MYSQLDB.sql
224        mysql $MYSQLDB -e "UPDATE user SET user_password = MD5( CONCAT( user_id, '-', MD5( 'mediawikiadmin' ) ) ) WHERE user_id =1 "
225      mysql -u root -e "SET PASSWORD FOR $MYSQLUSER@localhost = PASSWORD( '$MYSQLPASS' ) "      mysql -u root -e "SET PASSWORD FOR $MYSQLUSER@localhost = PASSWORD( '$MYSQLPASS' ) "
226      mysqladmin flush-privileges      mysqladmin flush-privileges
227      ;;      ;;
# Line 189  case $UPDATE in Line 232  case $UPDATE in
232      ;;      ;;
233  esac  esac
234  # Rebuilding Wiki language menus  # Rebuilding Wiki language menus
235  php $HTMLDIR/maintenance/rebuildMessages.php --rebuild  #php $HTMLDIR/maintenance/rebuildMessages.php --rebuild
236  echo "Applying modifications to services..."  #echo "Applying modifications to services..."
237  # Uncomment the PwAuth-function  # Uncomment the PwAuth-function
238  sed 's.#!..g' $HTMLDIR/LocalSettings.php > $HTMLDIR/LocalSettings2.php  sed 's.#!..g' $HTMLDIR/LocalSettings.php > $HTMLDIR/LocalSettings2.php
239  mv $HTMLDIR/LocalSettings2.php $HTMLDIR/LocalSettings.php  mv $HTMLDIR/LocalSettings2.php $HTMLDIR/LocalSettings.php
240  /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf  #Handled in the -update event
241  /usr/local/bin/svc -h /service/httpd-e-smith  #/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
242    #systemctl restart httpd-e-smith.service
243  echo "-------------------------------------------------------------------------------"  echo "-------------------------------------------------------------------------------"
244  case $UPDATE in  case $UPDATE in
245    0)    0)
# Line 226  echo "    # config setprop $MYSQLDB Publ Line 270  echo "    # config setprop $MYSQLDB Publ
270  echo " "  echo " "
271  echo "Don't forget to apply modifications with following commands:"  echo "Don't forget to apply modifications with following commands:"
272  echo "    # expand-template /etc/httpd/conf/httpd.conf"  echo "    # expand-template /etc/httpd/conf/httpd.conf"
273  echo "    # svc -h /service/httpd-e-smith"  echo "    # systemctl restart httpd-e-smith.service"
274  echo " "  echo " "
275  echo "For more details, see http://wiki.contribs.org/Mediawiki"  echo "For more details, see http://wiki.contribs.org/Mediawiki"
276  echo "-------------------------------------------------------------------------------"  echo "-------------------------------------------------------------------------------"
277    
278  %preun  %preun
279  INSTALLDIR=/usr/share/doc/mediawiki-1.6.10/Sources  MEDIAWIKIVERSION='1.39.0'
280    INSTALLDIR=/usr/share/doc/mediawiki-$MEDIAWIKIVERSION/Sources
281  if [ $1 = 0 ] ; then  if [ $1 = 0 ] ; then
282    mv $INSTALLDIR/DO_NOT_USE_OR_DELETE/MW-Full-Uninstall.sh /root/    mv $INSTALLDIR/DO_NOT_USE_OR_DELETE/MW-Full-Uninstall.sh /root/
283  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