]> git.pld-linux.org Git - packages/wordpress.git/blame - wordpress.spec
- scanned autodeps
[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
b04365ce 9Version: 3.0.1
892232a9 10Release: 0.11
b04365ce 11License: GPL v2
ec33fe30 12Group: Applications/Publishing
c674f72d 13Source0: http://wordpress.org/%{name}-%{version}.tar.gz
b04365ce 14# Source0-md5: 8fa5373ed805fb9a6ee56dfd236dcb64
54d512d5 15Source1: wp-secure.sh
16Source2: wp-setup.sh
17Source3: wp-setup.txt
7890ba25
ER
18Source4: apache.conf
19Source5: lighttpd.conf
0e9a5e64
ER
20Source6: http://svn.automattic.com/wordpress-i18n/et/tags/%{version}/messages/et.po
21# Source6-md5: 7ee698806091573a534a4889f88d6d97
22Source7: http://svn.automattic.com/wordpress-i18n/pl_PL/tags/%{version}/messages/pl_PL.po
23# Source7-md5: 795864c6eeeadcc74b8ea70d45f22e9f
c1fcdc96 24Patch0: configpath.patch
f7f07f8c 25Patch1: multisite.patch
c1fcdc96 26Patch2: %{name}.patch
20f21eaf 27Patch3: simplepie.patch
7f9b628a
ER
28URL: http://www.wordpress.org/
29BuildRequires: gettext-devel
892232a9 30BuildRequires: rpm-php-pearprov
7f9b628a 31BuildRequires: rpmbuild(macros) >= 1.553
892232a9
ER
32Requires: php-common >= 4:%{php_min_version}
33Requires: php-date
34Requires: php-dom
c674f72d 35Requires: php-gettext
892232a9
ER
36Requires: php-hash
37Requires: php-iconv
38Requires: php-json
39Requires: php-mbstring
c674f72d
ER
40Requires: php-mysql
41Requires: php-pcre
20f21eaf 42Requires: php-simplepie >= 1.2
892232a9
ER
43Requires: php-spl
44Requires: php-tokenizer
c674f72d 45Requires: php-xml
3ab985b1 46Requires: webapps
892232a9 47Requires: webserver(php)
edeb68e0 48BuildArch: noarch
ec33fe30 49BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
20f21eaf
ER
51# no pear deps
52%define _noautopear pear
53
892232a9 54%define _noautophp php-ftp php-gd php-openssl php-simplexml
20f21eaf
ER
55
56# put it together for rpmbuild
57%define _noautoreq %{?_noautophp} %{?_noautopear}
58
3ab985b1
ER
59%define _appdir %{_datadir}/%{name}
60%define _webapps /etc/webapps
61%define _webapp %{name}
62%define _sysconfdir %{_webapps}/%{_webapp}
ec33fe30 63
64%description
65WordPress is a state-of-the-art semantic personal publishing platform
66with a focus on aesthetics, web standards, and usability. WordPress
67was born out of a desire for an elegant, well-architectured personal
68publishing system (also called blog or weblog) built on PHP and MySQL
69and licensed under the GPL. It is the official successor of
70b2/cafelog. WordPress is fresh software, but its roots and development
71go back to 2001.
72
0677b3c7
JR
73%description -l pl.UTF-8
74WordPress jest technologicznie dopracowaną, semantyczną, osobistą
75platformą do publikacji kładącą nacisk na standardy WWW oraz
76użyteczność. WordPress został stworzony w wyniku potrzeby
ec33fe30 77eleganckiego, dobrze zaprojektowanego, osobistego systemu publikacji
0677b3c7
JR
78(nazywanego również blogiem czy weblogiem). Jest to system oparty o
79PHP i MySQL oraz na licencji GPL. Jest oficjalnym następcą b2/cafelog.
80WordPress jest nowym oprogramowaniem, ale jego korzenie i rozwój
81sięgają 2001 roku.
ec33fe30 82
c674f72d
ER
83%package setup
84Summary: Wordpress setup package
85Summary(pl.UTF-8): Pakiet do wstępnej konfiguracji Wordpress
86Group: Applications/WWW
87Requires: %{name} = %{version}-%{release}
88
89%description setup
90Install this package to configure initial WordPress installation. You
91should uninstall this package when you're done, as it considered
92insecure to keep the setup files in place.
93
94%description setup -l pl.UTF-8
95Ten pakiet należy zainstalować w celu wstępnej konfiguracji WordPress
96po pierwszej instalacji. Potem należy go odinstalować, jako że
97pozostawienie plików instalacyjnych mogłoby być niebezpieczne.
98
a095fc01
ER
99%package plugin-akismet
100Summary: Wordpress Akismet Plugin
101Group: Applications/WWW
102Requires: %{name} = %{version}-%{release}
103
104%description plugin-akismet
105Akismet checks your comments against the Akismet web service to see if
106they look like spam or not and lets you review the spam it catches
107under your blog's "Comments" admin screen.
108
ed53548e
ER
109%package theme-twentyten
110Summary: Wordpress MU default theme
111Group: Applications/WWW
112URL: http://wordpress.org/extend/themes/twentyten
113Requires: %{name} = %{version}-%{release}
114
115%description theme-twentyten
116The 2010 theme for WordPress is stylish, customizable, simple, and
117readable.
118
119Make it yours with a custom menu, header image, and background. Twenty
120Ten supports six widgetized areas (two in the sidebar, four in the
121footer) and featured images (thumbnails for gallery posts and custom
122header images for posts and pages). It includes stylesheets for print
123and the admin Visual Editor, special styles for posts in the "Asides"
124and "Gallery" categories, and has an optional one-column page template
125that removes the sidebar.
126
ec33fe30 127%prep
7f9b628a
ER
128%setup -qc
129mv %{name}/* . && rmdir %{name}
bbcdc79a 130%undos -f php,js,html
c674f72d 131%patch0 -p1
ed53548e 132%patch1 -p1
c1fcdc96
ER
133cp -a wp-config{-sample,}.php
134%patch2 -p1
7f9b628a 135cp -a %{SOURCE3} .
3ab985b1 136rm -f license.txt
ec33fe30 137
7f9b628a
ER
138rm wp-content/themes/index.php
139rm wp-content/plugins/index.php
140rm wp-content/index.php
141
a095fc01
ER
142# sample plugin
143rm wp-content/plugins/hello.php
144
20f21eaf
ER
145# system simplepie
146rm wp-includes/class-simplepie.php
7191aabf 147
7ccb4aa4 148find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
c674f72d 149
7f9b628a
ER
150%build
151install -d wp-content/languages
152msgfmt --statistics %{SOURCE6} -o wp-content/languages/et.mo
153msgfmt --statistics %{SOURCE7} -o wp-content/languages/pl_PL.mo
154
ec33fe30 155%install
156rm -rf $RPM_BUILD_ROOT
f7f07f8c 157install -d $RPM_BUILD_ROOT{%{_appdir},%{_bindir},%{_sysconfdir},%{_appdir}/wp-content/{languages,mu-plugins},/var/{lib,log}/%{name}}
ec33fe30 158
c674f72d 159cp -a . $RPM_BUILD_ROOT%{_appdir}
bbcdc79a 160mv $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}}/wp-config.php
3ab985b1
ER
161rm -f $RPM_BUILD_ROOT%{_appdir}/readme.html
162rm -f $RPM_BUILD_ROOT%{_appdir}/wp-setup.txt
c674f72d 163
7f9b628a
ER
164install -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/wp-secure
165install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/wp-setup
c674f72d
ER
166ln -s %{_bindir}/wp-setup $RPM_BUILD_ROOT%{_appdir}/wp-setup.sh
167ln -s %{_bindir}/wp-secure $RPM_BUILD_ROOT%{_appdir}/wp-secure.sh
4b140d58 168
7f9b628a
ER
169cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
170cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
171cp -a %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
20ae9c53 172
edeb68e0
JB
173%clean
174rm -rf $RPM_BUILD_ROOT
175
ec33fe30 176%post
c674f72d 177if [ "$1" = 1 ]; then
3ab985b1
ER
178 %banner -e %{name} <<-EOF
179 To finish your configuration DO NOT FORGET to:
180
181 1) Create some MySQL database owned by some user
c674f72d
ER
182 2) Edit the file: %{_sysconfdir}/wp-config.php
183 3) Install %{name}-setup
184 4) Run a browser and visit: http://`hostname`/wordpress/wp-admin/install.php
3ab985b1 185EOF
20ae9c53 186fi
3ab985b1 187
c674f72d
ER
188%post setup
189chmod 660 %{_sysconfdir}/wp-config.php
190chown root:http %{_sysconfdir}/wp-config.php
191
192%postun setup
193if [ "$1" = "0" ]; then
194 chmod 640 %{_sysconfdir}/wp-config.php
195 chown root:http %{_sysconfdir}/wp-config.php
196fi
197
b973cc00 198%triggerin -- apache1 < 1.3.37-3, apache1-base
3ab985b1
ER
199%webapp_register apache %{_webapp}
200
ca1cad3e
RT
201%triggerin -- lighttpd
202%webapp_register lighttpd %{_webapp}
203
b973cc00 204%triggerun -- apache1 < 1.3.37-3, apache1-base
3ab985b1
ER
205%webapp_unregister apache %{_webapp}
206
cda44e30 207%triggerin -- apache < 2.2.0, apache-base
3ab985b1
ER
208%webapp_register httpd %{_webapp}
209
cda44e30 210%triggerun -- apache < 2.2.0, apache-base
3ab985b1
ER
211%webapp_unregister httpd %{_webapp}
212
ca1cad3e
RT
213%triggerun -- lighttpd
214%webapp_unregister lighttpd %{_webapp}
215
ec33fe30 216%files
843f1ee3 217%defattr(644,root,root,755)
218%doc readme.html wp-setup.txt
3ab985b1
ER
219%dir %attr(750,root,http) %{_sysconfdir}
220%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
221%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
ca1cad3e 222%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
c674f72d 223%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/wp-config.php
3ab985b1
ER
224
225%dir %{_appdir}
3ab985b1 226%{_appdir}/*.php
c674f72d 227%{_appdir}/wp-includes
c674f72d
ER
228%dir %{_appdir}/wp-content
229%dir %{_appdir}/wp-content/languages
0f7aa528
ER
230%lang(et) %{_appdir}/wp-content/languages/et.mo
231%lang(pl) %{_appdir}/wp-content/languages/pl_PL.mo
c674f72d 232%dir %{_appdir}/wp-content/plugins
82c8bcde 233%dir %{_appdir}/wp-content/mu-plugins
c674f72d 234%dir %{_appdir}/wp-content/themes
c674f72d 235
20f21eaf
ER
236# needed for daily moderation
237%{_appdir}/wp-admin
238
f7f07f8c
ER
239%attr(775,root,http) /var/lib/%{name}
240%attr(775,root,http) /var/log/%{name}
241
c674f72d
ER
242%files setup
243%defattr(644,root,root,755)
022de391 244%attr(755,root,root) %{_bindir}/wp-secure
245%attr(755,root,root) %{_bindir}/wp-setup
c674f72d
ER
246%{_appdir}/wp-secure.sh
247%{_appdir}/wp-setup.sh
ed53548e 248
a095fc01
ER
249%files plugin-akismet
250%defattr(644,root,root,755)
251%dir %{_appdir}/wp-content/plugins/akismet
252%doc %{_appdir}/wp-content/plugins/akismet/readme.txt
253%{_appdir}/wp-content/plugins/akismet/*.php
254%{_appdir}/wp-content/plugins/akismet/*.gif
255
ed53548e
ER
256%files theme-twentyten
257%defattr(644,root,root,755)
258%{_appdir}/wp-content/themes/twentyten
This page took 0.462178 seconds and 4 git commands to generate.