# # Conditional build: %bcond_with ugly_patch # enable ugly patch. don't use it ;) # %define _ver 4.6 %define _patchlevel 11 %define _rel 4 Summary: Open source content management platform Summary(pl.UTF-8): Platforma do zarządzania treścią o otwartych źródłach Name: drupal Version: %{_ver}.%{_patchlevel} Release: %{_rel}%{?with_ugly_patch:p} License: GPL Group: Applications/WWW Source0: http://drupal.org/files/projects/%{name}-%{version}.tar.gz # Source0-md5: cfa5777fb6a612addcee75dad132909e Source1: %{name}.conf Source2: %{name}.cron Source3: %{name}.PLD Patch0: %{name}-replication.patch Patch1: %{name}-sitesdir.patch Patch2: %{name}-topdir.patch Patch3: %{name}-themedir2.patch Patch4: %{name}-emptypass.patch Patch5: %{name}-cron.patch Patch6: %{name}-19298-cache.patch Patch7: %{name}-update-cli.patch Patch8: %{name}-locale-memory.patch Patch9: %{name}-comment.patch Patch10: %{name}-disabled_fields.patch Patch11: %{name}-http-reject.patch URL: http://drupal.org/ BuildRequires: rpmbuild(macros) >= 1.264 BuildRequires: sed >= 4.0 Requires: %{name}(DB_Driver) = %{version}-%{release} Requires: %{name}(theme) = %{_ver} Requires: /usr/bin/php Requires: apache(mod_access) Requires: apache(mod_alias) Requires: apache(mod_dir) Requires: apache(mod_expires) Requires: apache(mod_rewrite) Requires: php(mysql) Requires: php(pcre) Requires: php(xml) Requires: webapps Requires: webserver = apache Requires: webserver(php) >= 4.3.3 Provides: %{name} = %{_ver} Obsoletes: drupal-update BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define _appdir %{_datadir}/%{name} %define _webapps /etc/webapps %define _webapp %{name} %define _sysconfdir %{_webapps}/%{_webapp} %description Drupal is software that allows an individual or a community of users to easily publish, manage and organize a great variety of content on a website. Tens of thousands of people and organizations have used Drupal to set up scores of different kinds of web sites, including - community web portals and discussion sites - corporate web sites/intranet portals - personal web sites - afficionado sites - e-commerce applications - resource directories Drupal includes features to enable - content management systems - blogs - collaborative authoring environments - forums - newsletters - picture galleries - file uploads and download and much more. %description -l pl.UTF-8 Drupal to oprogramowanie pozwalające osobie lub społeczności użytkowników na łatwe publikowanie, zarządzanie i organizowanie różnej treści na stronie WWW. Dziesiątki tysięcy ludzi i organizacji używali Drupala do ustawiania wyników różnych rodzajów stron WWW, w tym: - portale WWW i strony dyskusyjne społeczności - korporacyjne strony WWW/portale intranetowe - osobiste strony WWW - strony miłośników - aplikacje e-commerce - słowniki zasobów Drupal zawiera zasoby umożliwiające tworzenie: - systemów zarządzania treścią - blogów - środowisk pracy grupowej - forów - nowin - galerii zdjęć - wrzucania i ściągania plików i wiele więcej. %package cron Summary: Drupal cron Summary(pl.UTF-8): Usługa cron dla Drupala Group: Applications/WWW Requires: %{name} = %{version}-%{release} Requires: crondaemon %description cron This package contains script which invokes cron hooks for Drupal. %description cron -l pl.UTF-8 Ten pakiet zawiera skrypt wywołujący uchwyty crona dla Drupala. %package db-mysql Summary: Drupal DB Driver for MySQL Summary(pl.UTF-8): Sterownik bazy danych MySQL dla Drupala Group: Applications/WWW Requires: php(mysql) Provides: %{name}(DB_Driver) = %{version}-%{release} %description db-mysql This virtual package provides MySQL database backend for Drupal. %description db-mysql -l pl.UTF-8 Ten wirtualny pakiet dostarcza backend bazy danych MySQL dla Drupala. %package db-pgsql Summary: Drupal DB Driver for PostgreSQL Summary(pl.UTF-8): Sterownik bazy danych PostgreSQL dla Drupala Group: Applications/WWW Requires: php(pgsql) Provides: %{name}(DB_Driver) = %{version}-%{release} %description db-pgsql This virtual package provides PostgreSQL database backend for Drupal. NOTE: This driver is not tested in PLD, and not all modules have database schema for PostgreSQL. Use this driver at your own risk! %description db-pgsql -l pl.UTF-8 Ten wirtualny pakiet dostarcza backend bazy danych PostgreSQL dla Drupala. UWAGA: Ten sterownik nie był testowany w PLD i nie wszystkie moduły mają schematy bazy danych dla PostgreSQL-a. Można go używać na własne ryzyko. %package themes Summary: Themes distributed with Drupal Summary(pl.UTF-8): Motywy rozprowadzane z Drupalem Group: Applications/WWW Requires: %{name} = %{version}-%{release} Provides: drupal(theme) = %{_ver} %description themes This package contains themes distributed with Drupal. %description themes -l pl.UTF-8 Ten pakiet zawiera motywy rozprowadzane z Drupalem. %package xmlrpc Summary: XMLRPC server for Drupal Summary(pl.UTF-8): Serwer XMLRPC dla Drupala Group: Applications/WWW Requires: %{name} = %{version}-%{release} %description xmlrpc XMLRPC server for Drupal allows other Drupals authorize with your Drupal's user creditentials, this is called Distributed Authentication in Drupal world. %description xmlrpc -l pl.UTF-8 Serwer XMLRPC dla Drupala pozwala innym Drupalom autoryzować się z danymi uwierzytelniającymi użytkownika danego Drupala - jest to nazywane rozproszonym uwierzytelnianiem. %prep %setup -q %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 %patch6 -p0 %patch7 -p1 %patch8 -p1 %patch9 -p1 %{?with_ugly_patch:%patch10 -p1} %{?with_ugly_patch:%patch11 -p1} cp -p %{SOURCE3} README.PLD # remove backups from patching as we use globs to package files to buildroot find '(' -name '*~' -o -name '*.orig' ')' | xargs -r rm -v %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/cron.d,/var/{cache,lib}/%{name}} \ $RPM_BUILD_ROOT%{_appdir}/{po,database,modules/po,htdocs/modules} cp -a *.ico index.php $RPM_BUILD_ROOT%{_appdir}/htdocs cp -a misc $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 update.php $RPM_BUILD_ROOT%{_appdir} install cron.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} ln -s /var/lib/%{name} $RPM_BUILD_ROOT%{_appdir}/files # needed for node.module for syndication icon ln -s htdocs/misc $RPM_BUILD_ROOT%{_appdir} # install themes cp -a themes $RPM_BUILD_ROOT%{_appdir}/htdocs # move .xtmpl/.theme out of htdocs (cd $RPM_BUILD_ROOT%{_appdir}/htdocs && tar cf - --remove-files themes/*/*.{xtmpl,theme}) | tar -xf - -C $RPM_BUILD_ROOT%{_appdir} mv $RPM_BUILD_ROOT%{_appdir}/{htdocs/,}themes/engines # make screenshot.png available in appdir for a in $RPM_BUILD_ROOT%{_appdir}/htdocs/themes/*; do t=$(basename $a) ln -s ../../htdocs/themes/$t/screenshot.png $RPM_BUILD_ROOT%{_appdir}/themes/$t done # a hack s=themes/chameleon/marvin ln -s ../../htdocs/$s $RPM_BUILD_ROOT%{_appdir}/$s install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name} %clean rm -rf $RPM_BUILD_ROOT %post # Perform database updates echo 'Performing Drupal database updates' cd %{_appdir} && %{_bindir}/php update.php Update echo 'Done' %post db-mysql if [ "$1" = 1 ]; then %banner -e %{name}-db-mysql <