2 # - gettext mo to system dir, add all possible languages?
3 # - merge changes from wpmu.spec
4 %include /usr/lib/rpm/macros.php
5 %define php_min_version 5.2.1
6 Summary: Personal publishing system
7 Summary(pl.UTF-8): Osobisty system publikacji
12 Group: Applications/Publishing
13 Source0: http://wordpress.org/%{name}-%{version}.tar.gz
14 # Source0-md5: a455e0834eb2c8994c35acf3c13ddc11
19 Source5: lighttpd.conf
20 Source6: http://svn.automattic.com/wordpress-i18n/et/tags/%{version}/messages/et.po
21 # Source6-md5: faccf42481d5bf742b019c24a3c6251a
22 Source7: http://svn.automattic.com/wordpress-i18n/pl_PL/tags/%{version}/messages/pl_PL.po
23 # Source7-md5: 8c9038410b596f9c705cc006dcdd5960
24 Patch0: configpath.patch
25 Patch1: multisite.patch
27 Patch3: simplepie.patch
28 Patch4: pear-text-diff.patch
30 Patch6: swfobject.patch
31 Patch7: phpmailer.patch
32 URL: http://www.wordpress.org/
33 BuildRequires: gettext-devel
34 BuildRequires: rpm-php-pearprov
35 BuildRequires: rpmbuild(macros) >= 1.553
36 Requires: js-swfobject >= 2.1
37 Requires: php-atomlib >= 0.4
38 Requires: php-common >= 4:%{php_min_version}
45 Requires: php-mbstring
48 Requires: php-pear-Text_Diff
49 Requires: php-phpmailer >= 2.0.4
50 Requires: php-simplepie >= 1.2
52 Requires: php-tokenizer
55 Requires: webserver(php)
57 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
60 %define _noautopear pear
62 %define _noautophp php-ftp php-gd php-openssl php-simplexml
64 # put it together for rpmbuild
65 %define _noautoreq %{?_noautophp} %{?_noautopear}
67 %define _appdir %{_datadir}/%{name}
68 %define _webapps /etc/webapps
69 %define _webapp %{name}
70 %define _sysconfdir %{_webapps}/%{_webapp}
73 WordPress is a state-of-the-art semantic personal publishing platform
74 with a focus on aesthetics, web standards, and usability. WordPress
75 was born out of a desire for an elegant, well-architectured personal
76 publishing system (also called blog or weblog) built on PHP and MySQL
77 and licensed under the GPL. It is the official successor of
78 b2/cafelog. WordPress is fresh software, but its roots and development
81 %description -l pl.UTF-8
82 WordPress jest technologicznie dopracowaną, semantyczną, osobistą
83 platformą do publikacji kładącą nacisk na standardy WWW oraz
84 użyteczność. WordPress został stworzony w wyniku potrzeby
85 eleganckiego, dobrze zaprojektowanego, osobistego systemu publikacji
86 (nazywanego również blogiem czy weblogiem). Jest to system oparty o
87 PHP i MySQL oraz na licencji GPL. Jest oficjalnym następcą b2/cafelog.
88 WordPress jest nowym oprogramowaniem, ale jego korzenie i rozwój
92 Summary: Wordpress setup package
93 Summary(pl.UTF-8): Pakiet do wstępnej konfiguracji Wordpress
94 Group: Applications/WWW
95 Requires: %{name} = %{version}-%{release}
98 Install this package to configure initial WordPress installation. You
99 should uninstall this package when you're done, as it considered
100 insecure to keep the setup files in place.
102 %description setup -l pl.UTF-8
103 Ten pakiet należy zainstalować w celu wstępnej konfiguracji WordPress
104 po pierwszej instalacji. Potem należy go odinstalować, jako że
105 pozostawienie plików instalacyjnych mogłoby być niebezpieczne.
107 %package plugin-akismet
108 Summary: Wordpress Akismet Plugin
109 Group: Applications/WWW
110 Requires: %{name} = %{version}-%{release}
112 %description plugin-akismet
113 Akismet checks your comments against the Akismet web service to see if
114 they look like spam or not and lets you review the spam it catches
115 under your blog's "Comments" admin screen.
117 %package theme-twentyten
118 Summary: Wordpress MU default theme
119 Group: Applications/WWW
120 URL: http://wordpress.org/extend/themes/twentyten
121 Requires: %{name} = %{version}-%{release}
123 %description theme-twentyten
124 The 2010 theme for WordPress is stylish, customizable, simple, and
127 Make it yours with a custom menu, header image, and background. Twenty
128 Ten supports six widgetized areas (two in the sidebar, four in the
129 footer) and featured images (thumbnails for gallery posts and custom
130 header images for posts and pages). It includes stylesheets for print
131 and the admin Visual Editor, special styles for posts in the "Asides"
132 and "Gallery" categories, and has an optional one-column page template
133 that removes the sidebar.
137 mv %{name}/* . && rmdir %{name}
138 %undos -f php,js,html
141 cp -a wp-config{-sample,}.php
151 rm wp-content/themes/index.php
152 rm wp-content/plugins/index.php
153 rm wp-content/index.php
155 # remove *.dev js/.css
156 find -name *.dev.js | xargs rm -v
157 find -name *.dev.css | xargs rm -v
160 rm wp-content/plugins/hello.php
163 rm wp-includes/js/swfobject.js
166 rm wp-includes/class-simplepie.php
168 # system php-pear-Text_Diff
169 rm -r wp-includes/Text/Diff*
170 rmdir wp-includes/Text
173 rm wp-includes/atomlib.php
176 rm wp-includes/class-phpmailer.php
177 rm wp-includes/class-smtp.php
179 # php 5.2 + json ext satisfies this compat
180 rm wp-includes/class-json.php
182 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
185 install -d wp-content/languages
186 msgfmt --statistics %{SOURCE6} -o wp-content/languages/et.mo
187 msgfmt --statistics %{SOURCE7} -o wp-content/languages/pl_PL.mo
190 rm -rf $RPM_BUILD_ROOT
191 install -d $RPM_BUILD_ROOT{%{_appdir},%{_bindir},%{_sysconfdir},%{_appdir}/wp-content/{languages,mu-plugins},/var/{lib,log}/%{name}}
193 cp -a . $RPM_BUILD_ROOT%{_appdir}
194 mv $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}}/wp-config.php
195 rm -f $RPM_BUILD_ROOT%{_appdir}/readme.html
196 rm -f $RPM_BUILD_ROOT%{_appdir}/wp-setup.txt
198 install -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/wp-secure
199 install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/wp-setup
200 ln -s %{_bindir}/wp-setup $RPM_BUILD_ROOT%{_appdir}/wp-setup.sh
201 ln -s %{_bindir}/wp-secure $RPM_BUILD_ROOT%{_appdir}/wp-secure.sh
203 cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
204 cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
205 cp -a %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
208 rm -rf $RPM_BUILD_ROOT
211 if [ "$1" = 1 ]; then
212 %banner -e %{name} <<-EOF
213 To finish your configuration DO NOT FORGET to:
215 1) Create some MySQL database owned by some user
216 2) Edit the file: %{_sysconfdir}/wp-config.php
217 3) Install %{name}-setup
218 4) Run a browser and visit: http://`hostname`/wordpress/wp-admin/install.php
223 chmod 660 %{_sysconfdir}/wp-config.php
224 chown root:http %{_sysconfdir}/wp-config.php
227 if [ "$1" = "0" ]; then
228 chmod 640 %{_sysconfdir}/wp-config.php
229 chown root:http %{_sysconfdir}/wp-config.php
232 %triggerin -- apache1 < 1.3.37-3, apache1-base
233 %webapp_register apache %{_webapp}
235 %triggerin -- lighttpd
236 %webapp_register lighttpd %{_webapp}
238 %triggerun -- apache1 < 1.3.37-3, apache1-base
239 %webapp_unregister apache %{_webapp}
241 %triggerin -- apache < 2.2.0, apache-base
242 %webapp_register httpd %{_webapp}
244 %triggerun -- apache < 2.2.0, apache-base
245 %webapp_unregister httpd %{_webapp}
247 %triggerun -- lighttpd
248 %webapp_unregister lighttpd %{_webapp}
251 %defattr(644,root,root,755)
252 %doc readme.html wp-setup.txt
253 %dir %attr(750,root,http) %{_sysconfdir}
254 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
255 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
256 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
257 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/wp-config.php
261 %{_appdir}/wp-includes
262 %dir %{_appdir}/wp-content
263 %dir %{_appdir}/wp-content/languages
264 %lang(et) %{_appdir}/wp-content/languages/et.mo
265 %lang(pl) %{_appdir}/wp-content/languages/pl_PL.mo
266 %dir %{_appdir}/wp-content/plugins
267 %dir %{_appdir}/wp-content/mu-plugins
268 %dir %{_appdir}/wp-content/themes
270 # needed for daily moderation
273 %attr(775,root,http) /var/lib/%{name}
274 %attr(775,root,http) /var/log/%{name}
277 %defattr(644,root,root,755)
278 %attr(755,root,root) %{_bindir}/wp-secure
279 %attr(755,root,root) %{_bindir}/wp-setup
280 %{_appdir}/wp-secure.sh
281 %{_appdir}/wp-setup.sh
283 %files plugin-akismet
284 %defattr(644,root,root,755)
285 %dir %{_appdir}/wp-content/plugins/akismet
286 %doc %{_appdir}/wp-content/plugins/akismet/readme.txt
287 %{_appdir}/wp-content/plugins/akismet/*.php
288 %{_appdir}/wp-content/plugins/akismet/*.gif
290 %files theme-twentyten
291 %defattr(644,root,root,755)
292 %{_appdir}/wp-content/themes/twentyten