]> git.pld-linux.org Git - packages/drupal.git/blob - drupal.spec
- add alternative cache patch from http://drupal.org/node/19298
[packages/drupal.git] / drupal.spec
1 Summary:        Open source content management platform
2 Summary(pl):    Platforma do zarz±dzania tre¶ci± o otwartych ¼ród³ach
3 Name:           drupal
4 Version:        4.6.5
5 Release:        0.2
6 License:        GPL
7 Group:          Applications/WWW
8 Source0:        http://drupal.org/files/projects/%{name}-%{version}.tar.gz
9 # Source0-md5:  21e5e768d92fb6ecf52d56cacd37706e
10 Source1:        %{name}.conf
11 Source2:        %{name}.cron
12 Source3:        %{name}.PLD
13 Patch0:         %{name}-replication.patch
14 Patch1:         %{name}-sitesdir.patch
15 Patch2:         %{name}-topdir.patch
16 Patch3:         %{name}-themedir2.patch
17 Patch4:         %{name}-emptypass.patch
18 Patch5:         %{name}-cron.patch
19 Patch6:         %{name}-19298-cache.patch
20 URL:            http://drupal.org/
21 BuildRequires:  rpmbuild(macros) >= 1.264
22 BuildRequires:  sed >= 4.0
23 Requires:       webapps
24 Requires:       webserver = apache
25 Requires:       apache(mod_dir)
26 Requires:       apache(mod_access)
27 Requires:       apache(mod_expires)
28 Requires:       apache(mod_rewrite)
29 Requires:       apache(mod_alias)
30 Requires:       php >= 3:4.3.3
31 Requires:       php-mysql
32 Requires:       php-pcre
33 Requires:       %{name}(DB_Driver) = %{version}-%{release}
34 Requires:       php-xml
35 BuildArch:      noarch
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %define         _appdir         %{_datadir}/%{name}
39 %define         _webapps        /etc/webapps
40 %define         _webapp         %{name}
41 %define         _sysconfdir     %{_webapps}/%{_webapp}
42
43 %description
44 Drupal is software that allows an individual or a community of users
45 to easily publish, manage and organize a great variety of content on a
46 website. Tens of thousands of people and organizations have used
47 Drupal to set up scores of different kinds of web sites, including
48 - community web portals and discussion sites
49 - corporate web sites/intranet portals
50 - personal web sites
51 - afficionado sites
52 - e-commerce applications
53 - resource directories
54
55 Drupal includes features to enable
56 - content management systems
57 - blogs
58 - collaborative authoring environments
59 - forums
60 - newsletters
61 - picture galleries
62 - file uploads and download
63
64 and much more.
65
66 %description -l pl
67 Drupal to oprogramowanie pozwalaj±ce osobie lub spo³eczno¶ci
68 u¿ytkowników na ³atwe publikowanie, zarz±dzanie i organizowanie ró¿nej
69 tre¶ci na stronie WWW. Dziesi±tki tysiêcy ludzi i organizacji u¿ywali
70 Drupala do ustawiania wyników ró¿nych rodzajów stron WWW, w tym:
71 - portale WWW i strony dyskusyjne spo³eczno¶ci
72 - korporacyjne strony WWW/portale intranetowe
73 - osobiste strony WWW
74 - strony mi³o¶ników
75 - aplikacje e-commerce
76 - s³owniki zasobów
77
78 Drupal zawiera zasoby umo¿liwiaj±ce tworzenie:
79 - systemów zarz±dzania tre¶ci±
80 - blogów
81 - ¶rodowisk pracy grupowej
82 - forów
83 - nowin
84 - galerii zdjêæ
85 - wrzucania i ¶ci±gania plików
86
87 i wiele wiêcej.
88
89 %package cron
90 Summary:        Drupal cron
91 Summary(pl):    Us³uga cron dla Drupala
92 Group:          Applications/WWW
93 Requires:       %{name} = %{version}-%{release}
94 Requires:       crondaemon
95 Requires:       php-cli >= 3:4.3.3
96 Requires:       /usr/bin/php
97
98 %description cron
99 This package contains script which invokes cron hooks for Drupal.
100
101 %description cron -l pl
102 Ten pakiet zawiera skrypt wywo³uj±cy uchwyty crona dla Drupala.
103
104 %package db-mysql
105 Summary:        Drupal DB Driver for MySQL
106 Summary(pl):    Sterownik bazy danych MySQL dla Drupala
107 Group:          Applications/WWW
108 Requires:       php-mysql
109 Provides:       %{name}(DB_Driver) = %{version}-%{release}
110
111 %description db-mysql
112 This virtual package provides MySQL database backend for Drupal.
113
114 %description db-mysql -l pl
115 Ten wirtualny pakiet dostarcza backend bazy danych MySQL dla
116 Drupala.
117
118 %package db-pgsql
119 Summary:        Drupal DB Driver for PostgreSQL
120 Summary(pl):    Sterownik bazy danych PostgreSQL dla Drupala
121 Group:          Applications/WWW
122 Requires:       php-pgsql
123 Provides:       %{name}(DB_Driver) = %{version}-%{release}
124
125 %description db-pgsql
126 This virtual package provides PostgreSQL database backend for
127 Drupal.
128
129 NOTE: This driver is not tested in PLD, and not all modules have
130 database schema for PostgreSQL. Use this driver at your own risk!
131
132 %description db-pgsql -l pl
133 Ten wirtualny pakiet dostarcza backend bazy danych PostgreSQL dla
134 Drupala.
135
136 UWAGA: Ten sterownik nie by³ testowany w PLD i nie wszystkie modu³y
137 maj± schematy bazy danych dla PostgreSQL-a. Mo¿na go u¿ywaæ na w³asne
138 ryzyko.
139
140 %package xmlrpc
141 Summary:        XMLRPC server for Drupal
142 Summary(pl):    Serwer XMLRPC dla Drupala
143 Group:          Applications/WWW
144 Requires:       %{name} = %{version}-%{release}
145
146 %description xmlrpc
147 XMLRPC server for Drupal allows other Drupals authorize with your
148 Drupal's user creditentials, this is called Distributed Authentication
149 in Drupal world.
150
151 %description xmlrpc -l pl
152 Serwer XMLRPC dla Drupala pozwala innym Drupalom autoryzowaæ siê z
153 danymi uwierzytelniaj±cymi u¿ytkownika danego Drupala - jest to
154 nazywane rozproszonym uwierzytelnianiem.
155
156 %prep
157 %setup -q
158 %patch0 -p1
159 %patch1 -p1
160 %patch2 -p1
161 %patch3 -p1
162 %patch4 -p1
163 %patch5 -p1
164 %patch6 -p0
165
166 find -name '*~' | xargs -r rm -v
167 cp -p %{SOURCE3} README.PLD
168
169 %install
170 rm -rf $RPM_BUILD_ROOT
171 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/cron.d,/var/{cache,lib}/%{name}} \
172         $RPM_BUILD_ROOT%{_appdir}/{po,modules/po,htdocs/modules}
173
174 cp -a *.ico index.php $RPM_BUILD_ROOT%{_appdir}/htdocs
175 cp -a misc $RPM_BUILD_ROOT%{_appdir}/htdocs
176 cp -a xmlrpc.php $RPM_BUILD_ROOT%{_appdir}/htdocs
177
178 cp -a cron.php $RPM_BUILD_ROOT%{_appdir}
179 cp -a modules/* $RPM_BUILD_ROOT%{_appdir}/modules
180 cp -a includes scripts $RPM_BUILD_ROOT%{_appdir}
181 cp -a sites $RPM_BUILD_ROOT%{_sysconfdir}
182
183 ln -s /var/lib/%{name} $RPM_BUILD_ROOT%{_appdir}/files
184 # needed for node.module for syndication icon
185 ln -s htdocs/misc $RPM_BUILD_ROOT%{_appdir}
186
187 # install themes
188 cp -a themes $RPM_BUILD_ROOT%{_appdir}/htdocs
189 # move .xtmpl/.theme out of htdocs
190 (cd $RPM_BUILD_ROOT%{_appdir}/htdocs && tar cf - --remove-files themes/*/*.{xtmpl,theme}) | tar -xf - -C $RPM_BUILD_ROOT%{_appdir}
191 mv $RPM_BUILD_ROOT%{_appdir}/{htdocs/,}themes/engines
192 # make screenshot.png available in appdir
193 for a in $RPM_BUILD_ROOT%{_appdir}/htdocs/themes/*; do
194         t=$(basename $a)
195         ln -s ../../htdocs/themes/$t/screenshot.png $RPM_BUILD_ROOT%{_appdir}/themes/$t
196 done
197
198 # a hack
199 s=themes/chameleon/marvin
200 ln -s ../../htdocs/$s $RPM_BUILD_ROOT%{_appdir}/$s
201
202 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
203 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
204 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}
205
206 %clean
207 rm -rf $RPM_BUILD_ROOT
208
209 %post db-mysql
210 if [ "$1" = 1 ]; then
211 %banner -e %{name}-db-mysql <<EOF
212 If this is your first install of Drupal, you need to create Drupal database:
213
214 mysqladmin create drupal
215 zcat %{_docdir}/%{name}-db-mysql-%{version}/database.mysql.gz | mysql drupal
216 mysql -e "GRANT SELECT, INSERT, UPDATE, DELETE ON drupal.* TO 'drupal'@'localhost' IDENTIFIED BY 'PASSWORD'"
217 mysql -e "GRANT CREATE TEMPORARY TABLES, LOCK TABLES ON *.* TO 'drupal'@'localhost'"
218
219 EOF
220 fi
221
222 %post db-pgsql
223 if [ "$1" = 1 ]; then
224 %banner -e %{name}-db-pgsql <<EOF
225 If this is your first install of Drupal, you need to create Drupal database:
226
227 and import initial schema from
228 %{_docdir}/%{name}-db-pgsql-%{version}/database.pgsql.gz
229
230 EOF
231 fi
232
233 %triggerin -- apache1
234 %webapp_register apache %{_webapp}
235
236 %triggerun -- apache1
237 %webapp_unregister apache %{_webapp}
238
239 %triggerin -- apache >= 2.0.0
240 %webapp_register httpd %{_webapp}
241
242 %triggerun -- apache >= 2.0.0
243 %webapp_unregister httpd %{_webapp}
244
245 %triggerpostun -- %{name} < 4.6.4-0.4
246 # rescue app configs.
247 if [ -f /etc/drupal/sites/default/settings.php.rpmsave ]; then
248         mv -f %{_sysconfdir}/sites/default/settings.php{,.rpmnew}
249         mv -f /etc/drupal/sites/default/settings.php.rpmsave %{_sysconfdir}/sites/default/settings.php
250 fi
251 # other configured sites, if any
252 for i in /etc/drupal/sites/*; do
253         d=$(basename $i)
254         [ "$d" = "default" ] && continue
255         mv -f %{_sysconfdir}/sites/$d{,.rpmnew}
256         mv -f $i %{_sysconfdir}/sites/$d
257 done
258
259 # migrate from apache-config macros
260 if [ -f /etc/drupal/apache.conf.rpmsave ]; then
261         if [ -d /etc/apache/webapps.d ]; then
262                 cp -f %{_sysconfdir}/apache.conf{,.rpmnew}
263                 cp -f /etc/drupal/apache.conf.rpmsave %{_sysconfdir}/apache.conf
264         fi
265
266         if [ -d /etc/httpd/webapps.d ]; then
267                 cp -f %{_sysconfdir}/httpd.conf{,.rpmnew}
268                 cp -f /etc/drupal/apache.conf.rpmsave %{_sysconfdir}/httpd.conf
269         fi
270         rm -f /etc/drupal/apache.conf.rpmsave
271 fi
272
273 # place new config location, as trigger puts config only on first install, do it here.
274 if [ -L /etc/apache/conf.d/99_%{name}.conf ]; then
275         rm -f /etc/apache/conf.d/99_%{name}.conf
276         /usr/sbin/webapp register apache %{_webapp}
277         apache_reload=1
278 fi
279 if [ -L /etc/httpd/httpd.conf/99_%{name}.conf ]; then
280         rm -f /etc/httpd/httpd.conf/99_%{name}.conf
281         /usr/sbin/webapp register httpd %{_webapp}
282         httpd_reload=1
283 fi
284
285 if [ "$httpd_reload" ]; then
286         if [ -f /var/lock/subsys/httpd ]; then
287                 /etc/rc.d/init.d/httpd reload 1>&2
288         fi
289 fi
290 if [ "$apache_reload" ]; then
291         if [ -f /var/lock/subsys/apache ]; then
292                 /etc/rc.d/init.d/apache reload 1>&2
293         fi
294 fi
295
296 %files
297 %defattr(644,root,root,755)
298 %doc *.txt README.PLD
299 %doc database/updates.inc
300
301 %dir %attr(750,root,http) %{_sysconfdir}
302 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
303 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
304
305 %attr(750,root,http) %dir %{_sysconfdir}/sites
306 %attr(750,root,http) %dir %{_sysconfdir}/sites/default
307 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sites/default/*
308
309 %dir %{_appdir}
310 %{_appdir}/includes
311 %{_appdir}/modules
312 %{_appdir}/scripts
313 %{_appdir}/themes
314 %{_appdir}/po
315 # symlink
316 %{_appdir}/files
317 %{_appdir}/misc
318
319 %dir %{_appdir}/htdocs
320 %{_appdir}/htdocs/*.ico
321 %{_appdir}/htdocs/index.php
322 %{_appdir}/htdocs/misc
323 %{_appdir}/htdocs/themes
324 %{_appdir}/htdocs/modules
325
326 %dir %attr(775,root,http) /var/lib/%{name}
327 %dir %attr(775,root,http) /var/cache/%{name}
328
329 %files cron
330 %defattr(644,root,root,755)
331 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}
332 %{_appdir}/cron.php
333
334 %files db-mysql
335 %defattr(644,root,root,755)
336 %doc database/*.mysql
337 %doc README.replication
338
339 %files db-pgsql
340 %defattr(644,root,root,755)
341 %doc database/*.pgsql
342
343 %files xmlrpc
344 %defattr(644,root,root,755)
345 %{_appdir}/htdocs/xmlrpc.php
This page took 0.081518 seconds and 4 git commands to generate.