]> git.pld-linux.org Git - packages/wordpress.git/blame_incremental - wordpress.spec
- relocate blogs.dir to /var/lib/wordpress
[packages/wordpress.git] / wordpress.spec
... / ...
CommitLineData
1# TODO
2# - gettext mo to system dir, add all possible languages?
3# - merge changes from wpmu.spec
4Summary: Personal publishing system
5Summary(pl.UTF-8): Osobisty system publikacji
6Name: wordpress
7Version: 3.0.1
8Release: 0.8
9License: GPL v2
10Group: Applications/Publishing
11Source0: http://wordpress.org/%{name}-%{version}.tar.gz
12# Source0-md5: 8fa5373ed805fb9a6ee56dfd236dcb64
13Source1: wp-secure.sh
14Source2: wp-setup.sh
15Source3: wp-setup.txt
16Source4: apache.conf
17Source5: lighttpd.conf
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
22# MagpieRSS upgrade (version 0.8a) from feedwordpress plugin: http://feedwordpress.radgeek.com/
23Source10: rss.php
24Source11: rss-functions.php
25Patch0: configpath.patch
26Patch1: multisite.patch
27Patch2: %{name}.patch
28URL: http://www.wordpress.org/
29BuildRequires: gettext-devel
30BuildRequires: rpmbuild(macros) >= 1.553
31Requires: php-gettext
32Requires: php-mysql
33Requires: php-pcre
34Requires: php-xml
35Requires: php-xmlrpc
36Requires: webapps
37Requires: webserver(php) >= 5.0
38BuildArch: noarch
39BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40
41%define _appdir %{_datadir}/%{name}
42%define _webapps /etc/webapps
43%define _webapp %{name}
44%define _sysconfdir %{_webapps}/%{_webapp}
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
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
59eleganckiego, dobrze zaprojektowanego, osobistego systemu publikacji
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.
64
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
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
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
109%prep
110%setup -qc
111mv %{name}/* . && rmdir %{name}
112%undos -f php,js,html
113%patch0 -p1
114%patch1 -p1
115cp -a wp-config{-sample,}.php
116%patch2 -p1
117cp -a %{SOURCE3} .
118rm -f license.txt
119
120rm wp-content/themes/index.php
121rm wp-content/plugins/index.php
122rm wp-content/index.php
123
124# sample plugin
125rm wp-content/plugins/hello.php
126
127# Install new MagpieRSS
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
131
132find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
133
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
139%install
140rm -rf $RPM_BUILD_ROOT
141install -d $RPM_BUILD_ROOT{%{_appdir},%{_bindir},%{_sysconfdir},%{_appdir}/wp-content/{languages,mu-plugins},/var/{lib,log}/%{name}}
142
143cp -a . $RPM_BUILD_ROOT%{_appdir}
144mv $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}}/wp-config.php
145rm -f $RPM_BUILD_ROOT%{_appdir}/readme.html
146rm -f $RPM_BUILD_ROOT%{_appdir}/wp-setup.txt
147
148install -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/wp-secure
149install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/wp-setup
150ln -s %{_bindir}/wp-setup $RPM_BUILD_ROOT%{_appdir}/wp-setup.sh
151ln -s %{_bindir}/wp-secure $RPM_BUILD_ROOT%{_appdir}/wp-secure.sh
152
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
156
157%clean
158rm -rf $RPM_BUILD_ROOT
159
160%post
161if [ "$1" = 1 ]; then
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
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
169EOF
170fi
171
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
182%triggerin -- apache1 < 1.3.37-3, apache1-base
183%webapp_register apache %{_webapp}
184
185%triggerin -- lighttpd
186%webapp_register lighttpd %{_webapp}
187
188%triggerun -- apache1 < 1.3.37-3, apache1-base
189%webapp_unregister apache %{_webapp}
190
191%triggerin -- apache < 2.2.0, apache-base
192%webapp_register httpd %{_webapp}
193
194%triggerun -- apache < 2.2.0, apache-base
195%webapp_unregister httpd %{_webapp}
196
197%triggerun -- lighttpd
198%webapp_unregister lighttpd %{_webapp}
199
200%files
201%defattr(644,root,root,755)
202%doc readme.html wp-setup.txt
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
206%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
207%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/wp-config.php
208
209%dir %{_appdir}
210%{_appdir}/*.php
211%{_appdir}/wp-includes
212%dir %{_appdir}/wp-content
213%dir %{_appdir}/wp-content/languages
214%lang(et) %{_appdir}/wp-content/languages/et.mo
215%lang(pl) %{_appdir}/wp-content/languages/pl_PL.mo
216%dir %{_appdir}/wp-content/plugins
217%dir %{_appdir}/wp-content/mu-plugins
218%dir %{_appdir}/wp-content/themes
219
220%attr(775,root,http) /var/lib/%{name}
221%attr(775,root,http) /var/log/%{name}
222
223%files setup
224%defattr(644,root,root,755)
225%attr(755,root,root) %{_bindir}/wp-secure
226%attr(755,root,root) %{_bindir}/wp-setup
227%{_appdir}/wp-secure.sh
228%{_appdir}/wp-setup.sh
229%{_appdir}/wp-admin
230
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
238%files theme-twentyten
239%defattr(644,root,root,755)
240%{_appdir}/wp-content/themes/twentyten
This page took 0.078699 seconds and 4 git commands to generate.