]> git.pld-linux.org Git - packages/wordpress.git/blob - wordpress.spec
19b97bf09523c7c1ad2d9a1c1ba03c405ee734b0
[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.0.4
10 Release:        1
11 License:        GPL v2
12 Group:          Applications/Publishing
13 Source0:        http://wordpress.org/%{name}-%{version}.tar.gz
14 # Source0-md5:  a455e0834eb2c8994c35acf3c13ddc11
15 Source1:        wp-secure.sh
16 Source2:        wp-setup.sh
17 Source3:        wp-setup.txt
18 Source4:        apache.conf
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
26 Patch2:         %{name}.patch
27 Patch3:         simplepie.patch
28 Patch4:         pear-text-diff.patch
29 Patch5:         atomlib.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}
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-pear-Text_Diff
49 Requires:       php-phpmailer >= 2.0.4
50 Requires:       php-simplepie >= 1.2
51 Requires:       php-spl
52 Requires:       php-tokenizer
53 Requires:       php-xml
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-twentyten
118 Summary:        Wordpress MU default theme
119 Group:          Applications/WWW
120 URL:            http://wordpress.org/extend/themes/twentyten
121 Requires:       %{name} = %{version}-%{release}
122
123 %description theme-twentyten
124 The 2010 theme for WordPress is stylish, customizable, simple, and
125 readable.
126
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.
134
135 %prep
136 %setup -qc
137 mv %{name}/* . && rmdir %{name}
138 %undos -f php,js,html
139 %patch0 -p1
140 %patch1 -p1
141 cp -a wp-config{-sample,}.php
142 %patch2 -p1
143 %patch3 -p1
144 %patch4 -p1
145 %patch5 -p1
146 %patch6 -p1
147 %patch7 -p1
148 cp -a %{SOURCE3} .
149
150 rm license.txt
151 rm wp-content/themes/index.php
152 rm wp-content/plugins/index.php
153 rm wp-content/index.php
154
155 # remove *.dev js/.css
156 find -name *.dev.js | xargs rm -v
157 find -name *.dev.css | xargs rm -v
158
159 # sample plugin
160 rm wp-content/plugins/hello.php
161
162 # system swfobject
163 rm wp-includes/js/swfobject.js
164
165 # system simplepie
166 rm wp-includes/class-simplepie.php
167
168 # system php-pear-Text_Diff
169 rm -r wp-includes/Text/Diff*
170 rmdir wp-includes/Text
171
172 # system atomlib
173 rm wp-includes/atomlib.php
174
175 # system phpmailer
176 rm wp-includes/class-phpmailer.php
177 rm wp-includes/class-smtp.php
178
179 # php 5.2 + json ext satisfies this compat
180 rm wp-includes/class-json.php
181
182 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
183
184 %build
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
188
189 %install
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}}
192
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
197
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
202
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
206
207 %clean
208 rm -rf $RPM_BUILD_ROOT
209
210 %post
211 if [ "$1" = 1 ]; then
212         %banner -e %{name} <<-EOF
213         To finish your configuration DO NOT FORGET to:
214
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
219 EOF
220 fi
221
222 %post setup
223 chmod 660 %{_sysconfdir}/wp-config.php
224 chown root:http %{_sysconfdir}/wp-config.php
225
226 %postun setup
227 if [ "$1" = "0" ]; then
228         chmod 640 %{_sysconfdir}/wp-config.php
229         chown root:http %{_sysconfdir}/wp-config.php
230 fi
231
232 %triggerin -- apache1 < 1.3.37-3, apache1-base
233 %webapp_register apache %{_webapp}
234
235 %triggerin -- lighttpd
236 %webapp_register lighttpd %{_webapp}
237
238 %triggerun -- apache1 < 1.3.37-3, apache1-base
239 %webapp_unregister apache %{_webapp}
240
241 %triggerin -- apache < 2.2.0, apache-base
242 %webapp_register httpd %{_webapp}
243
244 %triggerun -- apache < 2.2.0, apache-base
245 %webapp_unregister httpd %{_webapp}
246
247 %triggerun -- lighttpd
248 %webapp_unregister lighttpd %{_webapp}
249
250 %files
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
258
259 %dir %{_appdir}
260 %{_appdir}/*.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
269
270 # needed for daily moderation
271 %{_appdir}/wp-admin
272
273 %attr(775,root,http) /var/lib/%{name}
274 %attr(775,root,http) /var/log/%{name}
275
276 %files setup
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
282
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
289
290 %files theme-twentyten
291 %defattr(644,root,root,755)
292 %{_appdir}/wp-content/themes/twentyten
This page took 0.123418 seconds and 3 git commands to generate.