]> git.pld-linux.org Git - packages/wordpress.git/blame - wordpress.spec
- add rewrite rules (old change)
[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
ed53548e 8Release: 0.5
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
c674f72d 25Patch0: %{name}.patch
ed53548e 26Patch1: configpath.patch
7f9b628a
ER
27URL: http://www.wordpress.org/
28BuildRequires: gettext-devel
29BuildRequires: rpmbuild(macros) >= 1.553
c674f72d
ER
30Requires: php-gettext
31Requires: php-mysql
32Requires: php-pcre
33Requires: php-xml
34Requires: php-xmlrpc
3ab985b1 35Requires: webapps
087631da 36Requires: webserver(php) >= 5.0
edeb68e0 37BuildArch: noarch
ec33fe30 38BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
3ab985b1
ER
40%define _appdir %{_datadir}/%{name}
41%define _webapps /etc/webapps
42%define _webapp %{name}
43%define _sysconfdir %{_webapps}/%{_webapp}
ec33fe30 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
0677b3c7
JR
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
ec33fe30 58eleganckiego, dobrze zaprojektowanego, osobistego systemu publikacji
0677b3c7
JR
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.
ec33fe30 63
c674f72d
ER
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
ed53548e
ER
80%package theme-twentyten
81Summary: Wordpress MU default theme
82Group: Applications/WWW
83URL: http://wordpress.org/extend/themes/twentyten
84Requires: %{name} = %{version}-%{release}
85
86%description theme-twentyten
87The 2010 theme for WordPress is stylish, customizable, simple, and
88readable.
89
90Make it yours with a custom menu, header image, and background. Twenty
91Ten supports six widgetized areas (two in the sidebar, four in the
92footer) and featured images (thumbnails for gallery posts and custom
93header images for posts and pages). It includes stylesheets for print
94and the admin Visual Editor, special styles for posts in the "Asides"
95and "Gallery" categories, and has an optional one-column page template
96that removes the sidebar.
97
ec33fe30 98%prep
7f9b628a
ER
99%setup -qc
100mv %{name}/* . && rmdir %{name}
bbcdc79a
ER
101%undos -f php,js,html
102cp -a wp-config{-sample,}.php
c674f72d 103%patch0 -p1
ed53548e 104%patch1 -p1
7f9b628a 105cp -a %{SOURCE3} .
3ab985b1 106rm -f license.txt
ec33fe30 107
7f9b628a
ER
108rm wp-content/themes/index.php
109rm wp-content/plugins/index.php
110rm wp-content/index.php
111
7191aabf 112# Install new MagpieRSS
7f9b628a
ER
113# NOTE: this is deprecated, simplepie should be used instead
114cp -a %{SOURCE10} wp-includes/rss.php
115cp -a %{SOURCE11} wp-includes/rss-functions.php
7191aabf 116
7ccb4aa4 117find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
c674f72d 118
7f9b628a
ER
119%build
120install -d wp-content/languages
121msgfmt --statistics %{SOURCE6} -o wp-content/languages/et.mo
122msgfmt --statistics %{SOURCE7} -o wp-content/languages/pl_PL.mo
123
ec33fe30 124%install
125rm -rf $RPM_BUILD_ROOT
82c8bcde 126install -d $RPM_BUILD_ROOT{%{_appdir},%{_bindir},%{_sysconfdir},%{_appdir}/wp-content/{languages,mu-plugins}}
ec33fe30 127
c674f72d 128cp -a . $RPM_BUILD_ROOT%{_appdir}
bbcdc79a 129mv $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}}/wp-config.php
3ab985b1
ER
130rm -f $RPM_BUILD_ROOT%{_appdir}/readme.html
131rm -f $RPM_BUILD_ROOT%{_appdir}/wp-setup.txt
c674f72d 132
7f9b628a
ER
133install -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/wp-secure
134install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/wp-setup
c674f72d
ER
135ln -s %{_bindir}/wp-setup $RPM_BUILD_ROOT%{_appdir}/wp-setup.sh
136ln -s %{_bindir}/wp-secure $RPM_BUILD_ROOT%{_appdir}/wp-secure.sh
4b140d58 137
7f9b628a
ER
138cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
139cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
140cp -a %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
20ae9c53 141
edeb68e0
JB
142%clean
143rm -rf $RPM_BUILD_ROOT
144
ec33fe30 145%post
c674f72d 146if [ "$1" = 1 ]; then
3ab985b1
ER
147 %banner -e %{name} <<-EOF
148 To finish your configuration DO NOT FORGET to:
149
150 1) Create some MySQL database owned by some user
c674f72d
ER
151 2) Edit the file: %{_sysconfdir}/wp-config.php
152 3) Install %{name}-setup
153 4) Run a browser and visit: http://`hostname`/wordpress/wp-admin/install.php
3ab985b1 154EOF
20ae9c53 155fi
3ab985b1 156
c674f72d
ER
157%post setup
158chmod 660 %{_sysconfdir}/wp-config.php
159chown root:http %{_sysconfdir}/wp-config.php
160
161%postun setup
162if [ "$1" = "0" ]; then
163 chmod 640 %{_sysconfdir}/wp-config.php
164 chown root:http %{_sysconfdir}/wp-config.php
165fi
166
b973cc00 167%triggerin -- apache1 < 1.3.37-3, apache1-base
3ab985b1
ER
168%webapp_register apache %{_webapp}
169
ca1cad3e
RT
170%triggerin -- lighttpd
171%webapp_register lighttpd %{_webapp}
172
b973cc00 173%triggerun -- apache1 < 1.3.37-3, apache1-base
3ab985b1
ER
174%webapp_unregister apache %{_webapp}
175
cda44e30 176%triggerin -- apache < 2.2.0, apache-base
3ab985b1
ER
177%webapp_register httpd %{_webapp}
178
cda44e30 179%triggerun -- apache < 2.2.0, apache-base
3ab985b1
ER
180%webapp_unregister httpd %{_webapp}
181
ca1cad3e
RT
182%triggerun -- lighttpd
183%webapp_unregister lighttpd %{_webapp}
184
ec33fe30 185%files
843f1ee3 186%defattr(644,root,root,755)
187%doc readme.html wp-setup.txt
3ab985b1
ER
188%dir %attr(750,root,http) %{_sysconfdir}
189%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
190%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
ca1cad3e 191%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
c674f72d 192%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/wp-config.php
3ab985b1
ER
193
194%dir %{_appdir}
3ab985b1 195%{_appdir}/*.php
c674f72d 196%{_appdir}/wp-includes
c674f72d
ER
197%dir %{_appdir}/wp-content
198%dir %{_appdir}/wp-content/languages
0f7aa528
ER
199%lang(et) %{_appdir}/wp-content/languages/et.mo
200%lang(pl) %{_appdir}/wp-content/languages/pl_PL.mo
c674f72d 201%dir %{_appdir}/wp-content/plugins
82c8bcde 202%dir %{_appdir}/wp-content/mu-plugins
c674f72d
ER
203%{_appdir}/wp-content/plugins/*.php
204%{_appdir}/wp-content/plugins/akismet
205
206%dir %{_appdir}/wp-content/themes
c674f72d
ER
207
208%files setup
209%defattr(644,root,root,755)
022de391 210%attr(755,root,root) %{_bindir}/wp-secure
211%attr(755,root,root) %{_bindir}/wp-setup
c674f72d
ER
212%{_appdir}/wp-secure.sh
213%{_appdir}/wp-setup.sh
214%{_appdir}/wp-admin
ed53548e
ER
215
216%files theme-twentyten
217%defattr(644,root,root,755)
218%{_appdir}/wp-content/themes/twentyten
This page took 0.101043 seconds and 4 git commands to generate.