1 |
%define name smeserver-mediawiki |
%define name smeserver-mediawiki |
2 |
%define version 1.6.10 |
%define version 1.6.10 |
3 |
%define release 6 |
%define release 9 |
4 |
%define rpmver 4.0.4 |
%define rpmver 4.0.4 |
5 |
|
|
6 |
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.6.10 |
7 |
Name: %{name} |
Name: %{name} |
8 |
Version: %{version} |
Version: %{version} |
9 |
Release: %{release}%{?dist} |
Release: %{release} |
10 |
License: GPL |
License: GPL |
11 |
Group: /Web/Applications |
Group: /Web/Applications |
12 |
Source: %{name}-%{version}.tar.gz |
Source: %{name}-%{version}.tar.gz |
13 |
URL: http://group-office.com/ |
Patch0: smeserver-mediawiki-1.6.10-1.patch |
14 |
|
Packager: Dietmar Berteld <dietmar@berteld.com> |
15 |
|
URL: http://mediawiki.org/ |
16 |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
17 |
BuildArchitectures: noarch |
BuildArchitectures: noarch |
18 |
Requires: e-smith-base, e-smith-release >= 7 |
Requires: e-smith-base, e-smith-release >= 7 |
|
BuildRequires: e-smith-devtools |
|
19 |
|
|
20 |
%description |
%description |
21 |
This RPM is an unofficial addon for the SME Server 7.x. |
This RPM is an unofficial addon for the SME Server 7.x. |
26 |
http://your_e-smith-server_adress/wiki |
http://your_e-smith-server_adress/wiki |
27 |
|
|
28 |
%changelog |
%changelog |
29 |
|
* Mon May 12 2008 Dietmar Berteld> |
30 |
|
- [1.6.10-9] Disabing automatic creation of SME groups. No idea to synchronise them to mediawiki groups. |
31 |
|
- [1.6.10-8] Adding PwAuth-function, SME users can login with their SME passwords |
32 |
|
Automatic creation of a few default mw_groups and list them in the |
33 |
|
configuration file as well so admins only need to add users to the proper |
34 |
|
groups in the server-manager |
35 |
|
|
36 |
|
* Thu Feb 26 2008 Dietmar Berteld> |
37 |
|
- [1.6.10-7] Fixed httpd-settings for local access only |
38 |
|
|
39 |
* Thu Oct 23 2007 Dietmar Berteld> |
* Thu Oct 23 2007 Dietmar Berteld> |
40 |
- [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 |
41 |
|
|
67 |
|
|
68 |
%setup |
%setup |
69 |
|
|
70 |
|
%patch0 -p1 |
71 |
|
|
72 |
%build |
%build |
73 |
|
|
74 |
%install |
%install |
131 |
rm -rf /opt/mediawiki-1.6.10 |
rm -rf /opt/mediawiki-1.6.10 |
132 |
cp $INSTALLDIR/sme.* $HTMLDIR/skins/common/images |
cp $INSTALLDIR/sme.* $HTMLDIR/skins/common/images |
133 |
#Prepare config settings |
#Prepare config settings |
134 |
if [ "$UPDATE" = "0" ]; then |
sed 's.mediawikipassword.'$MYSQLPASS'.g' $INSTALLDIR/LocalSettings.php > $HTMLDIR/LocalSettings.php |
135 |
sed 's.mediawikipassword.'$MYSQLPASS'.g' $INSTALLDIR/LocalSettings.php > $HTMLDIR/LocalSettings.php |
sed "s/mydomain/$DOMAIN/g" $HTMLDIR/LocalSettings.php > $HTMLDIR/LocalSettings2.php |
136 |
sed "s/mydomain/$DOMAIN/g" $HTMLDIR/LocalSettings.php > $HTMLDIR/LocalSettings2.php |
case "$LANG" in |
|
case "$LANG" in |
|
137 |
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 ;; |
138 |
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 ;; |
139 |
fr_FR) sed 's.$wgLanguageCode = "en";.$wgLanguageCode = "fr";.g' $HTMLDIR/LocalSettings2.php > $HTMLDIR/LocalSettings.php ;; |
fr_FR) sed 's.$wgLanguageCode = "en";.$wgLanguageCode = "fr";.g' $HTMLDIR/LocalSettings2.php > $HTMLDIR/LocalSettings.php ;; |
140 |
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 ;; |
141 |
*) 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 ;; |
142 |
esac |
esac |
143 |
rm $HTMLDIR/LocalSettings2.php |
rm $HTMLDIR/LocalSettings2.php |
144 |
fi |
cp $INSTALLDIR/PwAuthPlugin.php $HTMLDIR/extensions/PwAuthPlugin.php |
145 |
|
#Creating SME-Groups for MediaWiki (disabled) |
146 |
|
#/sbin/e-smith/db accounts set mw_read group |
147 |
|
#/sbin/e-smith/db accounts setprop mw_read Description "MediaWiki Read" |
148 |
|
#/sbin/e-smith/db accounts set mw_edit group |
149 |
|
#/sbin/e-smith/db accounts setprop mw_edit Description "MediaWiki Edit" |
150 |
|
#/sbin/e-smith/db accounts set mw_createpage group |
151 |
|
#/sbin/e-smith/db accounts setprop mw_createpage Description "MediaWiki Create Page" |
152 |
|
#/sbin/e-smith/db accounts set mw_createtalk group |
153 |
|
#/sbin/e-smith/db accounts setprop mw_createtalk Description "MediaWiki Create Talk" |
154 |
|
#/sbin/e-smith/signal-event group-create |
155 |
|
#Changing some rights |
156 |
|
chmod 644 $HTMLDIR/extensions/PwAuthPlugin.php |
157 |
chown -R root:root $HTMLDIR |
chown -R root:root $HTMLDIR |
158 |
chown root:www $HTMLDIR/images |
chown root:www $HTMLDIR/images |
159 |
chown root:www $HTMLDIR/LocalSettings.php |
chown root:www $HTMLDIR/LocalSettings.php |
178 |
# Rebuilding Wiki language menus |
# Rebuilding Wiki language menus |
179 |
php $HTMLDIR/maintenance/rebuildMessages.php --rebuild |
php $HTMLDIR/maintenance/rebuildMessages.php --rebuild |
180 |
echo "Applying modifications to services..." |
echo "Applying modifications to services..." |
181 |
|
# Uncomment the PwAuth-function |
182 |
|
sed 's.#!..g' $HTMLDIR/LocalSettings.php > $HTMLDIR/LocalSettings2.php |
183 |
|
mv $HTMLDIR/LocalSettings2.php $HTMLDIR/LocalSettings.php |
184 |
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
185 |
/usr/local/bin/svc -h /service/httpd-e-smith |
/usr/local/bin/svc -h /service/httpd-e-smith |
186 |
echo "-------------------------------------------------------------------------------" |
echo "-------------------------------------------------------------------------------" |
190 |
echo "Reminder:" |
echo "Reminder:" |
191 |
echo "- Website open globally" |
echo "- Website open globally" |
192 |
echo "- go to http://$DOMAIN/$URL" |
echo "- go to http://$DOMAIN/$URL" |
193 |
echo "- Username : admin" |
echo "- Usernames are identical with SME users" |
194 |
echo "- Password : admin" |
echo "- Passwords are identical with SME passwords" |
195 |
echo "- Please change admin password" |
echo "- MediaWiki admin = SME admin" |
196 |
;; |
;; |
197 |
*) |
*) |
198 |
echo "GroupOffice update completed." |
echo "$APP update completed." |
199 |
echo "Reminder:" |
echo "Reminder:" |
200 |
echo "- The old install was backed up and can be found in /opt/MW_RPM_BACKUP" |
echo "- The old install was backed up and can be found in /opt/MW_RPM_BACKUP" |
201 |
echo " PLEASE MOVE THIS DIRECTORY TO A SAFE PLACE!!!" |
echo " PLEASE MOVE THIS DIRECTORY TO A SAFE PLACE!!!" |
202 |
echo "- Website open globally" |
echo "- Website open globally" |
203 |
echo "- go to http://$DOMAIN/$URL" |
echo "- go to http://$DOMAIN/$URL" |
204 |
echo "- Username : admin" |
echo "- Usernames are identical with SME users" |
205 |
echo "- Password : admin" |
echo "- Passwords are identical with SME passwords" |
206 |
echo "- Please change admin password" |
echo "- MediaWiki admin = SME admin" |
207 |
;; |
;; |
208 |
esac |
esac |
209 |
echo "-------------------------------------------------------------------------------" |
echo "-------------------------------------------------------------------------------" |