1 |
# $Id: smeserver-mediawiki.spec,v 1.1 2013/03/03 04:58:08 unnilennium Exp $ |
# $Id: smeserver-mediawiki.spec,v 1.9 2022/06/01 13:28:34 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.0 |
7 |
%define release 9 |
%define release 1 |
8 |
|
|
9 |
Summary: Mediawiki Web Application for SME Server 7.x based on Mediawiki 1.6.10 |
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 |
#Patch0: smeserver-mediawiki-1.37.2-Fix-up-password-generation-and-localsettings.patch |
17 |
|
#Patch1: smeserver-mediawiki-1.6.10-Update-to-SME10.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. |
31 |
http://your_e-smith-server_adress/wiki |
http://your_e-smith-server_adress/wiki |
32 |
|
|
33 |
%changelog |
%changelog |
34 |
|
* Fri Jun 03 2022 Brian Read <brianr@bjsystems.co.uk> 1.38.0-1.sme |
35 |
|
- Rollup tar file to include mediawiki 1.38.0 [SME: 11987] |
36 |
|
|
37 |
|
* Wed Jun 01 2022 Brian Read <brianr@bjsystems.co.uk> 1.37.2-3.sme |
38 |
|
- Fix-up-password-generation-and-localsettings [SME: 11987] |
39 |
|
|
40 |
|
* Wed Jun 01 2022 BogusDateBot |
41 |
|
- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday, |
42 |
|
by assuming the date is correct and changing the weekday. |
43 |
|
Thu Oct 23 2007 --> Thu Oct 18 2007 or Tue Oct 23 2007 or Thu Oct 25 2007 or .... |
44 |
|
Thu Feb 26 2008 --> Thu Feb 21 2008 or Tue Feb 26 2008 or Thu Feb 28 2008 or .... |
45 |
|
|
46 |
|
* Tue May 31 2022 Brian Read <brianr@bjsystems.co.uk> 1.6.10-10 sme |
47 |
|
- Update to SME10 [SME:11987] |
48 |
|
- Add php-fpm stuff to httpd.conf |
49 |
|
- Update to mw 1.37.2 |
50 |
|
|
51 |
* Mon May 12 2008 Dietmar Berteld> 1.6.10-9 |
* Mon May 12 2008 Dietmar Berteld> 1.6.10-9 |
52 |
- 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. |
53 |
|
|
57 |
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 |
58 |
groups in the server-manager |
groups in the server-manager |
59 |
|
|
60 |
* Thu Feb 26 2008 Dietmar Berteld> |
* Tue Feb 26 2008 Dietmar Berteld> |
61 |
|
Thu Feb 26 2008 --> Thu Feb 21 2008 or Tue Feb 26 2008 or Thu Feb 28 2008 or .... |
62 |
- [1.6.10-7] Fixed httpd-settings for local access only |
- [1.6.10-7] Fixed httpd-settings for local access only |
63 |
|
|
64 |
* Thu Oct 23 2007 Dietmar Berteld> |
* Tue Oct 23 2007 Dietmar Berteld> |
65 |
|
Thu Oct 23 2007 --> Thu Oct 18 2007 or Tue Oct 23 2007 or Thu Oct 25 2007 or .... |
66 |
- [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 |
67 |
|
|
68 |
* Fri Oct 19 2007 Dietmar Berteld> |
* Fri Oct 19 2007 Dietmar Berteld> |
93 |
|
|
94 |
%setup |
%setup |
95 |
|
|
96 |
%patch0 -p1 |
#%patch0 -p1 |
97 |
|
#%patch1 -p1 |
98 |
|
|
99 |
%build |
%build |
100 |
|
|
134 |
APP=MediaWiki |
APP=MediaWiki |
135 |
URL=wiki |
URL=wiki |
136 |
WORKDIR=/root |
WORKDIR=/root |
137 |
INSTALLDIR=/usr/share/doc/mediawiki-1.6.10/Sources |
MEDIAWIKIVERSION='1.38.0' |
138 |
|
INSTALLDIR=/usr/share/doc/mediawiki-$MEDIAWIKIVERSION/Sources |
139 |
HTMLDIR=/opt/mediawiki |
HTMLDIR=/opt/mediawiki |
140 |
MYSQLDB=mediawiki |
MYSQLDB=mediawiki |
141 |
MYSQLUSER=mediawikiuser |
MYSQLUSER=mediawikiuser |
151 |
#Untar application |
#Untar application |
152 |
echo "Decompressing files..." |
echo "Decompressing files..." |
153 |
mkdir -p $HTMLDIR |
mkdir -p $HTMLDIR |
154 |
tar xzf $INSTALLDIR/mediawiki-1.6.10.tar.gz -C /opt |
tar xzf $INSTALLDIR/mediawiki-1.37.2.tar.gz -C /opt |
155 |
case $UPDATE in |
case $UPDATE in |
156 |
0) mv -f /opt/mediawiki-1.6.10/* $HTMLDIR ;; |
0) mv -f /opt/mediawiki-$MEDIAWIKIVERSION/* $HTMLDIR ;; |
157 |
*) cp -ufR /opt/mediawiki-1.6.10/* $HTMLDIR --reply=yes ;; |
*) cp -ufR /opt/mediawiki-$MEDIAWIKIVERSION/* $HTMLDIR --reply=yes ;; |
158 |
esac |
esac |
159 |
rm -rf /opt/mediawiki-1.6.10 |
rm -rf /opt/mediawiki-$MEDIAWIKIVERSION |
160 |
cp $INSTALLDIR/sme.* $HTMLDIR/skins/common/images |
cp $INSTALLDIR/sme.* $HTMLDIR/skins/common/images |
161 |
#Prepare config settings |
#Prepare config settings |
162 |
sed 's.mediawikipassword.'$MYSQLPASS'.g' $INSTALLDIR/LocalSettings.php > $HTMLDIR/LocalSettings.php |
sed 's.mediawikipassword.'$MYSQLPASS'.g' $INSTALLDIR/LocalSettings.php > $HTMLDIR/LocalSettings.php |
210 |
sed 's.#!..g' $HTMLDIR/LocalSettings.php > $HTMLDIR/LocalSettings2.php |
sed 's.#!..g' $HTMLDIR/LocalSettings.php > $HTMLDIR/LocalSettings2.php |
211 |
mv $HTMLDIR/LocalSettings2.php $HTMLDIR/LocalSettings.php |
mv $HTMLDIR/LocalSettings2.php $HTMLDIR/LocalSettings.php |
212 |
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
213 |
/usr/local/bin/svc -h /service/httpd-e-smith |
systemctl restart httpd-e-smith.service |
214 |
echo "-------------------------------------------------------------------------------" |
echo "-------------------------------------------------------------------------------" |
215 |
case $UPDATE in |
case $UPDATE in |
216 |
0) |
0) |
218 |
echo "Reminder:" |
echo "Reminder:" |
219 |
echo "- Website open globally" |
echo "- Website open globally" |
220 |
echo "- go to http://$DOMAIN/$URL" |
echo "- go to http://$DOMAIN/$URL" |
221 |
echo "- Usernames are identical with SME users" |
#echo "- Usernames are identical with SME users" |
222 |
echo "- Passwords are identical with SME passwords" |
#echo "- Passwords are identical with SME passwords" |
223 |
echo "- MediaWiki admin = SME admin" |
echo "- MediaWiki admin = SME admin" |
224 |
;; |
;; |
225 |
*) |
*) |
229 |
echo " PLEASE MOVE THIS DIRECTORY TO A SAFE PLACE!!!" |
echo " PLEASE MOVE THIS DIRECTORY TO A SAFE PLACE!!!" |
230 |
echo "- Website open globally" |
echo "- Website open globally" |
231 |
echo "- go to http://$DOMAIN/$URL" |
echo "- go to http://$DOMAIN/$URL" |
232 |
echo "- Usernames are identical with SME users" |
#echo "- Usernames are identical with SME users" |
233 |
echo "- Passwords are identical with SME passwords" |
#echo "- Passwords are identical with SME passwords" |
234 |
echo "- MediaWiki admin = SME admin" |
echo "- MediaWiki admin = SME admin" |
235 |
;; |
;; |
236 |
esac |
esac |
241 |
echo " " |
echo " " |
242 |
echo "Don't forget to apply modifications with following commands:" |
echo "Don't forget to apply modifications with following commands:" |
243 |
echo " # expand-template /etc/httpd/conf/httpd.conf" |
echo " # expand-template /etc/httpd/conf/httpd.conf" |
244 |
echo " # svc -h /service/httpd-e-smith" |
echo " # systemctl restart httpd-e-smith.service" |
245 |
echo " " |
echo " " |
246 |
echo "For more details, see http://wiki.contribs.org/Mediawiki" |
echo "For more details, see http://wiki.contribs.org/Mediawiki" |
247 |
echo "-------------------------------------------------------------------------------" |
echo "-------------------------------------------------------------------------------" |
248 |
|
|
249 |
%preun |
%preun |
250 |
INSTALLDIR=/usr/share/doc/mediawiki-1.6.10/Sources |
INSTALLDIR=/usr/share/doc/mediawiki-$MEDIAWIKIVERSION/Sources |
251 |
if [ $1 = 0 ] ; then |
if [ $1 = 0 ] ; then |
252 |
mv $INSTALLDIR/DO_NOT_USE_OR_DELETE/MW-Full-Uninstall.sh /root/ |
mv $INSTALLDIR/DO_NOT_USE_OR_DELETE/MW-Full-Uninstall.sh /root/ |
253 |
fi |
fi |
256 |
if [ $1 = 0 ] ; then |
if [ $1 = 0 ] ; then |
257 |
echo "Restarting services..." |
echo "Restarting services..." |
258 |
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
259 |
/usr/local/bin/svc -h /service/httpd-e-smith |
#/usr/local/bin/svc -h /service/httpd-e-smith |
260 |
|
systemctl restart httpd-e-smith.service |
261 |
echo " " |
echo " " |
262 |
echo "Uninstallation finished!" |
echo "Uninstallation finished!" |
263 |
echo "If you want to completly remove it (installation files and MySQL user+database)" |
echo "If you want to completly remove it (installation files and MySQL user+database)" |