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