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