]> git.pld-linux.org Git - packages/wordpress.git/blame - wordpress.spec
- use system atomlib
[packages/wordpress.git] / wordpress.spec
CommitLineData
0f7aa528
ER
1# TODO
2# - gettext mo to system dir, add all possible languages?
ec33fe30 3Summary: Personal publishing system
fbfe2ed5 4Summary(pl.UTF-8): Osobisty system publikacji
ec33fe30 5Name: wordpress
9f508cbe 6Version: 2.9.2
7191aabf 7Release: 2
ec33fe30 8License: GPL
9Group: Applications/Publishing
c674f72d 10Source0: http://wordpress.org/%{name}-%{version}.tar.gz
9f508cbe 11# Source0-md5: 6023fe6701476c8152bda5d4c6277c69
54d512d5 12Source1: wp-secure.sh
13Source2: wp-setup.sh
14Source3: wp-setup.txt
c674f72d 15Source4: %{name}-apache.conf
59d447d5 16Source5: %{name}-lighttpd.conf
9f508cbe 17Source6: http://svn.automattic.com/wordpress-i18n/et/tags/2.9/messages/et.mo
9d96fa77 18# Source6-md5: 7a3e3008c58a56e1c8777a9a1b404787
9f508cbe 19Source7: http://svn.automattic.com/wordpress-i18n/pl_PL/tags/2.9/messages/pl_PL.mo
9d96fa77 20# Source7-md5: a68aba62c7301da37ad0e05c1a5ca143
7191aabf 21# MagpieRSS upgrade (version 0.8a) from feedwordpress plugin: http://feedwordpress.radgeek.com/
22Source10: rss.php
23Source11: rss-functions.php
c674f72d 24Patch0: %{name}.patch
ec33fe30 25URL: http://wordpress.org/
9d96fa77 26BuildRequires: rpm-build-macros >= 1.553
c674f72d
ER
27Requires: php-gettext
28Requires: php-mysql
29Requires: php-pcre
30Requires: php-xml
31Requires: php-xmlrpc
3ab985b1 32Requires: webapps
087631da 33Requires: webserver(php) >= 5.0
edeb68e0 34BuildArch: noarch
ec33fe30 35BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
3ab985b1
ER
37%define _appdir %{_datadir}/%{name}
38%define _webapps /etc/webapps
39%define _webapp %{name}
40%define _sysconfdir %{_webapps}/%{_webapp}
ec33fe30 41
42%description
43WordPress is a state-of-the-art semantic personal publishing platform
44with a focus on aesthetics, web standards, and usability. WordPress
45was born out of a desire for an elegant, well-architectured personal
46publishing system (also called blog or weblog) built on PHP and MySQL
47and licensed under the GPL. It is the official successor of
48b2/cafelog. WordPress is fresh software, but its roots and development
49go back to 2001.
50
0677b3c7
JR
51%description -l pl.UTF-8
52WordPress jest technologicznie dopracowaną, semantyczną, osobistą
53platformą do publikacji kładącą nacisk na standardy WWW oraz
54użyteczność. WordPress został stworzony w wyniku potrzeby
ec33fe30 55eleganckiego, dobrze zaprojektowanego, osobistego systemu publikacji
0677b3c7
JR
56(nazywanego również blogiem czy weblogiem). Jest to system oparty o
57PHP i MySQL oraz na licencji GPL. Jest oficjalnym następcą b2/cafelog.
58WordPress jest nowym oprogramowaniem, ale jego korzenie i rozwój
59sięgają 2001 roku.
ec33fe30 60
c674f72d
ER
61%package setup
62Summary: Wordpress setup package
63Summary(pl.UTF-8): Pakiet do wstępnej konfiguracji Wordpress
64Group: Applications/WWW
65Requires: %{name} = %{version}-%{release}
66
67%description setup
68Install this package to configure initial WordPress installation. You
69should uninstall this package when you're done, as it considered
70insecure to keep the setup files in place.
71
72%description setup -l pl.UTF-8
73Ten pakiet należy zainstalować w celu wstępnej konfiguracji WordPress
74po pierwszej instalacji. Potem należy go odinstalować, jako że
75pozostawienie plików instalacyjnych mogłoby być niebezpieczne.
76
ec33fe30 77%prep
78%setup -q -n %{name}
c674f72d
ER
79%patch0 -p1
80cp %{SOURCE3} .
3ab985b1 81rm -f license.txt
ec33fe30 82
7191aabf 83# Install new MagpieRSS
84cp %{SOURCE10} wp-includes/rss.php
85cp %{SOURCE11} wp-includes/rss-functions.php
86
9d96fa77 87find '(' -name '*.php' -o -name '*.js' -o -name '*.html' ')' -print0 | xargs -0 %undos
7ccb4aa4 88find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
c674f72d 89
ec33fe30 90%install
91rm -rf $RPM_BUILD_ROOT
f20d6350 92install -d $RPM_BUILD_ROOT{%{_appdir},%{_bindir},%{_sysconfdir},%{_appdir}/wp-content/languages}
ec33fe30 93
c674f72d
ER
94cp -a . $RPM_BUILD_ROOT%{_appdir}
95cp -a wp-config-sample.php $RPM_BUILD_ROOT%{_sysconfdir}/wp-config.php
3ab985b1
ER
96rm -f $RPM_BUILD_ROOT%{_appdir}/readme.html
97rm -f $RPM_BUILD_ROOT%{_appdir}/wp-setup.txt
c674f72d
ER
98
99install %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/wp-secure
100install %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/wp-setup
101ln -s %{_bindir}/wp-setup $RPM_BUILD_ROOT%{_appdir}/wp-setup.sh
102ln -s %{_bindir}/wp-secure $RPM_BUILD_ROOT%{_appdir}/wp-secure.sh
4b140d58 103
3ab985b1
ER
104install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
105install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
ca1cad3e 106install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
0f7aa528
ER
107install %{SOURCE6} $RPM_BUILD_ROOT%{_appdir}/wp-content/languages
108install %{SOURCE7} $RPM_BUILD_ROOT%{_appdir}/wp-content/languages
20ae9c53 109
edeb68e0
JB
110%clean
111rm -rf $RPM_BUILD_ROOT
112
ec33fe30 113%post
c674f72d 114if [ "$1" = 1 ]; then
3ab985b1
ER
115 %banner -e %{name} <<-EOF
116 To finish your configuration DO NOT FORGET to:
117
118 1) Create some MySQL database owned by some user
c674f72d
ER
119 2) Edit the file: %{_sysconfdir}/wp-config.php
120 3) Install %{name}-setup
121 4) Run a browser and visit: http://`hostname`/wordpress/wp-admin/install.php
3ab985b1 122EOF
20ae9c53 123fi
3ab985b1 124
c674f72d
ER
125%post setup
126chmod 660 %{_sysconfdir}/wp-config.php
127chown root:http %{_sysconfdir}/wp-config.php
128
129%postun setup
130if [ "$1" = "0" ]; then
131 chmod 640 %{_sysconfdir}/wp-config.php
132 chown root:http %{_sysconfdir}/wp-config.php
133fi
134
b973cc00 135%triggerin -- apache1 < 1.3.37-3, apache1-base
3ab985b1
ER
136%webapp_register apache %{_webapp}
137
ca1cad3e
RT
138%triggerin -- lighttpd
139%webapp_register lighttpd %{_webapp}
140
b973cc00 141%triggerun -- apache1 < 1.3.37-3, apache1-base
3ab985b1
ER
142%webapp_unregister apache %{_webapp}
143
cda44e30 144%triggerin -- apache < 2.2.0, apache-base
3ab985b1
ER
145%webapp_register httpd %{_webapp}
146
cda44e30 147%triggerun -- apache < 2.2.0, apache-base
3ab985b1
ER
148%webapp_unregister httpd %{_webapp}
149
ca1cad3e
RT
150%triggerun -- lighttpd
151%webapp_unregister lighttpd %{_webapp}
152
ec33fe30 153%files
843f1ee3 154%defattr(644,root,root,755)
155%doc readme.html wp-setup.txt
3ab985b1
ER
156%dir %attr(750,root,http) %{_sysconfdir}
157%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
158%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
ca1cad3e 159%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
c674f72d 160%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/wp-config.php
3ab985b1
ER
161
162%dir %{_appdir}
3ab985b1 163%{_appdir}/*.php
c674f72d
ER
164%{_appdir}/wp-includes
165%{_appdir}/wp-content/index.php
166%dir %{_appdir}/wp-content
167%dir %{_appdir}/wp-content/languages
0f7aa528
ER
168%lang(et) %{_appdir}/wp-content/languages/et.mo
169%lang(pl) %{_appdir}/wp-content/languages/pl_PL.mo
c674f72d
ER
170%dir %{_appdir}/wp-content/plugins
171%{_appdir}/wp-content/plugins/*.php
172%{_appdir}/wp-content/plugins/akismet
173
174%dir %{_appdir}/wp-content/themes
175%{_appdir}/wp-content/themes/classic
176%{_appdir}/wp-content/themes/default
177
178%files setup
179%defattr(644,root,root,755)
022de391 180%attr(755,root,root) %{_bindir}/wp-secure
181%attr(755,root,root) %{_bindir}/wp-setup
c674f72d
ER
182%{_appdir}/wp-secure.sh
183%{_appdir}/wp-setup.sh
184%{_appdir}/wp-admin
This page took 0.155684 seconds and 4 git commands to generate.