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