2 # - put config files to %{_sysconfdir}!
3 # - switch to versioned url: ftp://ftp.openpkg.org/sources/CPY/VERSIONED/00README
4 Summary: Personal publishing system
5 Summary(pl.UTF-8): Osobisty system publikacji
10 Group: Applications/Publishing
11 Source0: http://wordpress.org/latest.tar.gz
12 # Source0-md5: 36ffea2a049a071342efda985feedf31
17 Source5: %{name}-lighttpd.conf
18 URL: http://wordpress.org/
19 Requires: php(gettext)
25 Requires: webserver(php) >= 5.0
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 %define _appdir %{_datadir}/%{name}
30 %define _webapps /etc/webapps
31 %define _webapp %{name}
32 %define _sysconfdir %{_webapps}/%{_webapp}
35 WordPress is a state-of-the-art semantic personal publishing platform
36 with a focus on aesthetics, web standards, and usability. WordPress
37 was born out of a desire for an elegant, well-architectured personal
38 publishing system (also called blog or weblog) built on PHP and MySQL
39 and licensed under the GPL. It is the official successor of
40 b2/cafelog. WordPress is fresh software, but its roots and development
43 %description -l pl.UTF-8
44 WordPress jest technologicznie dopracowaną, semantyczną, osobistą
45 platformą do publikacji kładącą nacisk na standardy WWW oraz
46 użyteczność. WordPress został stworzony w wyniku potrzeby
47 eleganckiego, dobrze zaprojektowanego, osobistego systemu publikacji
48 (nazywanego również blogiem czy weblogiem). Jest to system oparty o
49 PHP i MySQL oraz na licencji GPL. Jest oficjalnym następcą b2/cafelog.
50 WordPress jest nowym oprogramowaniem, ale jego korzenie i rozwój
55 cp %{SOURCE1} %{SOURCE2} %{SOURCE3} .
59 rm -rf $RPM_BUILD_ROOT
60 install -d $RPM_BUILD_ROOT{%{_appdir},%{_bindir},%{_sysconfdir}}
62 cp -R * $RPM_BUILD_ROOT%{_appdir}
63 rm -f $RPM_BUILD_ROOT%{_appdir}/readme.html
64 rm -f $RPM_BUILD_ROOT%{_appdir}/wp-setup.txt
65 ln -sf %{_appdir}/wp-setup.sh $RPM_BUILD_ROOT%{_bindir}/wp-setup
66 ln -sf %{_appdir}/wp-secure.sh $RPM_BUILD_ROOT%{_bindir}/wp-secure
68 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
69 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
70 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
73 rm -rf $RPM_BUILD_ROOT
76 if [ ! -f %{_appdir}/wp-config.php ]; then
77 install -uroot -ghttp -m640 %{_appdir}/wp-config-sample.php > %{_appdir}/wp-config.php
79 %banner -e %{name} <<-EOF
80 To finish your configuration DO NOT FORGET to:
82 1) Create some MySQL database owned by some user
83 2) Edit the file: %{_appdir}/wp-config.php
84 3) Run a browser and visit: http://`hostname`/wordpress/wp-admin/install.php
88 %triggerin -- apache1 < 1.3.37-3, apache1-base
89 %webapp_register apache %{_webapp}
91 %triggerin -- lighttpd
92 %webapp_register lighttpd %{_webapp}
94 %triggerun -- apache1 < 1.3.37-3, apache1-base
95 %webapp_unregister apache %{_webapp}
97 %triggerin -- apache < 2.2.0, apache-base
98 %webapp_register httpd %{_webapp}
100 %triggerun -- apache < 2.2.0, apache-base
101 %webapp_unregister httpd %{_webapp}
103 %triggerun -- lighttpd
104 %webapp_unregister lighttpd %{_webapp}
107 %defattr(644,root,root,755)
108 %doc readme.html wp-setup.txt
109 %dir %attr(750,root,http) %{_sysconfdir}
110 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
111 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
112 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
115 %dir %attr(750,root,http) %{_appdir}/wp-content
116 %dir %attr(750,root,http) %{_appdir}/wp-content/plugins
117 %dir %attr(750,root,http) %{_appdir}/wp-content/themes
118 %dir %attr(750,root,http) %{_appdir}/wp-content/themes/classic
119 %dir %attr(750,root,http) %{_appdir}/wp-content/themes/default
120 %dir %attr(750,root,http) %{_appdir}/wp-content/themes/default/images
121 %attr(640,root,http) %{_appdir}/wp-content/plugins/*.php
122 %attr(640,root,http) %{_appdir}/wp-content/plugins/akismet
123 %attr(640,root,http) %{_appdir}/wp-content/themes/classic/*
124 %attr(640,root,http) %{_appdir}/wp-content/themes/default/*.php
125 %attr(640,root,http) %{_appdir}/wp-content/themes/default/*.css
126 %attr(640,root,http) %{_appdir}/wp-content/themes/default/images/*
127 %{_appdir}/wp-content/index.php
128 %{_appdir}/wp-content/themes/default/screenshot.png
130 %{_appdir}/wp-includes
132 %{_appdir}/wp-secure.sh
133 %{_appdir}/wp-setup.sh
134 %attr(755,root,root) %{_bindir}/wp-secure
135 %attr(755,root,root) %{_bindir}/wp-setup