1 Summary: Open source content management platform
2 Summary(pl): Platforma do zarz±dzania tre¶ci± o otwartych ¼ród³ach
7 Group: Applications/WWW
8 Source0: http://drupal.org/files/projects/%{name}-%{version}.tar.gz
9 # Source0-md5: 21e5e768d92fb6ecf52d56cacd37706e
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 Patch7: %{name}-update-cli.patch
21 Patch8: %{name}-locale-memory.patch
22 URL: http://drupal.org/
23 BuildRequires: rpmbuild(macros) >= 1.264
24 BuildRequires: sed >= 4.0
25 Requires: %{name}(DB_Driver) = %{version}-%{release}
26 Requires: apache(mod_access)
27 Requires: apache(mod_alias)
28 Requires: apache(mod_dir)
29 Requires: apache(mod_expires)
30 Requires: apache(mod_rewrite)
31 Requires: php >= 3:4.3.3
36 Requires: webserver = apache
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 %define _appdir %{_datadir}/%{name}
41 %define _webapps /etc/webapps
42 %define _webapp %{name}
43 %define _sysconfdir %{_webapps}/%{_webapp}
46 Drupal is software that allows an individual or a community of users
47 to easily publish, manage and organize a great variety of content on a
48 website. Tens of thousands of people and organizations have used
49 Drupal to set up scores of different kinds of web sites, including
50 - community web portals and discussion sites
51 - corporate web sites/intranet portals
54 - e-commerce applications
55 - resource directories
57 Drupal includes features to enable
58 - content management systems
60 - collaborative authoring environments
64 - file uploads and download
69 Drupal to oprogramowanie pozwalaj±ce osobie lub spo³eczno¶ci
70 u¿ytkowników na ³atwe publikowanie, zarz±dzanie i organizowanie ró¿nej
71 tre¶ci na stronie WWW. Dziesi±tki tysiêcy ludzi i organizacji u¿ywali
72 Drupala do ustawiania wyników ró¿nych rodzajów stron WWW, w tym:
73 - portale WWW i strony dyskusyjne spo³eczno¶ci
74 - korporacyjne strony WWW/portale intranetowe
77 - aplikacje e-commerce
80 Drupal zawiera zasoby umo¿liwiaj±ce tworzenie:
81 - systemów zarz±dzania tre¶ci±
83 - ¶rodowisk pracy grupowej
87 - wrzucania i ¶ci±gania plików
93 Summary(pl): Us³uga cron dla Drupala
94 Group: Applications/WWW
95 Requires: %{name} = %{version}-%{release}
96 Requires: /usr/bin/php
98 Requires: php-cli >= 3:4.3.3
101 This package contains script which invokes cron hooks for Drupal.
103 %description cron -l pl
104 Ten pakiet zawiera skrypt wywo³uj±cy uchwyty crona dla Drupala.
107 Summary: Drupal DB Driver for MySQL
108 Summary(pl): Sterownik bazy danych MySQL dla Drupala
109 Group: Applications/WWW
111 Provides: %{name}(DB_Driver) = %{version}-%{release}
113 %description db-mysql
114 This virtual package provides MySQL database backend for Drupal.
116 %description db-mysql -l pl
117 Ten wirtualny pakiet dostarcza backend bazy danych MySQL dla Drupala.
120 Summary: Drupal DB Driver for PostgreSQL
121 Summary(pl): Sterownik bazy danych PostgreSQL dla Drupala
122 Group: Applications/WWW
124 Provides: %{name}(DB_Driver) = %{version}-%{release}
126 %description db-pgsql
127 This virtual package provides PostgreSQL database backend for Drupal.
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!
132 %description db-pgsql -l pl
133 Ten wirtualny pakiet dostarcza backend bazy danych PostgreSQL dla
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
141 Summary: Package to perform Drupal database updates
142 Group: Applications/WWW
143 Requires: %{name} = %{version}-%{release}
146 This package contains scripts needed to do database updates via web.
149 Summary: XMLRPC server for Drupal
150 Summary(pl): Serwer XMLRPC dla Drupala
151 Group: Applications/WWW
152 Requires: %{name} = %{version}-%{release}
155 XMLRPC server for Drupal allows other Drupals authorize with your
156 Drupal's user creditentials, this is called Distributed Authentication
159 %description xmlrpc -l pl
160 Serwer XMLRPC dla Drupala pozwala innym Drupalom autoryzowaæ siê z
161 danymi uwierzytelniaj±cymi u¿ytkownika danego Drupala - jest to
162 nazywane rozproszonym uwierzytelnianiem.
176 find -name '*~' | xargs -r rm -v
177 cp -p %{SOURCE3} README.PLD
180 rm -rf $RPM_BUILD_ROOT
181 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/cron.d,/var/{cache,lib}/%{name}} \
182 $RPM_BUILD_ROOT%{_appdir}/{po,database,modules/po,htdocs/modules}
184 cp -a *.ico index.php $RPM_BUILD_ROOT%{_appdir}/htdocs
185 cp -a misc $RPM_BUILD_ROOT%{_appdir}/htdocs
186 cp -a update.php xmlrpc.php $RPM_BUILD_ROOT%{_appdir}/htdocs
187 cp -a database/updates.inc $RPM_BUILD_ROOT%{_appdir}/database
189 cp -a cron.php $RPM_BUILD_ROOT%{_appdir}
190 cp -a modules/* $RPM_BUILD_ROOT%{_appdir}/modules
191 cp -a includes scripts $RPM_BUILD_ROOT%{_appdir}
192 cp -a sites $RPM_BUILD_ROOT%{_sysconfdir}
194 ln -s /var/lib/%{name} $RPM_BUILD_ROOT%{_appdir}/files
195 # needed for node.module for syndication icon
196 ln -s htdocs/misc $RPM_BUILD_ROOT%{_appdir}
199 cp -a themes $RPM_BUILD_ROOT%{_appdir}/htdocs
200 # move .xtmpl/.theme out of htdocs
201 (cd $RPM_BUILD_ROOT%{_appdir}/htdocs && tar cf - --remove-files themes/*/*.{xtmpl,theme}) | tar -xf - -C $RPM_BUILD_ROOT%{_appdir}
202 mv $RPM_BUILD_ROOT%{_appdir}/{htdocs/,}themes/engines
203 # make screenshot.png available in appdir
204 for a in $RPM_BUILD_ROOT%{_appdir}/htdocs/themes/*; do
206 ln -s ../../htdocs/themes/$t/screenshot.png $RPM_BUILD_ROOT%{_appdir}/themes/$t
210 s=themes/chameleon/marvin
211 ln -s ../../htdocs/$s $RPM_BUILD_ROOT%{_appdir}/$s
213 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
214 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
215 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}
218 rm -rf $RPM_BUILD_ROOT
221 if [ "$1" = 1 ]; then
222 %banner -e %{name}-db-mysql <<EOF
223 If this is your first install of Drupal, you need to create Drupal database:
225 mysqladmin create drupal
226 zcat %{_docdir}/%{name}-db-mysql-%{version}/database.mysql.gz | mysql drupal
227 mysql -e "GRANT SELECT, INSERT, UPDATE, DELETE ON drupal.* TO 'drupal'@'localhost' IDENTIFIED BY 'PASSWORD'"
228 mysql -e "GRANT CREATE TEMPORARY TABLES, LOCK TABLES ON *.* TO 'drupal'@'localhost'"
234 if [ "$1" = 1 ]; then
235 %banner -e %{name}-db-pgsql <<EOF
236 If this is your first install of Drupal, you need to create Drupal database:
238 and import initial schema from
239 %{_docdir}/%{name}-db-pgsql-%{version}/database.pgsql.gz
244 %triggerin -- apache1
245 %webapp_register apache %{_webapp}
247 %triggerun -- apache1
248 %webapp_unregister apache %{_webapp}
250 %triggerin -- apache >= 2.0.0
251 %webapp_register httpd %{_webapp}
253 %triggerun -- apache >= 2.0.0
254 %webapp_unregister httpd %{_webapp}
256 %triggerpostun -- %{name} < 4.6.4-0.4
257 # rescue app configs.
258 if [ -f /etc/drupal/sites/default/settings.php.rpmsave ]; then
259 mv -f %{_sysconfdir}/sites/default/settings.php{,.rpmnew}
260 mv -f /etc/drupal/sites/default/settings.php.rpmsave %{_sysconfdir}/sites/default/settings.php
262 # other configured sites, if any
263 for i in /etc/drupal/sites/*; do
265 [ "$d" = "default" ] && continue
266 mv -f %{_sysconfdir}/sites/$d{,.rpmnew}
267 mv -f $i %{_sysconfdir}/sites/$d
270 # migrate from apache-config macros
271 if [ -f /etc/drupal/apache.conf.rpmsave ]; then
272 if [ -d /etc/apache/webapps.d ]; then
273 cp -f %{_sysconfdir}/apache.conf{,.rpmnew}
274 cp -f /etc/drupal/apache.conf.rpmsave %{_sysconfdir}/apache.conf
277 if [ -d /etc/httpd/webapps.d ]; then
278 cp -f %{_sysconfdir}/httpd.conf{,.rpmnew}
279 cp -f /etc/drupal/apache.conf.rpmsave %{_sysconfdir}/httpd.conf
281 rm -f /etc/drupal/apache.conf.rpmsave
284 # place new config location, as trigger puts config only on first install, do it here.
285 if [ -L /etc/apache/conf.d/99_%{name}.conf ]; then
286 rm -f /etc/apache/conf.d/99_%{name}.conf
287 /usr/sbin/webapp register apache %{_webapp}
290 if [ -L /etc/httpd/httpd.conf/99_%{name}.conf ]; then
291 rm -f /etc/httpd/httpd.conf/99_%{name}.conf
292 /usr/sbin/webapp register httpd %{_webapp}
296 if [ "$httpd_reload" ]; then
297 %service httpd reload
299 if [ "$apache_reload" ]; then
300 %service apache reload
304 %defattr(644,root,root,755)
305 %doc *.txt README.PLD
307 %dir %attr(750,root,http) %{_sysconfdir}
308 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
309 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
311 %attr(750,root,http) %dir %{_sysconfdir}/sites
312 %attr(750,root,http) %dir %{_sysconfdir}/sites/default
313 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sites/default/*
325 %dir %{_appdir}/htdocs
326 %{_appdir}/htdocs/*.ico
327 %{_appdir}/htdocs/index.php
328 %{_appdir}/htdocs/misc
329 %{_appdir}/htdocs/themes
330 %{_appdir}/htdocs/modules
332 %dir %attr(775,root,http) /var/lib/%{name}
333 %dir %attr(775,root,http) /var/cache/%{name}
336 %defattr(644,root,root,755)
337 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}
341 %defattr(644,root,root,755)
342 %doc database/*.mysql
343 %doc README.replication
346 %defattr(644,root,root,755)
347 %doc database/*.pgsql
350 %defattr(644,root,root,755)
351 %{_appdir}/htdocs/update.php
355 %defattr(644,root,root,755)
356 %{_appdir}/htdocs/xmlrpc.php