+%define _ver 4.6
+%define _patchlevel 7
Summary: Open source content management platform
Summary(pl): Platforma do zarz±dzania tre¶ci± o otwartych ¼ród³ach
Name: drupal
-Version: 4.6.5
-Release: 0.14
+Version: %{_ver}.%{_patchlevel}
+Release: 3
License: GPL
Group: Applications/WWW
Source0: http://drupal.org/files/projects/%{name}-%{version}.tar.gz
-# Source0-md5: 21e5e768d92fb6ecf52d56cacd37706e
+# Source0-md5: 8c15ded4450a1afcf0c5b6593dc74541
Source1: %{name}.conf
Source2: %{name}.cron
Source3: %{name}.PLD
BuildRequires: rpmbuild(macros) >= 1.264
BuildRequires: sed >= 4.0
Requires: %{name}(DB_Driver) = %{version}-%{release}
+Requires: %{name}(theme) = %{_ver}
Requires: apache(mod_access)
Requires: apache(mod_alias)
Requires: apache(mod_dir)
Requires: php-xml
Requires: webapps
Requires: webserver = apache
+Obsoletes: drupal-update
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
maj± schematy bazy danych dla PostgreSQL-a. Mo¿na go u¿ywaæ na w³asne
ryzyko.
-%package update
-Summary: Package to perform Drupal database updates
+%package themes
+Summary: Themes distributed with Drupal
+Summary(pl): Motywy rozprowadzane z Drupalem
Group: Applications/WWW
Requires: %{name} = %{version}-%{release}
+Provides: drupal(theme) = %{_ver}
-%description update
-This package contains scripts needed to do database updates via web.
+%description themes
+This package contains themes distributed with Drupal.
+
+%description themes -l pl
+Ten pakiet zawiera motywy rozprowadzane z Drupalem.
%package xmlrpc
Summary: XMLRPC server for Drupal
cp -a *.ico index.php $RPM_BUILD_ROOT%{_appdir}/htdocs
cp -a misc $RPM_BUILD_ROOT%{_appdir}/htdocs
-cp -a update.php xmlrpc.php $RPM_BUILD_ROOT%{_appdir}/htdocs
+cp -a xmlrpc.php $RPM_BUILD_ROOT%{_appdir}/htdocs
cp -a database/updates.inc $RPM_BUILD_ROOT%{_appdir}/database
-cp -a cron.php $RPM_BUILD_ROOT%{_appdir}
+cp -a cron.php update.php $RPM_BUILD_ROOT%{_appdir}
cp -a modules/* $RPM_BUILD_ROOT%{_appdir}/modules
cp -a includes scripts $RPM_BUILD_ROOT%{_appdir}
cp -a sites $RPM_BUILD_ROOT%{_sysconfdir}
%triggerun -- apache1
%webapp_unregister apache %{_webapp}
-%triggerin -- apache >= 2.0.0
+%triggerin -- apache < 2.2.0, apache-base
%webapp_register httpd %{_webapp}
-%triggerun -- apache >= 2.0.0
+%triggerun -- apache < 2.2.0, apache-base
%webapp_unregister httpd %{_webapp}
%triggerpostun -- %{name} < 4.6.4-0.4
fi
if [ "$httpd_reload" ]; then
- %service httpd reload
+ %service -q httpd reload
fi
if [ "$apache_reload" ]; then
- %service apache reload
+ %service -q apache reload
fi
+%triggerpostun -- %{name} < 4.6.7-2.6
+grep -c This_is_a_Drupal_security_line_do_not_remove \
+%{_sysconfdir}/apache.conf %{_sysconfdir}/httpd.conf \
+| awk -F: '/:0/{print $1}' | xargs -r \
+sed -i -e '
+/<Directory \/var\/lib\/drupal>/{
+ n
+ a\ SetHandler This_is_a_Drupal_security_line_do_not_remove
+}'
+[ ! -L /etc/httpd/webapps.d/drupal.conf ] || %service -q httpd reload
+[ ! -L /etc/apache/webapps.d/drupal.conf ] || %service -q apache reload
+
%files
%defattr(644,root,root,755)
%doc *.txt README.PLD
%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sites/default/*
%dir %{_appdir}
+%{_appdir}/database
%{_appdir}/includes
+%exclude %{_appdir}/includes/database.mysql.inc
+%exclude %{_appdir}/includes/database.pgsql.inc
%{_appdir}/modules
%{_appdir}/scripts
-%{_appdir}/themes
+%dir %{_appdir}/themes
+%dir %{_appdir}/themes/engines
%{_appdir}/po
-# symlink
+%{_appdir}/update.php
+# symlinks
%{_appdir}/files
%{_appdir}/misc
%{_appdir}/htdocs/*.ico
%{_appdir}/htdocs/index.php
%{_appdir}/htdocs/misc
-%{_appdir}/htdocs/themes
+%dir %{_appdir}/htdocs/themes
%{_appdir}/htdocs/modules
%dir %attr(775,root,http) /var/lib/%{name}
%defattr(644,root,root,755)
%doc database/*.mysql
%doc README.replication
+%{_appdir}/includes/database.mysql.inc
%files db-pgsql
%defattr(644,root,root,755)
%doc database/*.pgsql
+%{_appdir}/includes/database.pgsql.inc
-%files update
+%files themes
%defattr(644,root,root,755)
-%{_appdir}/htdocs/update.php
-%{_appdir}/database
+%{_appdir}/themes/[!e]*
+%{_appdir}/themes/engines/*
+%{_appdir}/htdocs/themes/*
%files xmlrpc
%defattr(644,root,root,755)