]> git.pld-linux.org Git - packages/wordpress.git/blame - wordpress.spec
- use system phpmailer, drop json compat
[packages/wordpress.git] / wordpress.spec
CommitLineData
0f7aa528
ER
1# TODO
2# - gettext mo to system dir, add all possible languages?
7f9b628a 3# - merge changes from wpmu.spec
892232a9
ER
4%include /usr/lib/rpm/macros.php
5%define php_min_version 5.2.1
ec33fe30 6Summary: Personal publishing system
fbfe2ed5 7Summary(pl.UTF-8): Osobisty system publikacji
ec33fe30 8Name: wordpress
b04365ce 9Version: 3.0.1
953c98d7 10Release: 0.14
b04365ce 11License: GPL v2
ec33fe30 12Group: Applications/Publishing
c674f72d 13Source0: http://wordpress.org/%{name}-%{version}.tar.gz
b04365ce 14# Source0-md5: 8fa5373ed805fb9a6ee56dfd236dcb64
54d512d5 15Source1: wp-secure.sh
16Source2: wp-setup.sh
17Source3: wp-setup.txt
7890ba25
ER
18Source4: apache.conf
19Source5: lighttpd.conf
0e9a5e64
ER
20Source6: http://svn.automattic.com/wordpress-i18n/et/tags/%{version}/messages/et.po
21# Source6-md5: 7ee698806091573a534a4889f88d6d97
22Source7: http://svn.automattic.com/wordpress-i18n/pl_PL/tags/%{version}/messages/pl_PL.po
23# Source7-md5: 795864c6eeeadcc74b8ea70d45f22e9f
c1fcdc96 24Patch0: configpath.patch
f7f07f8c 25Patch1: multisite.patch
c1fcdc96 26Patch2: %{name}.patch
20f21eaf 27Patch3: simplepie.patch
6b07f5b7
ER
28Patch4: pear-text-diff.patch
29Patch5: atomlib.patch
0326e7b5 30Patch6: swfobject.patch
953c98d7 31Patch7: phpmailer.patch
7f9b628a
ER
32URL: http://www.wordpress.org/
33BuildRequires: gettext-devel
892232a9 34BuildRequires: rpm-php-pearprov
7f9b628a 35BuildRequires: rpmbuild(macros) >= 1.553
6b07f5b7
ER
36Requires: js-swfobject >= 2.1
37Requires: php-atomlib >= 0.4
892232a9
ER
38Requires: php-common >= 4:%{php_min_version}
39Requires: php-date
40Requires: php-dom
c674f72d 41Requires: php-gettext
892232a9
ER
42Requires: php-hash
43Requires: php-iconv
44Requires: php-json
45Requires: php-mbstring
c674f72d
ER
46Requires: php-mysql
47Requires: php-pcre
6b07f5b7 48Requires: php-pear-Text_Diff
953c98d7 49Requires: php-phpmailer >= 2.0.4
20f21eaf 50Requires: php-simplepie >= 1.2
892232a9
ER
51Requires: php-spl
52Requires: php-tokenizer
c674f72d 53Requires: php-xml
3ab985b1 54Requires: webapps
892232a9 55Requires: webserver(php)
edeb68e0 56BuildArch: noarch
ec33fe30 57BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
58
20f21eaf
ER
59# no pear deps
60%define _noautopear pear
61
892232a9 62%define _noautophp php-ftp php-gd php-openssl php-simplexml
20f21eaf
ER
63
64# put it together for rpmbuild
65%define _noautoreq %{?_noautophp} %{?_noautopear}
66
3ab985b1
ER
67%define _appdir %{_datadir}/%{name}
68%define _webapps /etc/webapps
69%define _webapp %{name}
70%define _sysconfdir %{_webapps}/%{_webapp}
ec33fe30 71
72%description
73WordPress is a state-of-the-art semantic personal publishing platform
74with a focus on aesthetics, web standards, and usability. WordPress
75was born out of a desire for an elegant, well-architectured personal
76publishing system (also called blog or weblog) built on PHP and MySQL
77and licensed under the GPL. It is the official successor of
78b2/cafelog. WordPress is fresh software, but its roots and development
79go back to 2001.
80
0677b3c7
JR
81%description -l pl.UTF-8
82WordPress jest technologicznie dopracowaną, semantyczną, osobistą
83platformą do publikacji kładącą nacisk na standardy WWW oraz
84użyteczność. WordPress został stworzony w wyniku potrzeby
ec33fe30 85eleganckiego, dobrze zaprojektowanego, osobistego systemu publikacji
0677b3c7
JR
86(nazywanego również blogiem czy weblogiem). Jest to system oparty o
87PHP i MySQL oraz na licencji GPL. Jest oficjalnym następcą b2/cafelog.
88WordPress jest nowym oprogramowaniem, ale jego korzenie i rozwój
89sięgają 2001 roku.
ec33fe30 90
c674f72d
ER
91%package setup
92Summary: Wordpress setup package
93Summary(pl.UTF-8): Pakiet do wstępnej konfiguracji Wordpress
94Group: Applications/WWW
95Requires: %{name} = %{version}-%{release}
96
97%description setup
98Install this package to configure initial WordPress installation. You
99should uninstall this package when you're done, as it considered
100insecure to keep the setup files in place.
101
102%description setup -l pl.UTF-8
103Ten pakiet należy zainstalować w celu wstępnej konfiguracji WordPress
104po pierwszej instalacji. Potem należy go odinstalować, jako że
105pozostawienie plików instalacyjnych mogłoby być niebezpieczne.
106
a095fc01
ER
107%package plugin-akismet
108Summary: Wordpress Akismet Plugin
109Group: Applications/WWW
110Requires: %{name} = %{version}-%{release}
111
112%description plugin-akismet
113Akismet checks your comments against the Akismet web service to see if
114they look like spam or not and lets you review the spam it catches
115under your blog's "Comments" admin screen.
116
ed53548e
ER
117%package theme-twentyten
118Summary: Wordpress MU default theme
119Group: Applications/WWW
120URL: http://wordpress.org/extend/themes/twentyten
121Requires: %{name} = %{version}-%{release}
122
123%description theme-twentyten
124The 2010 theme for WordPress is stylish, customizable, simple, and
125readable.
126
127Make it yours with a custom menu, header image, and background. Twenty
128Ten supports six widgetized areas (two in the sidebar, four in the
129footer) and featured images (thumbnails for gallery posts and custom
130header images for posts and pages). It includes stylesheets for print
131and the admin Visual Editor, special styles for posts in the "Asides"
132and "Gallery" categories, and has an optional one-column page template
133that removes the sidebar.
134
ec33fe30 135%prep
7f9b628a
ER
136%setup -qc
137mv %{name}/* . && rmdir %{name}
bbcdc79a 138%undos -f php,js,html
c674f72d 139%patch0 -p1
ed53548e 140%patch1 -p1
c1fcdc96
ER
141cp -a wp-config{-sample,}.php
142%patch2 -p1
6b07f5b7
ER
143%patch3 -p1
144%patch4 -p1
145%patch5 -p1
0326e7b5 146%patch6 -p1
7f9b628a 147cp -a %{SOURCE3} .
ec33fe30 148
6b07f5b7 149rm license.txt
7f9b628a
ER
150rm wp-content/themes/index.php
151rm wp-content/plugins/index.php
152rm wp-content/index.php
153
6b07f5b7
ER
154# remove *.dev js/.css
155find -name *.dev.js | xargs rm -v
156find -name *.dev.css | xargs rm -v
157
a095fc01
ER
158# sample plugin
159rm wp-content/plugins/hello.php
160
6b07f5b7
ER
161# system swfobject
162rm wp-includes/js/swfobject.js
163
20f21eaf
ER
164# system simplepie
165rm wp-includes/class-simplepie.php
7191aabf 166
6b07f5b7
ER
167# system php-pear-Text_Diff
168rm -r wp-includes/Text/Diff*
169rmdir wp-includes/Text
170
171# system atomlib
172rm wp-includes/atomlib.php
173
953c98d7
ER
174# system phpmailer
175rm wp-includes/class-phpmailer.php
176rm wp-includes/class-smtp.php
177
178# php 5.2 + json ext satisfies this compat
179rm wp-includes/class-json.php
180
7ccb4aa4 181find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
c674f72d 182
7f9b628a
ER
183%build
184install -d wp-content/languages
185msgfmt --statistics %{SOURCE6} -o wp-content/languages/et.mo
186msgfmt --statistics %{SOURCE7} -o wp-content/languages/pl_PL.mo
187
ec33fe30 188%install
189rm -rf $RPM_BUILD_ROOT
f7f07f8c 190install -d $RPM_BUILD_ROOT{%{_appdir},%{_bindir},%{_sysconfdir},%{_appdir}/wp-content/{languages,mu-plugins},/var/{lib,log}/%{name}}
ec33fe30 191
c674f72d 192cp -a . $RPM_BUILD_ROOT%{_appdir}
bbcdc79a 193mv $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}}/wp-config.php
3ab985b1
ER
194rm -f $RPM_BUILD_ROOT%{_appdir}/readme.html
195rm -f $RPM_BUILD_ROOT%{_appdir}/wp-setup.txt
c674f72d 196
7f9b628a
ER
197install -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/wp-secure
198install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/wp-setup
c674f72d
ER
199ln -s %{_bindir}/wp-setup $RPM_BUILD_ROOT%{_appdir}/wp-setup.sh
200ln -s %{_bindir}/wp-secure $RPM_BUILD_ROOT%{_appdir}/wp-secure.sh
4b140d58 201
7f9b628a
ER
202cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
203cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
204cp -a %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
20ae9c53 205
edeb68e0
JB
206%clean
207rm -rf $RPM_BUILD_ROOT
208
ec33fe30 209%post
c674f72d 210if [ "$1" = 1 ]; then
3ab985b1
ER
211 %banner -e %{name} <<-EOF
212 To finish your configuration DO NOT FORGET to:
213
214 1) Create some MySQL database owned by some user
c674f72d
ER
215 2) Edit the file: %{_sysconfdir}/wp-config.php
216 3) Install %{name}-setup
217 4) Run a browser and visit: http://`hostname`/wordpress/wp-admin/install.php
3ab985b1 218EOF
20ae9c53 219fi
3ab985b1 220
c674f72d
ER
221%post setup
222chmod 660 %{_sysconfdir}/wp-config.php
223chown root:http %{_sysconfdir}/wp-config.php
224
225%postun setup
226if [ "$1" = "0" ]; then
227 chmod 640 %{_sysconfdir}/wp-config.php
228 chown root:http %{_sysconfdir}/wp-config.php
229fi
230
b973cc00 231%triggerin -- apache1 < 1.3.37-3, apache1-base
3ab985b1
ER
232%webapp_register apache %{_webapp}
233
ca1cad3e
RT
234%triggerin -- lighttpd
235%webapp_register lighttpd %{_webapp}
236
b973cc00 237%triggerun -- apache1 < 1.3.37-3, apache1-base
3ab985b1
ER
238%webapp_unregister apache %{_webapp}
239
cda44e30 240%triggerin -- apache < 2.2.0, apache-base
3ab985b1
ER
241%webapp_register httpd %{_webapp}
242
cda44e30 243%triggerun -- apache < 2.2.0, apache-base
3ab985b1
ER
244%webapp_unregister httpd %{_webapp}
245
ca1cad3e
RT
246%triggerun -- lighttpd
247%webapp_unregister lighttpd %{_webapp}
248
ec33fe30 249%files
843f1ee3 250%defattr(644,root,root,755)
251%doc readme.html wp-setup.txt
3ab985b1
ER
252%dir %attr(750,root,http) %{_sysconfdir}
253%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
254%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
ca1cad3e 255%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
c674f72d 256%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/wp-config.php
3ab985b1
ER
257
258%dir %{_appdir}
3ab985b1 259%{_appdir}/*.php
c674f72d 260%{_appdir}/wp-includes
c674f72d
ER
261%dir %{_appdir}/wp-content
262%dir %{_appdir}/wp-content/languages
0f7aa528
ER
263%lang(et) %{_appdir}/wp-content/languages/et.mo
264%lang(pl) %{_appdir}/wp-content/languages/pl_PL.mo
c674f72d 265%dir %{_appdir}/wp-content/plugins
82c8bcde 266%dir %{_appdir}/wp-content/mu-plugins
c674f72d 267%dir %{_appdir}/wp-content/themes
c674f72d 268
20f21eaf
ER
269# needed for daily moderation
270%{_appdir}/wp-admin
271
f7f07f8c
ER
272%attr(775,root,http) /var/lib/%{name}
273%attr(775,root,http) /var/log/%{name}
274
c674f72d
ER
275%files setup
276%defattr(644,root,root,755)
022de391 277%attr(755,root,root) %{_bindir}/wp-secure
278%attr(755,root,root) %{_bindir}/wp-setup
c674f72d
ER
279%{_appdir}/wp-secure.sh
280%{_appdir}/wp-setup.sh
ed53548e 281
a095fc01
ER
282%files plugin-akismet
283%defattr(644,root,root,755)
284%dir %{_appdir}/wp-content/plugins/akismet
285%doc %{_appdir}/wp-content/plugins/akismet/readme.txt
286%{_appdir}/wp-content/plugins/akismet/*.php
287%{_appdir}/wp-content/plugins/akismet/*.gif
288
ed53548e
ER
289%files theme-twentyten
290%defattr(644,root,root,755)
291%{_appdir}/wp-content/themes/twentyten
This page took 1.605585 seconds and 4 git commands to generate.