1 |
boklm |
72063 |
%define name mediawiki |
2 |
|
|
%define basever 1.16 |
3 |
cjw |
97620 |
%define version %{basever}.5 |
4 |
spuhler |
169372 |
%define release %mkrel 3 |
5 |
spuhler |
169352 |
%define _requires_exceptions pear(extensions\\|pear(PHPUnit/Framework.php) |
6 |
|
|
## Framework.php was dropped in PHPUnit |
7 |
cjw |
97620 |
%define sharedcodedir %{_datadir}/mediawiki |
8 |
|
|
%define moduledir %{_libdir}/mediawiki |
9 |
|
|
%define docdir %{_defaultdocdir}/%{name}-%{version} |
10 |
boklm |
72063 |
|
11 |
|
|
Name: %{name} |
12 |
|
|
Version: %{version} |
13 |
|
|
Release: %{release} |
14 |
boklm |
72073 |
Summary: A wiki engine |
15 |
boklm |
72063 |
License: GPLv2+ |
16 |
|
|
Group: System/Servers |
17 |
|
|
URL: http://www.mediawiki.org/wiki/MediaWiki |
18 |
cjw |
97620 |
Source0: http://download.wikimedia.org/mediawiki/%{basever}/%{name}-%{version}.tar.gz |
19 |
|
|
Source1: mediawiki.conf |
20 |
boklm |
98858 |
Source2: README.urpmi |
21 |
cjw |
97620 |
Source3: mw-createinstance.in |
22 |
|
|
Source4: mw-updateallinstances.in |
23 |
|
|
Source5: mediawiki-common.conf |
24 |
|
|
Patch0: mediawiki-1.16.2-commoncode.patch |
25 |
|
|
Patch1: mediawiki-1.16.2-enablesuggests.patch |
26 |
|
|
BuildRequires: ocaml >= 3.06 |
27 |
|
|
Requires: mediawiki-minimal = %{version}-%{release} |
28 |
|
|
Requires: tetex-dvips |
29 |
|
|
Requires: tetex-latex |
30 |
boklm |
72063 |
|
31 |
cjw |
97620 |
%description |
32 |
|
|
MediaWiki is the software used for Wikipedia and the other Wikimedia |
33 |
|
|
Foundation websites. Compared to other wikis, it has an excellent |
34 |
|
|
range of features and support for high-traffic websites using multiple |
35 |
|
|
servers |
36 |
|
|
|
37 |
|
|
This package supports wiki farms. Read the instructions for creating |
38 |
boklm |
98858 |
wiki instances under %{docdir}/README.urpmi. |
39 |
cjw |
97620 |
Remember to remove the config dir after completing the configuration. |
40 |
|
|
|
41 |
|
|
This package includes math rendering support for mediawiki. |
42 |
|
|
|
43 |
|
|
%package minimal |
44 |
boklm |
98859 |
Summary: mediawiki without texvc |
45 |
cjw |
97620 |
Group: System/Servers |
46 |
|
|
# to make sure the "apache" group is created before mediawiki is installed |
47 |
|
|
Requires(pre): webserver |
48 |
boklm |
72063 |
# for diff3: |
49 |
|
|
Requires: diffutils |
50 |
|
|
# for convert: |
51 |
|
|
Requires: imagemagick |
52 |
cjw |
97620 |
Requires: php-gd |
53 |
|
|
Requires: php-mysql |
54 |
|
|
Requires: php-pgsql |
55 |
|
|
Requires: php-xml |
56 |
|
|
Provides: %{name}%{basever} |
57 |
|
|
Conflicts: mediawiki < 0:1.16.5-0 |
58 |
boklm |
72063 |
|
59 |
cjw |
97620 |
%description minimal |
60 |
|
|
This subpackage contains all mediawiki parts except the ones needed to |
61 |
|
|
create inline math. This is done for minimal wiki installs that do |
62 |
|
|
not require mathematic formulas and therefore no dependencies to LaTeX |
63 |
|
|
are set up. |
64 |
boklm |
72063 |
|
65 |
|
|
|
66 |
|
|
%prep |
67 |
cjw |
97620 |
%setup -q |
68 |
|
|
%patch0 -p1 -b .commoncode |
69 |
|
|
%patch1 -p1 -b .enablesuggests |
70 |
boklm |
72063 |
|
71 |
|
|
%build |
72 |
cjw |
97620 |
cd math |
73 |
|
|
make |
74 |
boklm |
72063 |
|
75 |
|
|
%install |
76 |
|
|
rm -rf %{buildroot} |
77 |
|
|
|
78 |
cjw |
97620 |
# move away the documentation to the final folder. |
79 |
|
|
mkdir -p %{buildroot}%{docdir} |
80 |
|
|
mv -f COPYING FAQ HISTORY README RELEASE-NOTES UPGRADE CREDITS INSTALL docs \ |
81 |
|
|
%{buildroot}%{docdir}/ |
82 |
boklm |
72063 |
|
83 |
boklm |
98858 |
install -p %{SOURCE2} %{buildroot}%{docdir}/README.urpmi |
84 |
cjw |
97620 |
|
85 |
|
|
# now copy the rest to the buildroot. |
86 |
|
|
mkdir -p %{buildroot}%{sharedcodedir} |
87 |
|
|
cp -a * %{buildroot}%{sharedcodedir}/ |
88 |
|
|
|
89 |
|
|
# remove unneeded parts |
90 |
|
|
rm -fr %{buildroot}%{sharedcodedir}/{t,test,tests} |
91 |
|
|
rm -fr %{buildroot}%{sharedcodedir}/includes/zhtable |
92 |
|
|
find %{buildroot}%{sharedcodedir}/ \ |
93 |
|
|
\( -name .htaccess -or -name \*.cmi \) \ |
94 |
|
|
| xargs -r rm |
95 |
|
|
|
96 |
|
|
# fix permissions |
97 |
|
|
chmod +x %{buildroot}%{sharedcodedir}/bin/* |
98 |
|
|
find %{buildroot}%{sharedcodedir} -name \*.pl | xargs -r chmod +x |
99 |
|
|
|
100 |
|
|
# move arch dependent parts |
101 |
|
|
mkdir -p %{buildroot}%{moduledir}/math |
102 |
|
|
mv %{buildroot}%{sharedcodedir}/math/texvc \ |
103 |
|
|
%{buildroot}%{moduledir}/math/ |
104 |
|
|
rm -fr %{buildroot}%{sharedcodedir}/math/* |
105 |
|
|
ln -s %{moduledir}/math/texvc %{buildroot}%{sharedcodedir}/math/ |
106 |
|
|
|
107 |
|
|
# remove version control/patch files |
108 |
|
|
find %{buildroot} -name .svnignore | xargs -r rm |
109 |
|
|
find %{buildroot} -name \*.commoncode | xargs -r rm |
110 |
|
|
find %{buildroot} -name \*.enablesuggests | xargs -r rm |
111 |
|
|
|
112 |
boklm |
72063 |
%{__install} -d -m 755 %{buildroot}%{webappconfdir} |
113 |
cjw |
97620 |
install -p -m 0644 %{SOURCE1} \ |
114 |
|
|
%{buildroot}%{webappconfdir}/mediawiki.conf |
115 |
|
|
install -p -m 0644 %{SOURCE5} \ |
116 |
|
|
%{buildroot}%{webappconfdir}/mediawiki-common.conf |
117 |
boklm |
72063 |
|
118 |
cjw |
97620 |
# tools for keeping mediawiki instances current |
119 |
|
|
mkdir -p %{buildroot}%{_sbindir} |
120 |
|
|
sed -e's,@datadir@,%{_datadir},g' -e's,@sysconfdir@,%{_sysconfdir},g' \ |
121 |
|
|
< %{SOURCE3} > %{buildroot}%{_sbindir}/mediawiki-create |
122 |
|
|
sed -e's,@datadir@,%{_datadir},g' -e's,@sysconfdir@,%{_sysconfdir},g' \ |
123 |
|
|
< %{SOURCE4} > %{buildroot}%{_sbindir}/mediawiki-updateall |
124 |
|
|
chmod 0755 %{buildroot}%{_sbindir}/mediawiki-* |
125 |
|
|
mkdir %{buildroot}%{_sysconfdir}/mediawiki |
126 |
|
|
|
127 |
|
|
# placeholder for a default instance |
128 |
|
|
mkdir -p %{buildroot}/var/www/mediawiki |
129 |
|
|
|
130 |
|
|
# list of instances - initially empty |
131 |
|
|
touch %{buildroot}%{_sysconfdir}/mediawiki/instances |
132 |
|
|
|
133 |
|
|
# register default instance - not, this is only a default location |
134 |
|
|
# echo /var/www/mediawiki >> %{buildroot}%{_sysconfdir}/mediawiki/instances |
135 |
|
|
|
136 |
boklm |
72063 |
%clean |
137 |
|
|
rm -rf %{buildroot} |
138 |
|
|
|
139 |
|
|
%post |
140 |
cjw |
97620 |
%{_sbindir}/mediawiki-updateall >> /var/log/mediawiki-updates.log 2>&1 || : |
141 |
boklm |
72063 |
|
142 |
|
|
%files |
143 |
cjw |
97620 |
%defattr(-,root,root,-) |
144 |
|
|
%{sharedcodedir}/math |
145 |
|
|
%{moduledir} |
146 |
boklm |
72063 |
|
147 |
cjw |
97620 |
%files minimal |
148 |
|
|
%defattr(-,root,root,-) |
149 |
|
|
%{docdir} |
150 |
|
|
%dir %{sharedcodedir} |
151 |
|
|
%{sharedcodedir}/*.php |
152 |
|
|
%{sharedcodedir}/*.php5 |
153 |
|
|
%{sharedcodedir}/*.phtml |
154 |
|
|
%{sharedcodedir}/StartProfiler.sample |
155 |
|
|
%{sharedcodedir}/bin |
156 |
|
|
%{sharedcodedir}/cache |
157 |
|
|
%attr(-,apache,apache) %dir %{sharedcodedir}/config |
158 |
|
|
%{sharedcodedir}/config/* |
159 |
|
|
%{sharedcodedir}/extensions |
160 |
|
|
%{sharedcodedir}/images |
161 |
|
|
%{sharedcodedir}/includes |
162 |
|
|
%{sharedcodedir}/languages |
163 |
|
|
%{sharedcodedir}/maintenance |
164 |
|
|
%{sharedcodedir}/serialized |
165 |
|
|
%{sharedcodedir}/skins |
166 |
|
|
%config(noreplace) %{webappconfdir}/mediawiki.conf |
167 |
|
|
%config %{webappconfdir}/mediawiki-common.conf |
168 |
|
|
%dir %{_sysconfdir}/mediawiki |
169 |
|
|
%config(noreplace) %{_sysconfdir}/mediawiki/instances |
170 |
|
|
%{_sbindir}/mediawiki-* |
171 |
|
|
/var/www/mediawiki |