/[packages]/updates/4/mediawiki/current/SPECS/mediawiki.spec
ViewVC logotype

Contents of /updates/4/mediawiki/current/SPECS/mediawiki.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 609055 - (show annotations) (download)
Fri Mar 28 01:09:56 2014 UTC (6 years, 7 months ago) by luigiwalser
File size: 5532 byte(s)
1.22.5
1 %define basever 1.22
2 %define subver 5
3 %define _requires_exceptions pear(\\(extensions/.*\\|core/includes/WebStart.php\\|phase3/includes/WebStart.php\\|PHPUnit/Framework.php\\))
4
5 Name: mediawiki
6 Version: %{basever}.%{subver}
7 Release: %mkrel 1
8 Summary: A wiki engine
9 License: GPLv2+
10 Group: System/Servers
11 BuildArch: noarch
12 Url: http://www.mediawiki.org/wiki/MediaWiki
13
14 Source0: http://releases.wikimedia.org/mediawiki/%{basever}/%{name}-%{version}.tar.gz
15 Source1: mediawiki.conf
16
17 # to make sure the "apache" group is created before mediawiki is installed
18 Requires(pre): webserver-base
19 Requires: webserver-base
20 # suggest apache-mod_php
21 Suggests: apache-mod_php
22 # for diff3:
23 Requires: diffutils
24 # for convert:
25 Requires: imagemagick
26 Requires(post): php-cli
27 Requires: php-gd
28 Requires: %{name}-sql = %{version}-%{release}
29 Requires: php-xml
30 Suggests: php-intl
31
32 Conflicts: mediawiki < 0:1.16.5-0
33 # make upgrading from mediawiki < 1.19 painless
34 Obsoletes: %{name}-minimal < 1.19.1
35
36 # RenameUser extension bundled with MediaWiki as of 1.20
37 Obsoletes: mediawiki-renameuser < %{version}-%{release}
38 # GraphViz extension unmaintained and vulnerable to XSS attacks
39 Obsoletes: mediawiki-graphviz < 0.9-2
40
41 %description
42 MediaWiki is the software used for Wikipedia and the other Wikimedia
43 Foundation websites. Compared to other wikis, it has an excellent
44 range of features and support for high-traffic websites using multiple
45 servers
46
47 This package includes math rendering support for mediawiki.
48
49 %package mysql
50 Summary: Mediawiki with mysql database
51 Group: System/Servers
52 Provides: %{name}-sql = %{version}-%{release}
53 Requires: php-mysql
54
55 %description mysql
56 This meta package installs the neccessary packages to use mediawiki
57 with a mariadb or mysql database.
58 This does not install the database server itself, because you can run
59 mediawiki with a remote database server.
60
61 %package pgsql
62 Summary: Mediawiki with postgresql database
63 Group: System/Servers
64 Provides: %{name}-sql = %{version}-%{release}
65 Requires: php-pgsql
66
67 %description pgsql
68 This meta package installs the neccessary packages to use mediawiki
69 with a postgresql database.
70 This does not install the database server itself, because you can run
71 mediawiki with a remote database server.
72
73 %package sqlite
74 Summary: Mediawiki with sqlite database
75 Group: System/Servers
76 Provides: %{name}-sql = %{version}-%{release}
77 Requires: php-sqlite3
78 Requires: php-pdo_sqlite
79
80 %description sqlite
81 This meta package installs the neccessary packages to use mediawiki
82 with an sqlite database.
83 If you are using sqlite you can't use a remote database server.
84
85 %prep
86 %setup -q
87
88 %build
89 :
90
91 %install
92 rm -rf %{buildroot}
93
94 # now copy the rest to the buildroot.
95 mkdir -p %{buildroot}%{_datadir}/mediawiki
96 cp -a * %{buildroot}%{_datadir}/mediawiki/
97
98 # remove documentation
99 rm -f %{buildroot}%{_datadir}/mediawiki/{COPYING,FAQ,HISTORY,README,README.mediawiki,RELEASE-NOTES-1.22,UPGRADE,CREDITS,INSTALL}
100 rm -rf %{buildroot}%{_datadir}/mediawiki/docs
101
102 # remove unneeded parts
103 rm -fr %{buildroot}%{_datadir}/mediawiki/{t,test,tests}
104 find %{buildroot}%{_datadir}/mediawiki/ -name .htaccess -exec rm -f {} +
105
106 # fix permissions
107 find %{buildroot}%{_datadir}/mediawiki -name \*.pl -exec chmod +x {} +
108
109 # remove version control/patch files
110 find %{buildroot} -name .git\* -exec rm -f {} +
111
112 %{__install} -d -m 755 %{buildroot}%{webappconfdir}
113 install -p -m 0644 %{SOURCE1} \
114 %{buildroot}%{webappconfdir}/mediawiki.conf
115
116 mkdir %{buildroot}%{_sysconfdir}/mediawiki
117
118 # placeholder for a default instance
119 mkdir -p %{buildroot}/%{_localstatedir}/www/mediawiki
120
121 # move editable things out of /usr
122 mv %{buildroot}%{_datadir}/mediawiki/images %{buildroot}%{_localstatedir}/www/mediawiki/images
123 ln -s %{_sysconfdir}/mediawiki/LocalSettings.php %{buildroot}%{_datadir}/mediawiki/LocalSettings.php
124
125 install -d -m 755 %{buildroot}/%{_localstatedir}/lib/mediawiki
126
127 %pretrans
128 if [ -f %{_datadir}/mediawiki/LocalSettings.php -a ! -L %{_datadir}/mediawiki/LocalSettings.php ]; then
129 if [ -e %{_sysconfdir}/mediawiki/LocalSettings.php ]; then
130 mv -f %{_sysconfdir}/mediawiki/LocalSettings.php %{_sysconfdir}/mediawiki/LocalSettings.php.rpmsave
131 fi
132 mv %{_datadir}/mediawiki/LocalSettings.php %{_sysconfdir}/mediawiki/LocalSettings.php
133 ln -s %{_sysconfdir}/mediawiki/LocalSettings.php %{_datadir}/mediawiki/LocalSettings.php
134 fi
135 if [ -d %{_datadir}/mediawiki/images -a ! -L %{_datadir}/mediawiki/images ]; then
136 if [ -e %{_localstatedir}/www/mediawiki/images ]; then
137 mv -f %{_localstatedir}/www/mediawiki/images %{_localstatedir}/www/mediawiki/images.rpmsave
138 fi
139 mv %{_datadir}/mediawiki/images %{_localstatedir}/www/mediawiki/images
140 ln -s %{_localstatedir}/www/mediawiki/images %{_datadir}/mediawiki/images
141 chown -R apache:apache %{_localstatedir}/www/mediawiki/images
142 fi
143
144 %post
145 php %{_datadir}/mediawiki/maintenance/update.php --quick > /dev/null
146 if [ ! -e %{_datadir}/mediawiki/images ]; then
147 ln -s %{_localstatedir}/www/mediawiki/images %{_datadir}/mediawiki/images
148 fi
149
150 %files
151 %doc COPYING FAQ HISTORY README RELEASE-NOTES-1.22 UPGRADE CREDITS INSTALL docs
152 %{_datadir}/mediawiki
153 %attr(-,apache,apache) %dir %{_datadir}/mediawiki/mw-config
154 %config(noreplace) %{webappconfdir}/mediawiki.conf
155 %dir %{_sysconfdir}/mediawiki
156 %dir %{_localstatedir}/www/mediawiki
157 %attr(-,apache,apache) %dir %{_localstatedir}/www/mediawiki/images
158 %attr(-,apache,apache) %{_localstatedir}/www/mediawiki/images/README
159
160 %files mysql
161
162 %files pgsql
163
164 %files sqlite
165 %attr(-,apache,apache) %{_localstatedir}/lib/mediawiki

  ViewVC Help
Powered by ViewVC 1.1.28