2 # - gettext mo to system dir, add all possible languages?
3 # - merge changes from wpmu.spec
4 %define php_min_version 5.2.1
5 Summary: Personal publishing system
6 Summary(pl.UTF-8): Osobisty system publikacji
11 Group: Applications/Publishing
12 Source0: http://wordpress.org/%{name}-%{version}.tar.gz
13 # Source0-md5: 90acae65199db7b33084ef36860d7f22
18 Source5: lighttpd.conf
20 Source6: http://svn.automattic.com/wordpress-i18n/et/tags/3.5/messages/et.po
21 # Source6-md5: e6fbcf1940701ce6f1f91c0ad4ed5a99
22 # no messages under 3.5 tag
23 Source7: http://svn.automattic.com/wordpress-i18n/pl_PL/tags/3.2.1/messages/pl_PL.po
24 # Source7-md5: a0f5d65b7d4e5d53209edc595a19ff49
25 Patch0: configpath.patch
26 Patch1: multisite.patch
28 Patch3: simplepie.patch
29 Patch4: pear-text-diff.patch
30 Patch6: swfobject.patch
31 Patch7: phpmailer.patch
32 URL: http://www.wordpress.org/
33 BuildRequires: gettext-tools
34 BuildRequires: rpm-php-pearprov
35 BuildRequires: rpmbuild(macros) >= 1.553
36 Requires: js-swfobject >= 2.2
37 Requires: php(core) >= %{php_min_version}
40 Requires: php(gettext)
44 Requires: php(mbstring)
48 Requires: php(tokenizer)
50 Requires: php-pear-Text_Diff
51 Requires: php-phpmailer >= 2.0.4
52 Requires: php-simplepie >= 1.2
54 Requires: webserver(php)
56 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
59 %define _noautopear pear
61 %define _noautophp php-ftp php-gd php-openssl php-simplexml
63 # put it together for rpmbuild
64 %define _noautoreq %{?_noautophp} %{?_noautopear}
66 %define _appdir %{_datadir}/%{name}
67 %define _webapps /etc/webapps
68 %define _webapp %{name}
69 %define _sysconfdir %{_webapps}/%{_webapp}
72 WordPress is a state-of-the-art semantic personal publishing platform
73 with a focus on aesthetics, web standards, and usability. WordPress
74 was born out of a desire for an elegant, well-architectured personal
75 publishing system (also called blog or weblog) built on PHP and MySQL
76 and licensed under the GPL. It is the official successor of
77 b2/cafelog. WordPress is fresh software, but its roots and development
80 %description -l pl.UTF-8
81 WordPress jest technologicznie dopracowaną, semantyczną, osobistą
82 platformą do publikacji kładącą nacisk na standardy WWW oraz
83 użyteczność. WordPress został stworzony w wyniku potrzeby
84 eleganckiego, dobrze zaprojektowanego, osobistego systemu publikacji
85 (nazywanego również blogiem czy weblogiem). Jest to system oparty o
86 PHP i MySQL oraz na licencji GPL. Jest oficjalnym następcą b2/cafelog.
87 WordPress jest nowym oprogramowaniem, ale jego korzenie i rozwój
91 Summary: WordPress setup package
92 Summary(pl.UTF-8): Pakiet do wstępnej konfiguracji WordPress
93 Group: Applications/WWW
94 Requires: %{name} = %{version}-%{release}
97 Install this package to configure initial WordPress installation. You
98 should uninstall this package when you're done, as it considered
99 insecure to keep the setup files in place.
101 %description setup -l pl.UTF-8
102 Ten pakiet należy zainstalować w celu wstępnej konfiguracji WordPress
103 po pierwszej instalacji. Potem należy go odinstalować, jako że
104 pozostawienie plików instalacyjnych mogłoby być niebezpieczne.
106 %package plugin-akismet
107 Summary: WordPress Akismet Plugin
108 Group: Applications/WWW
109 Requires: %{name} = %{version}-%{release}
111 %description plugin-akismet
112 Akismet checks your comments against the Akismet web service to see if
113 they look like spam or not and lets you review the spam it catches
114 under your blog's "Comments" admin screen.
116 %package theme-twentyeleven
117 Summary: WordPress Twenty Eleven theme
118 Group: Applications/WWW
119 URL: http://wordpress.org/extend/themes/twentyeleven
120 Requires: %{name} = %{version}-%{release}
122 %description theme-twentyeleven
123 The 2011 theme for WordPress is sophisticated, lightweight, and
126 Make it yours with a custom menu, header image, and background -- then
127 go further with available theme options for light or dark color
128 scheme, custom link colors, and three layout choices. Twenty Eleven
129 comes equipped with a Showcase page template that transforms your
130 front page into a showcase to show off your best content, widget
131 support galore (sidebar, three footer areas, and a Showcase page
132 widget area), and a custom "Ephemera" widget to display your Aside,
133 Link, Quote, or Status posts. Included are styles for print and for
134 the admin editor, support for featured images (as custom header images
135 on posts and pages and as large images on featured "sticky" posts),
136 and special styles for six different post formats.
138 %package theme-twentytwelve
139 Summary: WordPress Twenty Twelve theme
140 Group: Applications/WWW
141 URL: http://wordpress.org/extend/themes/twentytwelve
142 Requires: %{name} = %{version}-%{release}
144 %description theme-twentytwelve
145 The 2012 theme for WordPress is a fully responsive theme that looks
148 Features include a front page template with its own widgets, an
149 optional display font, styling for post formats on both index and
150 single views, and an optional no-sidebar page template. Make it yours
151 with a custom menu, header image, and background.
155 mv %{name}/* . && rmdir %{name}
156 %undos -f php,js,html
159 cp -p wp-config{-sample,}.php
168 %{__rm} wp-content/themes/index.php
169 %{__rm} wp-content/plugins/index.php
170 %{__rm} wp-content/index.php
172 # remove .js/.css with matching minified file
173 find -name '*.min.js' | while read min; do
175 test -e $js && echo $js
178 find -name '*.min.css' | while read min; do
179 css=${min%.min.css}.css
180 test -e $css && echo $css
184 %{__rm} wp-content/plugins/hello.php
187 %{__rm} wp-includes/js/swfobject.js
190 %{__rm} wp-includes/class-simplepie.php
192 # system php-pear-Text_Diff
193 %{__rm} -r wp-includes/Text/Diff*
194 rmdir wp-includes/Text
197 %{__rm} wp-includes/atomlib.php
200 %{__rm} wp-includes/class-phpmailer.php
201 %{__rm} wp-includes/class-smtp.php
203 # php 5.2 + json ext satisfies this compat
204 %{__rm} wp-includes/class-json.php
206 %{__rm} wp-content/plugins/akismet/.htaccess
208 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
211 install -d wp-content/languages
212 msgfmt --statistics %{SOURCE6} -o wp-content/languages/et.mo
213 msgfmt --statistics %{SOURCE7} -o wp-content/languages/pl_PL.mo
216 rm -rf $RPM_BUILD_ROOT
217 install -d $RPM_BUILD_ROOT{%{_appdir},%{_bindir},%{_sysconfdir},%{_appdir}/wp-content/{languages,mu-plugins},/var/{lib,log}/%{name}}
219 cp -a . $RPM_BUILD_ROOT%{_appdir}
220 mv $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}}/wp-config.php
221 rm -f $RPM_BUILD_ROOT%{_appdir}/readme.html
222 rm -f $RPM_BUILD_ROOT%{_appdir}/wp-setup.txt
224 install -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/wp-secure
225 install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/wp-setup
226 ln -s %{_bindir}/wp-setup $RPM_BUILD_ROOT%{_appdir}/wp-setup.sh
227 ln -s %{_bindir}/wp-secure $RPM_BUILD_ROOT%{_appdir}/wp-secure.sh
229 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
230 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
231 cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
234 rm -rf $RPM_BUILD_ROOT
237 if [ "$1" = 1 ]; then
238 %banner -e %{name} <<-EOF
239 To finish your configuration DO NOT FORGET to:
241 1) Create some MySQL database owned by some user
242 2) Edit the file: %{_sysconfdir}/wp-config.php
243 3) Install %{name}-setup
244 4) Run a browser and visit: http://`hostname`/wordpress/wp-admin/install.php
249 chmod 660 %{_sysconfdir}/wp-config.php
250 chown root:http %{_sysconfdir}/wp-config.php
253 if [ "$1" = "0" ]; then
254 chmod 640 %{_sysconfdir}/wp-config.php
255 chown root:http %{_sysconfdir}/wp-config.php
258 %triggerin -- apache1 < 1.3.37-3, apache1-base
259 %webapp_register apache %{_webapp}
261 %triggerin -- lighttpd
262 %webapp_register lighttpd %{_webapp}
264 %triggerun -- apache1 < 1.3.37-3, apache1-base
265 %webapp_unregister apache %{_webapp}
267 %triggerin -- apache < 2.2.0, apache-base
268 %webapp_register httpd %{_webapp}
270 %triggerun -- apache < 2.2.0, apache-base
271 %webapp_unregister httpd %{_webapp}
273 %triggerun -- lighttpd
274 %webapp_unregister lighttpd %{_webapp}
277 %defattr(644,root,root,755)
278 %doc readme.html wp-setup.txt
279 %dir %attr(750,root,http) %{_sysconfdir}
280 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
281 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
282 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
283 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/wp-config.php
287 %{_appdir}/wp-includes
288 %dir %{_appdir}/wp-content
289 %dir %{_appdir}/wp-content/languages
290 %lang(et) %{_appdir}/wp-content/languages/et.mo
291 %lang(pl) %{_appdir}/wp-content/languages/pl_PL.mo
292 %dir %{_appdir}/wp-content/plugins
293 %dir %{_appdir}/wp-content/mu-plugins
294 %dir %{_appdir}/wp-content/themes
296 # needed for daily moderation
299 %attr(775,root,http) /var/lib/%{name}
300 %attr(775,root,http) /var/log/%{name}
303 %defattr(644,root,root,755)
304 %attr(755,root,root) %{_bindir}/wp-secure
305 %attr(755,root,root) %{_bindir}/wp-setup
306 %{_appdir}/wp-secure.sh
307 %{_appdir}/wp-setup.sh
309 %files plugin-akismet
310 %defattr(644,root,root,755)
311 %dir %{_appdir}/wp-content/plugins/akismet
312 %doc %{_appdir}/wp-content/plugins/akismet/readme.txt
313 %{_appdir}/wp-content/plugins/akismet/*.css
314 %{_appdir}/wp-content/plugins/akismet/*.gif
315 %{_appdir}/wp-content/plugins/akismet/*.js
316 %{_appdir}/wp-content/plugins/akismet/*.php
318 %files theme-twentyeleven
319 %defattr(644,root,root,755)
320 %{_appdir}/wp-content/themes/twentyeleven
322 %files theme-twentytwelve
323 %defattr(644,root,root,755)
324 %{_appdir}/wp-content/themes/twentytwelve