2 # - gettext mo to system dir, add all possible languages?
3 # - merge changes from wpmu.spec
4 Summary: Personal publishing system
5 Summary(pl.UTF-8): Osobisty system publikacji
10 Group: Applications/Publishing
11 Source0: http://wordpress.org/%{name}-%{version}.tar.gz
12 # Source0-md5: 8fa5373ed805fb9a6ee56dfd236dcb64
16 Source4: %{name}-apache.conf
17 Source5: %{name}-lighttpd.conf
18 Source6: http://svn.automattic.com/wordpress-i18n/et/tags/%{version}/messages/et.po
19 # Source6-md5: 7ee698806091573a534a4889f88d6d97
20 Source7: http://svn.automattic.com/wordpress-i18n/pl_PL/tags/%{version}/messages/pl_PL.po
21 # Source7-md5: 795864c6eeeadcc74b8ea70d45f22e9f
22 # MagpieRSS upgrade (version 0.8a) from feedwordpress plugin: http://feedwordpress.radgeek.com/
24 Source11: rss-functions.php
26 URL: http://www.wordpress.org/
27 BuildRequires: gettext-devel
28 BuildRequires: rpmbuild(macros) >= 1.553
35 Requires: webserver(php) >= 5.0
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 %define _appdir %{_datadir}/%{name}
40 %define _webapps /etc/webapps
41 %define _webapp %{name}
42 %define _sysconfdir %{_webapps}/%{_webapp}
45 WordPress is a state-of-the-art semantic personal publishing platform
46 with a focus on aesthetics, web standards, and usability. WordPress
47 was born out of a desire for an elegant, well-architectured personal
48 publishing system (also called blog or weblog) built on PHP and MySQL
49 and licensed under the GPL. It is the official successor of
50 b2/cafelog. WordPress is fresh software, but its roots and development
53 %description -l pl.UTF-8
54 WordPress jest technologicznie dopracowaną, semantyczną, osobistą
55 platformą do publikacji kładącą nacisk na standardy WWW oraz
56 użyteczność. WordPress został stworzony w wyniku potrzeby
57 eleganckiego, dobrze zaprojektowanego, osobistego systemu publikacji
58 (nazywanego również blogiem czy weblogiem). Jest to system oparty o
59 PHP i MySQL oraz na licencji GPL. Jest oficjalnym następcą b2/cafelog.
60 WordPress jest nowym oprogramowaniem, ale jego korzenie i rozwój
64 Summary: Wordpress setup package
65 Summary(pl.UTF-8): Pakiet do wstępnej konfiguracji Wordpress
66 Group: Applications/WWW
67 Requires: %{name} = %{version}-%{release}
70 Install this package to configure initial WordPress installation. You
71 should uninstall this package when you're done, as it considered
72 insecure to keep the setup files in place.
74 %description setup -l pl.UTF-8
75 Ten pakiet należy zainstalować w celu wstępnej konfiguracji WordPress
76 po pierwszej instalacji. Potem należy go odinstalować, jako że
77 pozostawienie plików instalacyjnych mogłoby być niebezpieczne.
81 mv %{name}/* . && rmdir %{name}
83 cp -a wp-config{-sample,}.php
88 rm wp-content/themes/index.php
89 rm wp-content/plugins/index.php
90 rm wp-content/index.php
92 # Install new MagpieRSS
93 # NOTE: this is deprecated, simplepie should be used instead
94 cp -a %{SOURCE10} wp-includes/rss.php
95 cp -a %{SOURCE11} wp-includes/rss-functions.php
97 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
100 install -d wp-content/languages
101 msgfmt --statistics %{SOURCE6} -o wp-content/languages/et.mo
102 msgfmt --statistics %{SOURCE7} -o wp-content/languages/pl_PL.mo
105 rm -rf $RPM_BUILD_ROOT
106 install -d $RPM_BUILD_ROOT{%{_appdir},%{_bindir},%{_sysconfdir},%{_appdir}/wp-content/languages}
108 cp -a . $RPM_BUILD_ROOT%{_appdir}
109 mv $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}}/wp-config.php
110 rm -f $RPM_BUILD_ROOT%{_appdir}/readme.html
111 rm -f $RPM_BUILD_ROOT%{_appdir}/wp-setup.txt
113 install -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/wp-secure
114 install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/wp-setup
115 ln -s %{_bindir}/wp-setup $RPM_BUILD_ROOT%{_appdir}/wp-setup.sh
116 ln -s %{_bindir}/wp-secure $RPM_BUILD_ROOT%{_appdir}/wp-secure.sh
118 cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
119 cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
120 cp -a %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
123 rm -rf $RPM_BUILD_ROOT
126 if [ "$1" = 1 ]; then
127 %banner -e %{name} <<-EOF
128 To finish your configuration DO NOT FORGET to:
130 1) Create some MySQL database owned by some user
131 2) Edit the file: %{_sysconfdir}/wp-config.php
132 3) Install %{name}-setup
133 4) Run a browser and visit: http://`hostname`/wordpress/wp-admin/install.php
138 chmod 660 %{_sysconfdir}/wp-config.php
139 chown root:http %{_sysconfdir}/wp-config.php
142 if [ "$1" = "0" ]; then
143 chmod 640 %{_sysconfdir}/wp-config.php
144 chown root:http %{_sysconfdir}/wp-config.php
147 %triggerin -- apache1 < 1.3.37-3, apache1-base
148 %webapp_register apache %{_webapp}
150 %triggerin -- lighttpd
151 %webapp_register lighttpd %{_webapp}
153 %triggerun -- apache1 < 1.3.37-3, apache1-base
154 %webapp_unregister apache %{_webapp}
156 %triggerin -- apache < 2.2.0, apache-base
157 %webapp_register httpd %{_webapp}
159 %triggerun -- apache < 2.2.0, apache-base
160 %webapp_unregister httpd %{_webapp}
162 %triggerun -- lighttpd
163 %webapp_unregister lighttpd %{_webapp}
166 %defattr(644,root,root,755)
167 %doc readme.html wp-setup.txt
168 %dir %attr(750,root,http) %{_sysconfdir}
169 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
170 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
171 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
172 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/wp-config.php
176 %{_appdir}/wp-includes
177 %dir %{_appdir}/wp-content
178 %dir %{_appdir}/wp-content/languages
179 %lang(et) %{_appdir}/wp-content/languages/et.mo
180 %lang(pl) %{_appdir}/wp-content/languages/pl_PL.mo
181 %dir %{_appdir}/wp-content/plugins
182 %{_appdir}/wp-content/plugins/*.php
183 %{_appdir}/wp-content/plugins/akismet
185 %dir %{_appdir}/wp-content/themes
186 %{_appdir}/wp-content/themes/twentyten
189 %defattr(644,root,root,755)
190 %attr(755,root,root) %{_bindir}/wp-secure
191 %attr(755,root,root) %{_bindir}/wp-setup
192 %{_appdir}/wp-secure.sh
193 %{_appdir}/wp-setup.sh