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