1 |
# $Id: smeserver-mediawiki.spec,v 1.1 2013/03/03 04:58:08 unnilennium Exp $ |
# $Id: smeserver-mediawiki.spec,v 1.1 2022/05/31 02:55:04 jpp 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.6.10 |
7 |
%define release 9 |
%define release 10 |
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.37.2 |
10 |
Name: %{name} |
Name: %{name} |
11 |
Version: %{version} |
Version: %{version} |
12 |
Release: %{release}%{?dist} |
Release: %{release}%{?dist} |
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.6.10-1.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 |
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 |
35 |
|
- Update to SME10 [SME:11987] |
36 |
|
- Add php-fpm stuff to httpd.conf |
37 |
|
- Add in createlinks |
38 |
|
|
39 |
* Mon May 12 2008 Dietmar Berteld> 1.6.10-9 |
* Mon May 12 2008 Dietmar Berteld> 1.6.10-9 |
40 |
- 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. |
41 |
|
|
80 |
%setup |
%setup |
81 |
|
|
82 |
%patch0 -p1 |
%patch0 -p1 |
83 |
|
%patch1 -p1 |
84 |
|
|
85 |
%build |
%build |
86 |
|
|
136 |
#Untar application |
#Untar application |
137 |
echo "Decompressing files..." |
echo "Decompressing files..." |
138 |
mkdir -p $HTMLDIR |
mkdir -p $HTMLDIR |
139 |
tar xzf $INSTALLDIR/mediawiki-1.6.10.tar.gz -C /opt |
tar xzf $INSTALLDIR/mediawiki-1.37.2.tar.gz -C /opt |
140 |
case $UPDATE in |
case $UPDATE in |
141 |
0) mv -f /opt/mediawiki-1.6.10/* $HTMLDIR ;; |
0) mv -f /opt/mediawiki-1.37.2/* $HTMLDIR ;; |
142 |
*) cp -ufR /opt/mediawiki-1.6.10/* $HTMLDIR --reply=yes ;; |
*) cp -ufR /opt/mediawiki-1.37.2/* $HTMLDIR --reply=yes ;; |
143 |
esac |
esac |
144 |
rm -rf /opt/mediawiki-1.6.10 |
rm -rf /opt/mediawiki-1.37.2 |
145 |
cp $INSTALLDIR/sme.* $HTMLDIR/skins/common/images |
cp $INSTALLDIR/sme.* $HTMLDIR/skins/common/images |
146 |
#Prepare config settings |
#Prepare config settings |
147 |
sed 's.mediawikipassword.'$MYSQLPASS'.g' $INSTALLDIR/LocalSettings.php > $HTMLDIR/LocalSettings.php |
sed 's.mediawikipassword.'$MYSQLPASS'.g' $INSTALLDIR/LocalSettings.php > $HTMLDIR/LocalSettings.php |
178 |
0) |
0) |
179 |
echo "Creating MySQL User and DataBase..." |
echo "Creating MySQL User and DataBase..." |
180 |
mysqladmin -u root create $MYSQLDB |
mysqladmin -u root create $MYSQLDB |
181 |
mysql $MYSQLDB < $INSTALLDIR/$MYSQLDB.sql |
#mysql $MYSQLDB < $INSTALLDIR/$MYSQLDB.sql |
182 |
mysql -u root -e "SET PASSWORD FOR $MYSQLUSER@localhost = PASSWORD( '$MYSQLPASS' ) " |
mysql -u root -e "SET PASSWORD FOR $MYSQLUSER@localhost = PASSWORD( '$MYSQLPASS' ) " |
183 |
mysqladmin flush-privileges |
mysqladmin flush-privileges |
184 |
;; |
;; |
203 |
echo "Reminder:" |
echo "Reminder:" |
204 |
echo "- Website open globally" |
echo "- Website open globally" |
205 |
echo "- go to http://$DOMAIN/$URL" |
echo "- go to http://$DOMAIN/$URL" |
206 |
echo "- Usernames are identical with SME users" |
#echo "- Usernames are identical with SME users" |
207 |
echo "- Passwords are identical with SME passwords" |
#echo "- Passwords are identical with SME passwords" |
208 |
echo "- MediaWiki admin = SME admin" |
echo "- MediaWiki admin = SME admin" |
209 |
;; |
;; |
210 |
*) |
*) |
214 |
echo " PLEASE MOVE THIS DIRECTORY TO A SAFE PLACE!!!" |
echo " PLEASE MOVE THIS DIRECTORY TO A SAFE PLACE!!!" |
215 |
echo "- Website open globally" |
echo "- Website open globally" |
216 |
echo "- go to http://$DOMAIN/$URL" |
echo "- go to http://$DOMAIN/$URL" |
217 |
echo "- Usernames are identical with SME users" |
#echo "- Usernames are identical with SME users" |
218 |
echo "- Passwords are identical with SME passwords" |
#echo "- Passwords are identical with SME passwords" |
219 |
echo "- MediaWiki admin = SME admin" |
echo "- MediaWiki admin = SME admin" |
220 |
;; |
;; |
221 |
esac |
esac |
241 |
if [ $1 = 0 ] ; then |
if [ $1 = 0 ] ; then |
242 |
echo "Restarting services..." |
echo "Restarting services..." |
243 |
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
244 |
/usr/local/bin/svc -h /service/httpd-e-smith |
#/usr/local/bin/svc -h /service/httpd-e-smith |
245 |
|
systemctl restart httpd-e-smith.service |
246 |
echo " " |
echo " " |
247 |
echo "Uninstallation finished!" |
echo "Uninstallation finished!" |
248 |
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)" |