]> git.pld-linux.org Git - packages/wordpress.git/blob - wordpress.spec
- release 2 (by relup.sh)
[packages/wordpress.git] / wordpress.spec
1 # TODO
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
8 Name:           wordpress
9 Version:        3.5.2
10 Release:        2
11 License:        GPL v2
12 Group:          Applications/Publishing
13 Source0:        http://wordpress.org/%{name}-%{version}.tar.gz
14 # Source0-md5:  90acae65199db7b33084ef36860d7f22
15 Source1:        wp-secure.sh
16 Source2:        wp-setup.sh
17 Source3:        wp-setup.txt
18 Source4:        apache.conf
19 Source5:        lighttpd.conf
20 # no 3.5.1 tag
21 Source6:        http://svn.automattic.com/wordpress-i18n/et/tags/3.5/messages/et.po
22 # Source6-md5:  e6fbcf1940701ce6f1f91c0ad4ed5a99
23 # no messages under 3.5 tag
24 Source7:        http://svn.automattic.com/wordpress-i18n/pl_PL/tags/3.2.1/messages/pl_PL.po
25 # Source7-md5:  a0f5d65b7d4e5d53209edc595a19ff49
26 Patch0:         configpath.patch
27 Patch1:         multisite.patch
28 Patch2:         %{name}.patch
29 Patch3:         simplepie.patch
30 Patch4:         pear-text-diff.patch
31 Patch6:         swfobject.patch
32 Patch7:         phpmailer.patch
33 URL:            http://www.wordpress.org/
34 BuildRequires:  gettext-devel
35 BuildRequires:  rpm-php-pearprov
36 BuildRequires:  rpmbuild(macros) >= 1.553
37 Requires:       js-swfobject >= 2.2
38 Requires:       php(core) >= %{php_min_version}
39 Requires:       php(date)
40 Requires:       php(dom)
41 Requires:       php(gettext)
42 Requires:       php(hash)
43 Requires:       php(iconv)
44 Requires:       php(json)
45 Requires:       php(mbstring)
46 Requires:       php(mysql)
47 Requires:       php(pcre)
48 Requires:       php(spl)
49 Requires:       php(tokenizer)
50 Requires:       php(xml)
51 Requires:       php-pear-Text_Diff
52 Requires:       php-phpmailer >= 2.0.4
53 Requires:       php-simplepie >= 1.2
54 Requires:       webapps
55 Requires:       webserver(php)
56 BuildArch:      noarch
57 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
58
59 # no pear deps
60 %define         _noautopear     pear
61
62 %define         _noautophp      php-ftp php-gd php-openssl php-simplexml
63
64 # put it together for rpmbuild
65 %define         _noautoreq      %{?_noautophp} %{?_noautopear}
66
67 %define         _appdir         %{_datadir}/%{name}
68 %define         _webapps        /etc/webapps
69 %define         _webapp         %{name}
70 %define         _sysconfdir     %{_webapps}/%{_webapp}
71
72 %description
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
79 go back to 2001.
80
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
89 sięgają 2001 roku.
90
91 %package setup
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}
96
97 %description setup
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.
101
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.
106
107 %package plugin-akismet
108 Summary:        WordPress Akismet Plugin
109 Group:          Applications/WWW
110 Requires:       %{name} = %{version}-%{release}
111
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.
116
117 %package theme-twentyeleven
118 Summary:        WordPress Twenty Eleven theme
119 Group:          Applications/WWW
120 URL:            http://wordpress.org/extend/themes/twentyeleven
121 Requires:       %{name} = %{version}-%{release}
122
123 %description theme-twentyeleven
124 The 2011 theme for WordPress is sophisticated, lightweight, and
125 adaptable.
126
127 Make it yours with a custom menu, header image, and background -- then
128 go further with available theme options for light or dark color
129 scheme, custom link colors, and three layout choices. Twenty Eleven
130 comes equipped with a Showcase page template that transforms your
131 front page into a showcase to show off your best content, widget
132 support galore (sidebar, three footer areas, and a Showcase page
133 widget area), and a custom "Ephemera" widget to display your Aside,
134 Link, Quote, or Status posts. Included are styles for print and for
135 the admin editor, support for featured images (as custom header images
136 on posts and pages and as large images on featured "sticky" posts),
137 and special styles for six different post formats.
138
139 %package theme-twentytwelve
140 Summary:        WordPress Twenty Twelve theme
141 Group:          Applications/WWW
142 URL:            http://wordpress.org/extend/themes/twentytwelve
143 Requires:       %{name} = %{version}-%{release}
144
145 %description theme-twentytwelve
146 The 2012 theme for WordPress is a fully responsive theme that looks
147 great on any device.
148
149 Features include a front page template with its own widgets, an
150 optional display font, styling for post formats on both index and
151 single views, and an optional no-sidebar page template. Make it yours
152 with a custom menu, header image, and background.
153
154 %prep
155 %setup -qc
156 mv %{name}/* . && rmdir %{name}
157 %undos -f php,js,html
158 %patch0 -p1
159 %patch1 -p1
160 cp -p wp-config{-sample,}.php
161 %patch2 -p1
162 %patch3 -p1
163 %patch4 -p1
164 %patch6 -p1
165 %patch7 -p1
166 cp -p %{SOURCE3} .
167
168 %{__rm} license.txt
169 %{__rm} wp-content/themes/index.php
170 %{__rm} wp-content/plugins/index.php
171 %{__rm} wp-content/index.php
172
173 # remove .js/.css with matching minified file
174 find -name '*.min.js' | while read min; do
175         js=${min%.min.js}.js
176         test -e $js && echo $js
177 done | xargs rm -v
178
179 find -name '*.min.css' | while read min; do
180         css=${min%.min.css}.css
181         test -e $css && echo $css
182 done | xargs rm -v
183
184 # sample plugin
185 %{__rm} wp-content/plugins/hello.php
186
187 # system swfobject
188 %{__rm} wp-includes/js/swfobject.js
189
190 # system simplepie
191 %{__rm} wp-includes/class-simplepie.php
192
193 # system php-pear-Text_Diff
194 %{__rm} -r wp-includes/Text/Diff*
195 rmdir wp-includes/Text
196
197 # system atomlib
198 %{__rm} wp-includes/atomlib.php
199
200 # system phpmailer
201 %{__rm} wp-includes/class-phpmailer.php
202 %{__rm} wp-includes/class-smtp.php
203
204 # php 5.2 + json ext satisfies this compat
205 %{__rm} wp-includes/class-json.php
206
207 %{__rm} wp-content/plugins/akismet/.htaccess
208
209 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
210
211 %build
212 install -d wp-content/languages
213 msgfmt --statistics %{SOURCE6} -o wp-content/languages/et.mo
214 msgfmt --statistics %{SOURCE7} -o wp-content/languages/pl_PL.mo
215
216 %install
217 rm -rf $RPM_BUILD_ROOT
218 install -d $RPM_BUILD_ROOT{%{_appdir},%{_bindir},%{_sysconfdir},%{_appdir}/wp-content/{languages,mu-plugins},/var/{lib,log}/%{name}}
219
220 cp -a . $RPM_BUILD_ROOT%{_appdir}
221 mv $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}}/wp-config.php
222 rm -f $RPM_BUILD_ROOT%{_appdir}/readme.html
223 rm -f $RPM_BUILD_ROOT%{_appdir}/wp-setup.txt
224
225 install -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/wp-secure
226 install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/wp-setup
227 ln -s %{_bindir}/wp-setup $RPM_BUILD_ROOT%{_appdir}/wp-setup.sh
228 ln -s %{_bindir}/wp-secure $RPM_BUILD_ROOT%{_appdir}/wp-secure.sh
229
230 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
231 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
232 cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
233
234 %clean
235 rm -rf $RPM_BUILD_ROOT
236
237 %post
238 if [ "$1" = 1 ]; then
239         %banner -e %{name} <<-EOF
240         To finish your configuration DO NOT FORGET to:
241
242         1) Create some MySQL database owned by some user
243         2) Edit the file: %{_sysconfdir}/wp-config.php
244         3) Install %{name}-setup
245         4) Run a browser and visit: http://`hostname`/wordpress/wp-admin/install.php
246 EOF
247 fi
248
249 %post setup
250 chmod 660 %{_sysconfdir}/wp-config.php
251 chown root:http %{_sysconfdir}/wp-config.php
252
253 %postun setup
254 if [ "$1" = "0" ]; then
255         chmod 640 %{_sysconfdir}/wp-config.php
256         chown root:http %{_sysconfdir}/wp-config.php
257 fi
258
259 %triggerin -- apache1 < 1.3.37-3, apache1-base
260 %webapp_register apache %{_webapp}
261
262 %triggerin -- lighttpd
263 %webapp_register lighttpd %{_webapp}
264
265 %triggerun -- apache1 < 1.3.37-3, apache1-base
266 %webapp_unregister apache %{_webapp}
267
268 %triggerin -- apache < 2.2.0, apache-base
269 %webapp_register httpd %{_webapp}
270
271 %triggerun -- apache < 2.2.0, apache-base
272 %webapp_unregister httpd %{_webapp}
273
274 %triggerun -- lighttpd
275 %webapp_unregister lighttpd %{_webapp}
276
277 %files
278 %defattr(644,root,root,755)
279 %doc readme.html wp-setup.txt
280 %dir %attr(750,root,http) %{_sysconfdir}
281 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
282 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
283 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
284 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/wp-config.php
285
286 %dir %{_appdir}
287 %{_appdir}/*.php
288 %{_appdir}/wp-includes
289 %dir %{_appdir}/wp-content
290 %dir %{_appdir}/wp-content/languages
291 %lang(et) %{_appdir}/wp-content/languages/et.mo
292 %lang(pl) %{_appdir}/wp-content/languages/pl_PL.mo
293 %dir %{_appdir}/wp-content/plugins
294 %dir %{_appdir}/wp-content/mu-plugins
295 %dir %{_appdir}/wp-content/themes
296
297 # needed for daily moderation
298 %{_appdir}/wp-admin
299
300 %attr(775,root,http) /var/lib/%{name}
301 %attr(775,root,http) /var/log/%{name}
302
303 %files setup
304 %defattr(644,root,root,755)
305 %attr(755,root,root) %{_bindir}/wp-secure
306 %attr(755,root,root) %{_bindir}/wp-setup
307 %{_appdir}/wp-secure.sh
308 %{_appdir}/wp-setup.sh
309
310 %files plugin-akismet
311 %defattr(644,root,root,755)
312 %dir %{_appdir}/wp-content/plugins/akismet
313 %doc %{_appdir}/wp-content/plugins/akismet/readme.txt
314 %{_appdir}/wp-content/plugins/akismet/*.css
315 %{_appdir}/wp-content/plugins/akismet/*.gif
316 %{_appdir}/wp-content/plugins/akismet/*.js
317 %{_appdir}/wp-content/plugins/akismet/*.php
318
319 %files theme-twentyeleven
320 %defattr(644,root,root,755)
321 %{_appdir}/wp-content/themes/twentyeleven
322
323 %files theme-twentytwelve
324 %defattr(644,root,root,755)
325 %{_appdir}/wp-content/themes/twentytwelve
This page took 0.073088 seconds and 3 git commands to generate.