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