1 |
boklm |
72063 |
%define name mediawiki |
2 |
|
|
%define oname mediawiki |
3 |
|
|
%define basever 1.16 |
4 |
boklm |
89525 |
%define version %{basever}.4 |
5 |
boklm |
72063 |
%define release %mkrel 4 |
6 |
|
|
%define _requires_exceptions pear(HTML/Template/PHPTAL.php)\\|pear(MogileFS.php)\\|pear(extensions\\|pear(PHPUnit.php |
7 |
boklm |
72115 |
%define mediawiki_path %{_datadir}/%{name} |
8 |
|
|
%define mediawiki_var_path %{_localstatedir}/lib/%{name} |
9 |
|
|
%define mediawiki_images_path %{mediawiki_var_path}/images |
10 |
|
|
%define mediawiki_config_path %{_sysconfdir}/%{name} |
11 |
boklm |
72063 |
|
12 |
|
|
|
13 |
|
|
Name: %{name} |
14 |
|
|
Version: %{version} |
15 |
|
|
Release: %{release} |
16 |
boklm |
72073 |
Summary: A wiki engine |
17 |
boklm |
72063 |
License: GPLv2+ |
18 |
|
|
Group: System/Servers |
19 |
|
|
Source0: http://download.wikimedia.org/mediawiki/%{basever}/%{oname}-%{version}.tar.gz |
20 |
boklm |
89523 |
Source1: LocalSettings.php |
21 |
boklm |
72063 |
URL: http://www.mediawiki.org/wiki/MediaWiki |
22 |
|
|
|
23 |
|
|
Requires(pre): apache-conf >= 2.0.54 |
24 |
boklm |
89524 |
Requires: php-xml php-gd php-mysql |
25 |
boklm |
72063 |
# for diff3: |
26 |
|
|
Requires: diffutils |
27 |
|
|
# for convert: |
28 |
|
|
Requires: imagemagick |
29 |
|
|
|
30 |
|
|
BuildRequires: rpm-mandriva-setup >= 1.23 |
31 |
|
|
Requires(post): rpm-helper >= 0.16 |
32 |
|
|
Requires(postun): rpm-helper >= 0.16 |
33 |
|
|
BuildRequires: rpm-helper >= 0.16 |
34 |
boklm |
75276 |
Provides: %{name}%{basever} = %{version}-%{release} |
35 |
boklm |
72063 |
|
36 |
|
|
BuildArch: noarch |
37 |
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root |
38 |
|
|
|
39 |
|
|
%description |
40 |
|
|
MediaWiki is the software used for Wikipedia (http://www.wikipedia.org) and the |
41 |
|
|
other Wikimedia Foundation websites. Compared to other wikis, it has an |
42 |
|
|
excellent range of features and support for high-traffic websites (Wikipedia |
43 |
|
|
peaks at 380 requests per second as of August 2004). |
44 |
|
|
|
45 |
|
|
%prep |
46 |
|
|
%setup -q -n %{oname}-%{version} |
47 |
|
|
|
48 |
|
|
# clean sources |
49 |
|
|
find . -name .htaccess -exec rm -f {} \; |
50 |
|
|
find . -name .cvsignore -exec rm -f {} \; |
51 |
|
|
find . -name .svnignore -exec rm -f {} \; |
52 |
|
|
rm -f skins/amethyst/null |
53 |
|
|
|
54 |
|
|
#correct LanguageKo.php wrong script encoding |
55 |
|
|
perl -pi -e 's/\015$//' languages/LanguageKo.php |
56 |
|
|
|
57 |
|
|
%build |
58 |
|
|
|
59 |
|
|
%install |
60 |
|
|
rm -rf %{buildroot} |
61 |
|
|
|
62 |
|
|
#install files |
63 |
boklm |
72115 |
%__install -d -m 755 %{buildroot}%{mediawiki_path} |
64 |
|
|
%__cp -pR *.php %{buildroot}%{mediawiki_path} |
65 |
|
|
%__cp -pR *.phtml %{buildroot}%{mediawiki_path} |
66 |
|
|
%__cp -pR *.sample %{buildroot}%{mediawiki_path} |
67 |
|
|
%__cp -pR bin config extensions includes languages maintenance math \ |
68 |
|
|
skins serialized %{buildroot}%{mediawiki_path} |
69 |
|
|
%__install -d -m 755 %{buildroot}%{mediawiki_var_path} |
70 |
|
|
%__install -d -m 755 %{buildroot}%{mediawiki_images_path} |
71 |
boklm |
89523 |
%__install -d -m 700 %{buildroot}%{mediawiki_config_path} |
72 |
|
|
%__install -m 600 %{SOURCE1} %{buildroot}%{mediawiki_config_path}/LocalSettings.php |
73 |
boklm |
72115 |
ln -s %{mediawiki_config_path}/LocalSettings.php %{buildroot}%{mediawiki_path}/LocalSettings.php |
74 |
boklm |
72063 |
|
75 |
|
|
# create apache configuration file |
76 |
|
|
%{__install} -d -m 755 %{buildroot}%{webappconfdir} |
77 |
boklm |
72115 |
cat >> %{buildroot}%{webappconfdir}/%{name}.conf <<EOF |
78 |
|
|
Alias /%{name} %{mediawiki_path} |
79 |
|
|
Alias /%{name}-images %{mediawiki_images_path} |
80 |
|
|
<Directory "%{mediawiki_path}"> |
81 |
boklm |
72063 |
Options -Indexes FollowSymLinks MultiViews |
82 |
|
|
Order allow,deny |
83 |
|
|
Allow from All |
84 |
|
|
</Directory> |
85 |
boklm |
72115 |
<Directory "%{mediawiki_images_path}"> |
86 |
|
|
Options -Indexes FollowSymLinks MultiViews |
87 |
boklm |
72063 |
Order allow,deny |
88 |
boklm |
72115 |
Allow from All |
89 |
boklm |
72063 |
</Directory> |
90 |
|
|
EOF |
91 |
|
|
|
92 |
|
|
%clean |
93 |
|
|
rm -rf %{buildroot} |
94 |
|
|
|
95 |
|
|
%post |
96 |
|
|
%create_ghostfile /var/log/httpd/mediawiki.log apache apache 640 |
97 |
|
|
%_post_webapp |
98 |
|
|
|
99 |
|
|
%postun |
100 |
|
|
%_postun_webapp |
101 |
|
|
|
102 |
|
|
# files section |
103 |
|
|
%files |
104 |
|
|
%defattr(-,root,root) |
105 |
boklm |
89523 |
%config(noreplace) %{mediawiki_config_path}/LocalSettings.php |
106 |
boklm |
72063 |
%dir %{mediawiki_path} |
107 |
boklm |
72115 |
%{mediawiki_path}/*.php |
108 |
|
|
%{mediawiki_path}/*.phtml |
109 |
|
|
%{mediawiki_path}/*.sample |
110 |
|
|
%{mediawiki_path}/bin |
111 |
|
|
%{mediawiki_path}/config |
112 |
|
|
%{mediawiki_path}/extensions |
113 |
|
|
%attr(-,apache,apache) %{mediawiki_images_path} |
114 |
|
|
%{mediawiki_path}/includes |
115 |
|
|
%{mediawiki_path}/languages |
116 |
|
|
%{mediawiki_path}/maintenance |
117 |
|
|
%{mediawiki_path}/math |
118 |
|
|
%{mediawiki_path}/serialized |
119 |
|
|
%{mediawiki_path}/skins |
120 |
boklm |
72063 |
|
121 |
boklm |
72115 |
%config(noreplace) %{_webappconfdir}/%{name}.conf |
122 |
boklm |
72063 |
|
123 |
boklm |
72065 |
%doc FAQ HISTORY README RELEASE-NOTES UPGRADE |
124 |
boklm |
72063 |
%doc docs |
125 |
|
|
|
126 |
|
|
|