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