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 URL: http://drupal.org/
20 BuildRequires: rpmbuild(macros) >= 1.264
21 BuildRequires: sed >= 4.0
23 Requires: webserver = apache
24 Requires: apache(mod_dir)
25 Requires: apache(mod_access)
26 Requires: apache(mod_expires)
27 Requires: apache(mod_rewrite)
28 Requires: apache(mod_alias)
29 Requires: php >= 3:4.3.3
32 Requires: %{name}(DB_Driver) = %{version}-%{release}
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 %define _appdir %{_datadir}/%{name}
38 %define _webapps /etc/webapps
39 %define _webapp %{name}
40 %define _sysconfdir %{_webapps}/%{_webapp}
43 Drupal is software that allows an individual or a community of users
44 to easily publish, manage and organize a great variety of content on a
45 website. Tens of thousands of people and organizations have used
46 Drupal to set up scores of different kinds of web sites, including
47 - community web portals and discussion sites
48 - corporate web sites/intranet portals
51 - e-commerce applications
52 - resource directories
54 Drupal includes features to enable
55 - content management systems
57 - collaborative authoring environments
61 - file uploads and download
66 Drupal to oprogramowanie pozwalaj±ce osobie lub spo³eczno¶ci
67 u¿ytkowników na ³atwe publikowanie, zarz±dzanie i organizowanie ró¿nej
68 tre¶ci na stronie WWW. Dziesi±tki tysiêcy ludzi i organizacji u¿ywali
69 Drupala do ustawiania wyników ró¿nych rodzajów stron WWW, w tym:
70 - portale WWW i strony dyskusyjne spo³eczno¶ci
71 - korporacyjne strony WWW/portale intranetowe
74 - aplikacje e-commerce
77 Drupal zawiera zasoby umo¿liwiaj±ce tworzenie:
78 - systemów zarz±dzania tre¶ci±
80 - ¶rodowisk pracy grupowej
84 - wrzucania i ¶ci±gania plików
90 Summary(pl): Us³uga cron dla Drupala
91 Group: Applications/WWW
92 Requires: %{name} = %{version}-%{release}
94 Requires: php-cli >= 3:4.3.3
95 Requires: /usr/bin/php
98 This package contains script which invokes cron hooks for Drupal.
100 %description cron -l pl
101 Ten pakiet zawiera skrypt wywo³uj±cy uchwyty crona dla Drupala.
104 Summary: Drupal DB Driver for MySQL
105 Summary(pl): Sterownik bazy danych MySQL dla Drupala
106 Group: Applications/WWW
108 Provides: %{name}(DB_Driver) = %{version}-%{release}
110 %description db-mysql
111 This virtual package provides MySQL database backend for Drupal.
113 %description db-mysql -l pl
114 Ten wirtualny pakiet dostarcza backend bazy danych MySQL dla
118 Summary: Drupal DB Driver for PostgreSQL
119 Summary(pl): Sterownik bazy danych PostgreSQL dla Drupala
120 Group: Applications/WWW
122 Provides: %{name}(DB_Driver) = %{version}-%{release}
124 %description db-pgsql
125 This virtual package provides PostgreSQL database backend for
128 NOTE: This driver is not tested in PLD, and not all modules have
129 database schema for PostgreSQL. Use this driver at your own risk!
131 %description db-pgsql -l pl
132 Ten wirtualny pakiet dostarcza backend bazy danych PostgreSQL dla
135 UWAGA: Ten sterownik nie by³ testowany w PLD i nie wszystkie modu³y
136 maj± schematy bazy danych dla PostgreSQL-a. Mo¿na go u¿ywaæ na w³asne
140 Summary: XMLRPC server for Drupal
141 Summary(pl): Serwer XMLRPC dla Drupala
142 Group: Applications/WWW
143 Requires: %{name} = %{version}-%{release}
146 XMLRPC server for Drupal allows other Drupals authorize with your
147 Drupal's user creditentials, this is called Distributed Authentication
150 %description xmlrpc -l pl
151 Serwer XMLRPC dla Drupala pozwala innym Drupalom autoryzowaæ siê z
152 danymi uwierzytelniaj±cymi u¿ytkownika danego Drupala - jest to
153 nazywane rozproszonym uwierzytelnianiem.
164 find -name '*~' | xargs -r rm -v
165 cp -p %{SOURCE3} README.PLD
168 rm -rf $RPM_BUILD_ROOT
169 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/cron.d,/var/{cache,lib}/%{name}} \
170 $RPM_BUILD_ROOT%{_appdir}/{po,modules/po,htdocs/modules}
172 cp -a *.ico index.php $RPM_BUILD_ROOT%{_appdir}/htdocs
173 cp -a misc $RPM_BUILD_ROOT%{_appdir}/htdocs
174 cp -a xmlrpc.php $RPM_BUILD_ROOT%{_appdir}/htdocs
176 cp -a cron.php $RPM_BUILD_ROOT%{_appdir}
177 cp -a modules/* $RPM_BUILD_ROOT%{_appdir}/modules
178 cp -a includes scripts $RPM_BUILD_ROOT%{_appdir}
179 cp -a sites $RPM_BUILD_ROOT%{_sysconfdir}
181 ln -s /var/lib/%{name} $RPM_BUILD_ROOT%{_appdir}/files
182 # needed for node.module for syndication icon
183 ln -s htdocs/misc $RPM_BUILD_ROOT%{_appdir}
186 cp -a themes $RPM_BUILD_ROOT%{_appdir}/htdocs
187 # move .xtmpl/.theme out of htdocs
188 (cd $RPM_BUILD_ROOT%{_appdir}/htdocs && tar cf - --remove-files themes/*/*.{xtmpl,theme}) | tar -xf - -C $RPM_BUILD_ROOT%{_appdir}
189 mv $RPM_BUILD_ROOT%{_appdir}/{htdocs/,}themes/engines
190 # make screenshot.png available in appdir
191 for a in $RPM_BUILD_ROOT%{_appdir}/htdocs/themes/*; do
193 ln -s ../../htdocs/themes/$t/screenshot.png $RPM_BUILD_ROOT%{_appdir}/themes/$t
197 s=themes/chameleon/marvin
198 ln -s ../../htdocs/$s $RPM_BUILD_ROOT%{_appdir}/$s
200 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
201 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
202 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}
205 rm -rf $RPM_BUILD_ROOT
208 if [ "$1" = 1 ]; then
209 %banner -e %{name}-db-mysql <<EOF
210 If this is your first install of Drupal, you need to create Drupal database:
212 mysqladmin create drupal
213 zcat %{_docdir}/%{name}-db-mysql-%{version}/database.mysql.gz | mysql drupal
214 mysql -e "GRANT SELECT, INSERT, UPDATE, DELETE ON drupal.* TO 'drupal'@'localhost' IDENTIFIED BY 'PASSWORD'"
215 mysql -e "GRANT CREATE TEMPORARY TABLES, LOCK TABLES ON *.* TO 'drupal'@'localhost'"
221 if [ "$1" = 1 ]; then
222 %banner -e %{name}-db-pgsql <<EOF
223 If this is your first install of Drupal, you need to create Drupal database:
225 and import initial schema from
226 %{_docdir}/%{name}-db-pgsql-%{version}/database.pgsql.gz
231 %triggerin -- apache1
232 %webapp_register apache %{_webapp}
234 %triggerun -- apache1
235 %webapp_unregister apache %{_webapp}
237 %triggerin -- apache >= 2.0.0
238 %webapp_register httpd %{_webapp}
240 %triggerun -- apache >= 2.0.0
241 %webapp_unregister httpd %{_webapp}
243 %triggerpostun -- %{name} < 4.6.4-0.4
244 # rescue app configs.
245 if [ -f /etc/drupal/sites/default/settings.php.rpmsave ]; then
246 mv -f %{_sysconfdir}/sites/default/settings.php{,.rpmnew}
247 mv -f /etc/drupal/sites/default/settings.php.rpmsave %{_sysconfdir}/sites/default/settings.php
249 # other configured sites, if any
250 for i in /etc/drupal/sites/*; do
252 [ "$d" = "default" ] && continue
253 mv -f %{_sysconfdir}/sites/$d{,.rpmnew}
254 mv -f $i %{_sysconfdir}/sites/$d
257 # migrate from apache-config macros
258 if [ -f /etc/drupal/apache.conf.rpmsave ]; then
259 if [ -d /etc/apache/webapps.d ]; then
260 cp -f %{_sysconfdir}/apache.conf{,.rpmnew}
261 cp -f /etc/drupal/apache.conf.rpmsave %{_sysconfdir}/apache.conf
264 if [ -d /etc/httpd/webapps.d ]; then
265 cp -f %{_sysconfdir}/httpd.conf{,.rpmnew}
266 cp -f /etc/drupal/apache.conf.rpmsave %{_sysconfdir}/httpd.conf
268 rm -f /etc/drupal/apache.conf.rpmsave
271 # place new config location, as trigger puts config only on first install, do it here.
272 if [ -L /etc/apache/conf.d/99_%{name}.conf ]; then
273 rm -f /etc/apache/conf.d/99_%{name}.conf
274 /usr/sbin/webapp register apache %{_webapp}
277 if [ -L /etc/httpd/httpd.conf/99_%{name}.conf ]; then
278 rm -f /etc/httpd/httpd.conf/99_%{name}.conf
279 /usr/sbin/webapp register httpd %{_webapp}
283 if [ "$httpd_reload" ]; then
284 if [ -f /var/lock/subsys/httpd ]; then
285 /etc/rc.d/init.d/httpd reload 1>&2
288 if [ "$apache_reload" ]; then
289 if [ -f /var/lock/subsys/apache ]; then
290 /etc/rc.d/init.d/apache reload 1>&2
295 %defattr(644,root,root,755)
296 %doc *.txt README.PLD
297 %doc database/updates.inc
299 %dir %attr(750,root,http) %{_sysconfdir}
300 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
301 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
303 %attr(750,root,http) %dir %{_sysconfdir}/sites
304 %attr(750,root,http) %dir %{_sysconfdir}/sites/default
305 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sites/default/*
317 %dir %{_appdir}/htdocs
318 %{_appdir}/htdocs/*.ico
319 %{_appdir}/htdocs/index.php
320 %{_appdir}/htdocs/misc
321 %{_appdir}/htdocs/themes
322 %{_appdir}/htdocs/modules
324 %dir %attr(775,root,http) /var/lib/%{name}
325 %dir %attr(775,root,http) /var/cache/%{name}
328 %defattr(644,root,root,755)
329 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}
333 %defattr(644,root,root,755)
334 %doc database/*.mysql
335 %doc README.replication
338 %defattr(644,root,root,755)
339 %doc database/*.pgsql
342 %defattr(644,root,root,755)
343 %{_appdir}/htdocs/xmlrpc.php