3 Summary: Open source content management platform
4 Summary(pl): Platforma do zarz±dzania tre¶ci± o otwartych ¼ród³ach
6 Version: %{_ver}.%{_patchlevel}
9 Group: Applications/WWW
10 Source0: http://drupal.org/files/projects/%{name}-%{version}.tar.gz
11 # Source0-md5: cfa5777fb6a612addcee75dad132909e
15 Patch0: %{name}-replication.patch
16 Patch1: %{name}-sitesdir.patch
17 Patch2: %{name}-topdir.patch
18 Patch3: %{name}-themedir2.patch
19 Patch4: %{name}-emptypass.patch
20 Patch5: %{name}-cron.patch
21 Patch6: %{name}-19298-cache.patch
22 Patch7: %{name}-update-cli.patch
23 Patch8: %{name}-locale-memory.patch
24 Patch9: %{name}-comment.patch
25 URL: http://drupal.org/
26 BuildRequires: rpmbuild(macros) >= 1.264
27 BuildRequires: sed >= 4.0
28 Requires: %{name}(DB_Driver) = %{version}-%{release}
29 Requires: %{name}(theme) = %{_ver}
30 Requires: /usr/bin/php
31 Requires: apache(mod_access)
32 Requires: apache(mod_alias)
33 Requires: apache(mod_dir)
34 Requires: apache(mod_expires)
35 Requires: apache(mod_rewrite)
40 Requires: webserver = apache
41 Requires: webserver(php) >= 4.3.3
42 Obsoletes: drupal-update
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 %define _appdir %{_datadir}/%{name}
47 %define _webapps /etc/webapps
48 %define _webapp %{name}
49 %define _sysconfdir %{_webapps}/%{_webapp}
52 Drupal is software that allows an individual or a community of users
53 to easily publish, manage and organize a great variety of content on a
54 website. Tens of thousands of people and organizations have used
55 Drupal to set up scores of different kinds of web sites, including
56 - community web portals and discussion sites
57 - corporate web sites/intranet portals
60 - e-commerce applications
61 - resource directories
63 Drupal includes features to enable
64 - content management systems
66 - collaborative authoring environments
70 - file uploads and download
75 Drupal to oprogramowanie pozwalaj±ce osobie lub spo³eczno¶ci
76 u¿ytkowników na ³atwe publikowanie, zarz±dzanie i organizowanie ró¿nej
77 tre¶ci na stronie WWW. Dziesi±tki tysiêcy ludzi i organizacji u¿ywali
78 Drupala do ustawiania wyników ró¿nych rodzajów stron WWW, w tym:
79 - portale WWW i strony dyskusyjne spo³eczno¶ci
80 - korporacyjne strony WWW/portale intranetowe
83 - aplikacje e-commerce
86 Drupal zawiera zasoby umo¿liwiaj±ce tworzenie:
87 - systemów zarz±dzania tre¶ci±
89 - ¶rodowisk pracy grupowej
93 - wrzucania i ¶ci±gania plików
99 Summary(pl): Us³uga cron dla Drupala
100 Group: Applications/WWW
101 Requires: %{name} = %{version}-%{release}
102 Requires: /usr/bin/php
104 Requires: php-cli >= 3:4.3.3
107 This package contains script which invokes cron hooks for Drupal.
109 %description cron -l pl
110 Ten pakiet zawiera skrypt wywo³uj±cy uchwyty crona dla Drupala.
113 Summary: Drupal DB Driver for MySQL
114 Summary(pl): Sterownik bazy danych MySQL dla Drupala
115 Group: Applications/WWW
117 Provides: %{name}(DB_Driver) = %{version}-%{release}
119 %description db-mysql
120 This virtual package provides MySQL database backend for Drupal.
122 %description db-mysql -l pl
123 Ten wirtualny pakiet dostarcza backend bazy danych MySQL dla Drupala.
126 Summary: Drupal DB Driver for PostgreSQL
127 Summary(pl): Sterownik bazy danych PostgreSQL dla Drupala
128 Group: Applications/WWW
130 Provides: %{name}(DB_Driver) = %{version}-%{release}
132 %description db-pgsql
133 This virtual package provides PostgreSQL database backend for Drupal.
135 NOTE: This driver is not tested in PLD, and not all modules have
136 database schema for PostgreSQL. Use this driver at your own risk!
138 %description db-pgsql -l pl
139 Ten wirtualny pakiet dostarcza backend bazy danych PostgreSQL dla
142 UWAGA: Ten sterownik nie by³ testowany w PLD i nie wszystkie modu³y
143 maj± schematy bazy danych dla PostgreSQL-a. Mo¿na go u¿ywaæ na w³asne
147 Summary: Themes distributed with Drupal
148 Summary(pl): Motywy rozprowadzane z Drupalem
149 Group: Applications/WWW
150 Requires: %{name} = %{version}-%{release}
151 Provides: drupal(theme) = %{_ver}
154 This package contains themes distributed with Drupal.
156 %description themes -l pl
157 Ten pakiet zawiera motywy rozprowadzane z Drupalem.
160 Summary: XMLRPC server for Drupal
161 Summary(pl): Serwer XMLRPC dla Drupala
162 Group: Applications/WWW
163 Requires: %{name} = %{version}-%{release}
166 XMLRPC server for Drupal allows other Drupals authorize with your
167 Drupal's user creditentials, this is called Distributed Authentication
170 %description xmlrpc -l pl
171 Serwer XMLRPC dla Drupala pozwala innym Drupalom autoryzowaæ siê z
172 danymi uwierzytelniaj±cymi u¿ytkownika danego Drupala - jest to
173 nazywane rozproszonym uwierzytelnianiem.
188 cp -p %{SOURCE3} README.PLD
190 # remove backups from patching as we use globs to package files to buildroot
191 find '(' -name '*~' -o -name '*.orig' ')' | xargs -r rm -v
194 rm -rf $RPM_BUILD_ROOT
195 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/cron.d,/var/{cache,lib}/%{name}} \
196 $RPM_BUILD_ROOT%{_appdir}/{po,database,modules/po,htdocs/modules}
198 cp -a *.ico index.php $RPM_BUILD_ROOT%{_appdir}/htdocs
199 cp -a misc $RPM_BUILD_ROOT%{_appdir}/htdocs
200 cp -a xmlrpc.php $RPM_BUILD_ROOT%{_appdir}/htdocs
201 cp -a database/updates.inc $RPM_BUILD_ROOT%{_appdir}/database
203 cp -a cron.php update.php $RPM_BUILD_ROOT%{_appdir}
204 cp -a modules/* $RPM_BUILD_ROOT%{_appdir}/modules
205 cp -a includes scripts $RPM_BUILD_ROOT%{_appdir}
206 cp -a sites $RPM_BUILD_ROOT%{_sysconfdir}
208 ln -s /var/lib/%{name} $RPM_BUILD_ROOT%{_appdir}/files
209 # needed for node.module for syndication icon
210 ln -s htdocs/misc $RPM_BUILD_ROOT%{_appdir}
213 cp -a themes $RPM_BUILD_ROOT%{_appdir}/htdocs
214 # move .xtmpl/.theme out of htdocs
215 (cd $RPM_BUILD_ROOT%{_appdir}/htdocs && tar cf - --remove-files themes/*/*.{xtmpl,theme}) | tar -xf - -C $RPM_BUILD_ROOT%{_appdir}
216 mv $RPM_BUILD_ROOT%{_appdir}/{htdocs/,}themes/engines
217 # make screenshot.png available in appdir
218 for a in $RPM_BUILD_ROOT%{_appdir}/htdocs/themes/*; do
220 ln -s ../../htdocs/themes/$t/screenshot.png $RPM_BUILD_ROOT%{_appdir}/themes/$t
224 s=themes/chameleon/marvin
225 ln -s ../../htdocs/$s $RPM_BUILD_ROOT%{_appdir}/$s
227 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
228 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
229 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}
232 rm -rf $RPM_BUILD_ROOT
235 # Perform database updates
236 echo 'Performing Drupal database updates'
237 %{_bindir}/php %{_appdir}/update.php Update
241 if [ "$1" = 1 ]; then
242 %banner -e %{name}-db-mysql <<EOF
243 If this is your first install of Drupal, you need to create Drupal database:
245 mysqladmin create drupal
246 zcat %{_docdir}/%{name}-db-mysql-%{version}/database.mysql.gz | mysql drupal
247 mysql -e "GRANT SELECT, INSERT, UPDATE, DELETE ON drupal.* TO 'drupal'@'localhost' IDENTIFIED BY 'PASSWORD'"
248 mysql -e "GRANT CREATE TEMPORARY TABLES, LOCK TABLES ON *.* TO 'drupal'@'localhost'"
254 if [ "$1" = 1 ]; then
255 %banner -e %{name}-db-pgsql <<EOF
256 If this is your first install of Drupal, you need to create Drupal database:
258 and import initial schema from
259 %{_docdir}/%{name}-db-pgsql-%{version}/database.pgsql.gz
264 %triggerin -- apache1 < 1.3.37-3, apache1-base
265 %webapp_register apache %{_webapp}
267 %triggerun -- apache1 < 1.3.37-3, apache1-base
268 %webapp_unregister apache %{_webapp}
270 %triggerin -- apache < 2.2.0, apache-base
271 %webapp_register httpd %{_webapp}
273 %triggerun -- apache < 2.2.0, apache-base
274 %webapp_unregister httpd %{_webapp}
276 %triggerpostun -- %{name} < 4.6.4-0.4
277 # rescue app configs.
278 if [ -f /etc/drupal/sites/default/settings.php.rpmsave ]; then
279 mv -f %{_sysconfdir}/sites/default/settings.php{,.rpmnew}
280 mv -f /etc/drupal/sites/default/settings.php.rpmsave %{_sysconfdir}/sites/default/settings.php
282 # other configured sites, if any
283 for i in /etc/drupal/sites/*; do
285 [ "$d" = "default" ] && continue
286 mv -f %{_sysconfdir}/sites/$d{,.rpmnew}
287 mv -f $i %{_sysconfdir}/sites/$d
290 # migrate from apache-config macros
291 if [ -f /etc/drupal/apache.conf.rpmsave ]; then
292 if [ -d /etc/apache/webapps.d ]; then
293 cp -f %{_sysconfdir}/apache.conf{,.rpmnew}
294 cp -f /etc/drupal/apache.conf.rpmsave %{_sysconfdir}/apache.conf
297 if [ -d /etc/httpd/webapps.d ]; then
298 cp -f %{_sysconfdir}/httpd.conf{,.rpmnew}
299 cp -f /etc/drupal/apache.conf.rpmsave %{_sysconfdir}/httpd.conf
301 rm -f /etc/drupal/apache.conf.rpmsave
304 # place new config location, as trigger puts config only on first install, do it here.
305 if [ -L /etc/apache/conf.d/99_%{name}.conf ]; then
306 rm -f /etc/apache/conf.d/99_%{name}.conf
307 /usr/sbin/webapp register apache %{_webapp}
310 if [ -L /etc/httpd/httpd.conf/99_%{name}.conf ]; then
311 rm -f /etc/httpd/httpd.conf/99_%{name}.conf
312 /usr/sbin/webapp register httpd %{_webapp}
316 if [ "$httpd_reload" ]; then
317 %service -q httpd reload
319 if [ "$apache_reload" ]; then
320 %service -q apache reload
323 %triggerpostun -- %{name} < 4.6.8-0.5
324 grep -l 'This_is_a_Drupal_security_line_do_not_remove' \
325 %{_sysconfdir}/apache.conf %{_sysconfdir}/httpd.conf \
328 /This_is_a_Drupal_security_line_do_not_remove/{
331 a\ SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
333 a\ <IfModule mod_rewrite.c>
334 a\ \ RewriteEngine off
337 egrep -c 'Drupal_Security_Do_Not_Remove_See_SA_2006_006' \
338 %{_sysconfdir}/apache.conf %{_sysconfdir}/httpd.conf \
339 | awk -F: '/:0/{print $1}' | xargs -r \
341 /<Directory \/var\/lib\/drupal>/{
343 a\ SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
345 a\ <IfModule mod_rewrite.c>
346 a\ \ RewriteEngine off
349 [ ! -L /etc/httpd/webapps.d/drupal.conf ] || %service -q httpd reload
350 [ ! -L /etc/apache/webapps.d/drupal.conf ] || %service -q apache reload
353 %defattr(644,root,root,755)
354 %doc *.txt README.PLD
356 %dir %attr(750,root,http) %{_sysconfdir}
357 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
358 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
360 %attr(750,root,http) %dir %{_sysconfdir}/sites
361 %attr(750,root,http) %dir %{_sysconfdir}/sites/default
362 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sites/default/*
367 %exclude %{_appdir}/includes/database.mysql.inc
368 %exclude %{_appdir}/includes/database.pgsql.inc
371 %dir %{_appdir}/themes
372 %dir %{_appdir}/themes/engines
374 %{_appdir}/update.php
379 %dir %{_appdir}/htdocs
380 %{_appdir}/htdocs/*.ico
381 %{_appdir}/htdocs/index.php
382 %{_appdir}/htdocs/misc
383 %dir %{_appdir}/htdocs/themes
384 %{_appdir}/htdocs/modules
386 %dir %attr(775,root,http) /var/lib/%{name}
387 %dir %attr(775,root,http) /var/cache/%{name}
390 %defattr(644,root,root,755)
391 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}
395 %defattr(644,root,root,755)
396 %doc database/*.mysql
397 %doc README.replication
398 %{_appdir}/includes/database.mysql.inc
401 %defattr(644,root,root,755)
402 %doc database/*.pgsql
403 %{_appdir}/includes/database.pgsql.inc
406 %defattr(644,root,root,755)
407 %{_appdir}/themes/[!e]*
408 %{_appdir}/themes/engines/*
409 %{_appdir}/htdocs/themes/*
412 %defattr(644,root,root,755)
413 %{_appdir}/htdocs/xmlrpc.php