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