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