2 # - http://drupal.org/node/39670
3 Summary: Open source content management platform
4 Summary(pl): Platforma do zarz±dzania tre¶ci± o otwartych ¼ród³ach
9 Group: Applications/WWW
10 Source0: http://drupal.org/files/projects/%{name}-%{version}.tar.gz
11 # Source0-md5: c61d95c766a7ff624abbe04c2430e5df
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 # http://drupal.org/node/39566
22 Patch6: http://drupal.org/files/issues/check_url.patch
23 URL: http://drupal.org/
24 BuildRequires: rpmbuild(macros) >= 1.264
25 BuildRequires: sed >= 4.0
27 Requires: webserver = apache
28 Requires: apache(mod_dir)
29 Requires: apache(mod_access)
30 Requires: apache(mod_expires)
31 Requires: apache(mod_rewrite)
32 Requires: apache(mod_alias)
33 Requires: php >= 3:4.3.3
36 Requires: %{name}(DB_Driver) = %{version}-%{release}
39 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 %define _appdir %{_datadir}/%{name}
42 %define _webapps /etc/webapps
43 %define _webapp %{name}
44 %define _sysconfdir %{_webapps}/%{_webapp}
47 Drupal is software that allows an individual or a community of users
48 to easily publish, manage and organize a great variety of content on a
49 website. Tens of thousands of people and organizations have used
50 Drupal to set up scores of different kinds of web sites, including
51 - community web portals and discussion sites
52 - corporate web sites/intranet portals
55 - e-commerce applications
56 - resource directories
58 Drupal includes features to enable
59 - content management systems
61 - collaborative authoring environments
65 - file uploads and download
70 Drupal to oprogramowanie pozwalaj±ce osobie lub spo³eczno¶ci
71 u¿ytkowników na ³atwe publikowanie, zarz±dzanie i organizowanie ró¿nej
72 tre¶ci na stronie WWW. Dziesi±tki tysiêcy ludzi i organizacji u¿ywali
73 Drupala do ustawiania wyników ró¿nych rodzajów stron WWW, w tym:
74 - portale WWW i strony dyskusyjne spo³eczno¶ci
75 - korporacyjne strony WWW/portale intranetowe
78 - aplikacje e-commerce
81 Drupal zawiera zasoby umo¿liwiaj±ce tworzenie:
82 - systemów zarz±dzania tre¶ci±
84 - ¶rodowisk pracy grupowej
88 - wrzucania i ¶ci±gania plików
94 Summary(pl): Us³uga cron dla Drupala
95 Group: Applications/WWW
96 Requires: %{name} = %{version}-%{release}
98 Requires: php-cli >= 3:4.3.3
99 Requires: /usr/bin/php
102 This package contains script which invokes cron hooks for Drupal.
104 %description cron -l pl
105 Ten pakiet zawiera skrypt wywo³uj±cy uchwyty crona dla Drupala.
108 Summary: Drupal DB Driver for MySQL
109 Summary(pl): Sterownik bazy danych MySQL dla Drupala
110 Group: Applications/WWW
112 Provides: %{name}(DB_Driver) = %{version}-%{release}
114 %description db-mysql
115 This virtual package provides MySQL database backend for Drupal.
117 %description db-mysql -l pl
118 Ten wirtualny pakiet dostarcza backend bazy danych MySQL dla
122 Summary: Drupal DB Driver for PostgreSQL
123 Summary(pl): Sterownik bazy danych PostgreSQL dla Drupala
124 Group: Applications/WWW
126 Provides: %{name}(DB_Driver) = %{version}-%{release}
128 %description db-pgsql
129 This virtual package provides PostgreSQL database backend for
132 NOTE: This driver is not tested in PLD, and not all modules have
133 database schema for PostgreSQL. Use this driver at your own risk!
135 %description db-pgsql -l pl
136 Ten wirtualny pakiet dostarcza backend bazy danych PostgreSQL dla
139 UWAGA: Ten sterownik nie by³ testowany w PLD i nie wszystkie modu³y
140 maj± schematy bazy danych dla PostgreSQL-a. Mo¿na go u¿ywaæ na w³asne
144 Summary: XMLRPC server for Drupal
145 Summary(pl): Serwer XMLRPC dla Drupala
146 Group: Applications/WWW
147 Requires: %{name} = %{version}-%{release}
150 XMLRPC server for Drupal allows other Drupals authorize with your
151 Drupal's user creditentials, this is called Distributed Authentication
154 %description xmlrpc -l pl
155 Serwer XMLRPC dla Drupala pozwala innym Drupalom autoryzowaæ siê z
156 danymi uwierzytelniaj±cymi u¿ytkownika danego Drupala - jest to
157 nazywane rozproszonym uwierzytelnianiem.
169 find -name '*~' | xargs -r rm -v
170 cp -p %{SOURCE3} README.PLD
173 rm -rf $RPM_BUILD_ROOT
174 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/cron.d,/var/{cache,lib}/%{name}} \
175 $RPM_BUILD_ROOT%{_appdir}/{po,modules/po,htdocs/modules}
177 cp -a *.ico index.php $RPM_BUILD_ROOT%{_appdir}/htdocs
178 cp -a misc $RPM_BUILD_ROOT%{_appdir}/htdocs
179 cp -a xmlrpc.php $RPM_BUILD_ROOT%{_appdir}/htdocs
181 cp -a cron.php $RPM_BUILD_ROOT%{_appdir}
182 cp -a modules/* $RPM_BUILD_ROOT%{_appdir}/modules
183 cp -a includes scripts $RPM_BUILD_ROOT%{_appdir}
184 cp -a sites $RPM_BUILD_ROOT%{_sysconfdir}
186 ln -s /var/lib/%{name} $RPM_BUILD_ROOT%{_appdir}/files
187 # needed for node.module for syndication icon
188 ln -s htdocs/misc $RPM_BUILD_ROOT%{_appdir}
191 cp -a themes $RPM_BUILD_ROOT%{_appdir}/htdocs
192 # move .xtmpl/.theme out of htdocs
193 (cd $RPM_BUILD_ROOT%{_appdir}/htdocs && tar cf - --remove-files themes/*/*.{xtmpl,theme}) | tar -xf - -C $RPM_BUILD_ROOT%{_appdir}
194 mv $RPM_BUILD_ROOT%{_appdir}/{htdocs/,}themes/engines
195 # make screenshot.png available in appdir
196 for a in $RPM_BUILD_ROOT%{_appdir}/htdocs/themes/*; do
198 ln -s ../../htdocs/themes/$t/screenshot.png $RPM_BUILD_ROOT%{_appdir}/themes/$t
202 s=themes/chameleon/marvin
203 ln -s ../../htdocs/$s $RPM_BUILD_ROOT%{_appdir}/$s
205 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
206 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
207 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}
210 rm -rf $RPM_BUILD_ROOT
213 if [ "$1" = 1 ]; then
214 %banner -e %{name}-db-mysql <<EOF
215 If this is your first install of Drupal, you need to create Drupal database:
217 mysqladmin create drupal
218 zcat %{_docdir}/%{name}-db-mysql-%{version}/database.mysql.gz | mysql drupal
219 mysql -e "GRANT SELECT, INSERT, UPDATE, DELETE ON drupal.* TO 'drupal'@'localhost' IDENTIFIED BY 'PASSWORD'"
220 mysql -e "GRANT CREATE TEMPORARY TABLES, LOCK TABLES ON *.* TO 'drupal'@'localhost'"
226 if [ "$1" = 1 ]; then
227 %banner -e %{name}-db-pgsql <<EOF
228 If this is your first install of Drupal, you need to create Drupal database:
230 and import initial schema from
231 %{_docdir}/%{name}-db-pgsql-%{version}/database.pgsql.gz
236 %triggerin -- apache1
237 %webapp_register apache %{_webapp}
239 %triggerun -- apache1
240 %webapp_unregister apache %{_webapp}
242 %triggerin -- apache >= 2.0.0
243 %webapp_register httpd %{_webapp}
245 %triggerun -- apache >= 2.0.0
246 %webapp_unregister httpd %{_webapp}
248 %triggerpostun -- %{name} < 4.6.4-0.4
249 # rescue app configs.
250 if [ -f /etc/drupal/sites/default/settings.php.rpmsave ]; then
251 mv -f %{_sysconfdir}/sites/default/settings.php{,.rpmnew}
252 mv -f /etc/drupal/sites/default/settings.php.rpmsave %{_sysconfdir}/sites/default/settings.php
254 # other configured sites, if any
255 for i in /etc/drupal/sites/*; do
257 [ "$d" = "default" ] && continue
258 mv -f %{_sysconfdir}/sites/$d{,.rpmnew}
259 mv -f $i %{_sysconfdir}/sites/$d
262 # migrate from apache-config macros
263 if [ -f /etc/drupal/apache.conf.rpmsave ]; then
264 if [ -d /etc/apache/webapps.d ]; then
265 cp -f %{_sysconfdir}/apache.conf{,.rpmnew}
266 cp -f /etc/drupal/apache.conf.rpmsave %{_sysconfdir}/apache.conf
269 if [ -d /etc/httpd/webapps.d ]; then
270 cp -f %{_sysconfdir}/httpd.conf{,.rpmnew}
271 cp -f /etc/drupal/apache.conf.rpmsave %{_sysconfdir}/httpd.conf
273 rm -f /etc/drupal/apache.conf.rpmsave
276 # place new config location, as trigger puts config only on first install, do it here.
277 if [ -L /etc/apache/conf.d/99_%{name}.conf ]; then
278 rm -f /etc/apache/conf.d/99_%{name}.conf
279 /usr/sbin/webapp register apache %{_webapp}
282 if [ -L /etc/httpd/httpd.conf/99_%{name}.conf ]; then
283 rm -f /etc/httpd/httpd.conf/99_%{name}.conf
284 /usr/sbin/webapp register httpd %{_webapp}
288 if [ "$httpd_reload" ]; then
289 if [ -f /var/lock/subsys/httpd ]; then
290 /etc/rc.d/init.d/httpd reload 1>&2
293 if [ "$apache_reload" ]; then
294 if [ -f /var/lock/subsys/apache ]; then
295 /etc/rc.d/init.d/apache reload 1>&2
300 %defattr(644,root,root,755)
301 %doc *.txt README.PLD
302 %doc database/updates.inc
304 %dir %attr(750,root,http) %{_sysconfdir}
305 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
306 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
308 %attr(750,root,http) %dir %{_sysconfdir}/sites
309 %attr(750,root,http) %dir %{_sysconfdir}/sites/default
310 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sites/default/*
321 %dir %{_appdir}/htdocs
322 %{_appdir}/htdocs/*.ico
323 %{_appdir}/htdocs/index.php
324 %{_appdir}/htdocs/misc
325 %{_appdir}/htdocs/themes
326 %{_appdir}/htdocs/modules
328 %dir %attr(775,root,http) /var/lib/%{name}
329 %dir %attr(775,root,http) /var/cache/%{name}
332 %defattr(644,root,root,755)
333 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}
337 %defattr(644,root,root,755)
338 %doc database/*.mysql
339 %doc README.replication
342 %defattr(644,root,root,755)
343 %doc database/*.pgsql
346 %defattr(644,root,root,755)
347 %{_appdir}/htdocs/xmlrpc.php