]> git.pld-linux.org Git - packages/drupal.git/blobdiff - drupal.spec
- merge drupal-apache1.conf back to main apache config, i don't see what is that...
[packages/drupal.git] / drupal.spec
index de2e687fe43bf16f8b04b00333884953d1042af8..153ca2ddb47cec693a4bbc2ea1ebe11a3ef01041 100644 (file)
@@ -1,36 +1,38 @@
+# TODO
+# - why not drupal 6.0?
 Summary:       Open source content management platform
-Summary(pl):   Platforma do zarz±dzania tre¶ci± o otwartych ¼ród³ach
+Summary(pl.UTF-8):     Platforma do zarządzania treścią o otwartych źródłach
 Name:          drupal
-Version:       4.6.4
-Release:       0.8
+Version:       5.7
+Release:       0.4
 License:       GPL
 Group:         Applications/WWW
-Source0:       http://drupal.org/files/projects/%{name}-%{version}.tar.gz
-# Source0-md5: c61d95c766a7ff624abbe04c2430e5df
+Source0:       http://ftp.osuosl.org/pub/drupal/files/projects/%{name}-%{version}.tar.gz
+# Source0-md5: c7d9911ad1001c790bbdfe6fd4cdfc89
 Source1:       %{name}.conf
 Source2:       %{name}.cron
 Source3:       %{name}.PLD
-Patch0:                %{name}-replication.patch
+Patch0:                %{name}-cron.patch
 Patch1:                %{name}-sitesdir.patch
 Patch2:                %{name}-topdir.patch
 Patch3:                %{name}-themedir2.patch
-Patch4:                %{name}-emptypass.patch
-Patch5:                %{name}-cron.patch
+#Patchx:       %{name}-replication.patch
+#Patchx:       %{name}-emptypass.patch
 URL:           http://drupal.org/
 BuildRequires: rpmbuild(macros) >= 1.264
 BuildRequires: sed >= 4.0
-Requires:      webapps
-Requires:      webserver = apache
-Requires:      apache(mod_dir)
+Requires:      %{name}(DB_Driver) = %{version}-%{release}
 Requires:      apache(mod_access)
+Requires:      apache(mod_alias)
+Requires:      apache(mod_dir)
 Requires:      apache(mod_expires)
 Requires:      apache(mod_rewrite)
-Requires:      apache(mod_alias)
-Requires:      php >= 3:4.3.3
-Requires:      php-mysql
-Requires:      php-pcre
-Requires:      %{name}(DB_Driver) = %{version}-%{release}
-Requires:      php-xml
+Requires:      php(mbstring)
+Requires:      php(pcre)
+Requires:      php(xml)
+Requires:      webapps
+Requires:      webserver = apache
+Requires:      webserver(php) >= 4.3.3
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -62,83 +64,88 @@ Drupal includes features to enable
 
 and much more.
 
-%description -l pl
-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
+%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
+- strony miłośników
 - aplikacje e-commerce
-- s³owniki zasobów
+- słowniki zasobów
 
-Drupal zawiera zasoby umo¿liwiaj±ce tworzenie:
-- systemów zarz±dzania tre¶ci±
-- blogów
-- rodowisk pracy grupowej
-- foró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
+- galerii zdjęć
+- wrzucania i ściągania plików
 
-i wiele wiêcej.
+i wiele więcej.
 
 %package cron
 Summary:       Drupal cron
-Summary(pl):   Us³uga cron dla Drupala
+Summary(pl.UTF-8):     Usługa cron dla Drupala
 Group:         Applications/WWW
 Requires:      %{name} = %{version}-%{release}
 Requires:      crondaemon
 Requires:      php-cli >= 3:4.3.3
-Requires:      /usr/bin/php
 
 %description cron
 This package contains script which invokes cron hooks for Drupal.
 
-%description cron -l pl
-Ten pakiet zawiera skrypt wywo³uj±cy uchwyty crona dla Drupala.
+%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):   Sterownik bazy danych MySQL dla Drupala
+Summary(pl.UTF-8):     Sterownik bazy danych MySQL dla Drupala
 Group:         Applications/WWW
-Requires:      php-mysql
+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
-Ten wirtualny pakiet dostarcza backend bazy danych MySQL dla
-Drupala.
+%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):   Sterownik bazy danych PostgreSQL dla Drupala
+Summary(pl.UTF-8):     Sterownik bazy danych PostgreSQL dla Drupala
 Group:         Applications/WWW
-Requires:      php-pgsql
+Requires:      php(pgsql)
 Provides:      %{name}(DB_Driver) = %{version}-%{release}
 
 %description db-pgsql
-This virtual package provides PostgreSQL database backend for
-Drupal.
+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
+%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
+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 update
+Summary:       Package to perform Drupal database updates
+Group:         Applications/WWW
+Requires:      %{name} = %{version}-%{release}
+
+%description update
+This package contains scripts needed to do database updates via web.
+
 %package xmlrpc
 Summary:       XMLRPC server for Drupal
-Summary(pl):   Serwer XMLRPC dla Drupala
+Summary(pl.UTF-8):     Serwer XMLRPC dla Drupala
 Group:         Applications/WWW
 Requires:      %{name} = %{version}-%{release}
 
@@ -147,54 +154,53 @@ 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
-Serwer XMLRPC dla Drupala pozwala innym Drupalom autoryzowaæ siê z
-danymi uwierzytelniaj±cymi u¿ytkownika danego Drupala - jest to
+%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
+%setup -q %{?_rc:-n %{name}-%{version}-%{_rc}}
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
-%patch4 -p1
-%patch5 -p1
 
-find -name '*~' | xargs -r rm -v
+# cleanup backups after patching
+find . '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
 cp -p %{SOURCE3} README.PLD
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/cron.d,/var/{cache,lib}/%{name}} \
-       $RPM_BUILD_ROOT%{_appdir}/{po,modules/po,htdocs/modules}
+       $RPM_BUILD_ROOT%{_appdir}/{po,database,modules/po,htdocs/modules,themes}
 
-cp -a *.ico index.php $RPM_BUILD_ROOT%{_appdir}/htdocs
+cp -a 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 install.php update.php xmlrpc.php $RPM_BUILD_ROOT%{_appdir}/htdocs
 
 cp -a 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}
+cp -a modules/* $RPM_BUILD_ROOT%{_appdir}/modules
+cp -a themes/* $RPM_BUILD_ROOT%{_appdir}/themes
+cp -Rl $RPM_BUILD_ROOT%{_appdir}/modules $RPM_BUILD_ROOT%{_appdir}/htdocs
+cp -Rl $RPM_BUILD_ROOT%{_appdir}/themes $RPM_BUILD_ROOT%{_appdir}/htdocs
+
+find $RPM_BUILD_ROOT%{_appdir}/htdocs/themes/ $RPM_BUILD_ROOT%{_appdir}/htdocs/modules/ \
+  -type f -regextype posix-awk \
+  -regex '.*\.(engine|inc|info|install|module|profile|po|sh|.*sql|theme|php|xtmpl)$|.*/(code-style\.pl|Entries.*|Repository|Root|Tag|Template)$' \
+  -print0 | xargs -0 -r -l512 rm -f
+find $RPM_BUILD_ROOT%{_appdir}/themes/ $RPM_BUILD_ROOT%{_appdir}/modules/ \
+  -type f -regextype posix-awk \
+  ! -regex '.*\.(engine|inc|info|install|module|profile|po|sh|.*sql|theme|php|xtmpl)$|.*/(code-style\.pl|Entries.*|Repository|Root|Tag|Template)$' \
+  -print0 | xargs -0 -r -l512 rm -f
+
+# avoid pulling perl dep
+chmod -x $RPM_BUILD_ROOT%{_appdir}/scripts/*
 
 ln -s /var/lib/%{name} $RPM_BUILD_ROOT%{_appdir}/files
 
-# 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}
@@ -202,14 +208,23 @@ install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post
+if [ "$1" = 1 ]; then
+%banner -e %{name} <<'EOF'
+If this is your first install of Drupal, You need at least configure
+$db_url and $base_url in %{_sysconfdir}/sites/default/settings.php
+
+EOF
+fi
+
 %post db-mysql
 if [ "$1" = 1 ]; then
-%banner -e %{name}-db-mysql <<EOF
+%banner -e %{name}-db-mysql <<'EOF'
 If this is your first install of Drupal, you need to create Drupal database:
 
 mysqladmin create drupal
 zcat %{_docdir}/%{name}-db-mysql-%{version}/database.mysql.gz | mysql drupal
-mysql -e "GRANT SELECT, INSERT, UPDATE, DELETE ON drupal.* TO 'drupal'@'localhost' IDENTIFIED BY 'PASSWORD'"
+mysql -e "GRANT SELECT, INSERT, UPDATE, DELETE ON drupal.* TO 'drupal'@'localhost' IDENTIFIED BY 'password'"
 mysql -e "GRANT CREATE TEMPORARY TABLES, LOCK TABLES ON *.* TO 'drupal'@'localhost'"
 
 EOF
@@ -217,7 +232,7 @@ fi
 
 %post db-pgsql
 if [ "$1" = 1 ]; then
-%banner -e %{name}-db-pgsql <<EOF
+%banner -e %{name}-db-pgsql <<'EOF'
 If this is your first install of Drupal, you need to create Drupal database:
 
 and import initial schema from
@@ -226,73 +241,21 @@ and import initial schema from
 EOF
 fi
 
-%triggerin -- apache1
+%triggerin -- apache1 < 1.3.37-3, apache1-base
 %webapp_register apache %{_webapp}
 
-%triggerun -- apache1
+%triggerun -- apache1 < 1.3.37-3, apache1-base
 %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
-# rescue app configs.
-if [ -f /etc/drupal/sites/default/settings.php.rpmsave ]; then
-       mv -f %{_sysconfdir}/sites/default/settings.php{,.rpmnew}
-       mv -f /etc/drupal/sites/default/settings.php.rpmsave %{_sysconfdir}/sites/default/settings.php
-fi
-# other configured sites, if any
-for i in /etc/drupal/sites/*; do
-       d=$(basename $i)
-       [ "$d" = "default" ] && continue
-       mv -f %{_sysconfdir}/sites/$d{,.rpmnew}
-       mv -f $i %{_sysconfdir}/sites/$d
-done
-
-# migrate from apache-config macros
-if [ -f /etc/drupal/apache.conf.rpmsave ]; then
-       if [ -d /etc/apache/webapps.d ]; then
-               cp -f %{_sysconfdir}/apache.conf{,.rpmnew}
-               cp -f /etc/drupal/apache.conf.rpmsave %{_sysconfdir}/apache.conf
-       fi
-
-       if [ -d /etc/httpd/webapps.d ]; then
-               cp -f %{_sysconfdir}/httpd.conf{,.rpmnew}
-               cp -f /etc/drupal/apache.conf.rpmsave %{_sysconfdir}/httpd.conf
-       fi
-       rm -f /etc/drupal/apache.conf.rpmsave
-fi
-
-# place new config location, as trigger puts config only on first install, do it here.
-if [ -L /etc/apache/conf.d/99_%{name}.conf ]; then
-       rm -f /etc/apache/conf.d/99_%{name}.conf
-       /usr/sbin/webapp register apache %{_webapp}
-       apache_reload=1
-fi
-if [ -L /etc/httpd/httpd.conf/99_%{name}.conf ]; then
-       rm -f /etc/httpd/httpd.conf/99_%{name}.conf
-       /usr/sbin/webapp register httpd %{_webapp}
-       httpd_reload=1
-fi
-
-if [ "$httpd_reload" ]; then
-       if [ -f /var/lock/subsys/httpd ]; then
-               /etc/rc.d/init.d/httpd reload 1>&2
-       fi
-fi
-if [ "$apache_reload" ]; then
-       if [ -f /var/lock/subsys/apache ]; then
-               /etc/rc.d/init.d/apache reload 1>&2
-       fi
-fi
-
 %files
 %defattr(644,root,root,755)
 %doc *.txt README.PLD
-%doc database/updates.inc
 
 %dir %attr(750,root,http) %{_sysconfdir}
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
@@ -301,6 +264,8 @@ fi
 %attr(750,root,http) %dir %{_sysconfdir}/sites
 %attr(750,root,http) %dir %{_sysconfdir}/sites/default
 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sites/default/*
+%attr(750,root,http) %dir %{_sysconfdir}/sites/all
+%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sites/all/*
 
 %dir %{_appdir}
 %{_appdir}/includes
@@ -312,8 +277,8 @@ fi
 %{_appdir}/files
 
 %dir %{_appdir}/htdocs
-%{_appdir}/htdocs/*.ico
 %{_appdir}/htdocs/index.php
+%{_appdir}/htdocs/install.php
 %{_appdir}/htdocs/misc
 %{_appdir}/htdocs/themes
 %{_appdir}/htdocs/modules
@@ -324,16 +289,19 @@ fi
 %files cron
 %defattr(644,root,root,755)
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}
-%{_appdir}/cron.php
+%attr(775,root,root) %{_appdir}/cron.php
 
 %files db-mysql
 %defattr(644,root,root,755)
-%doc database/*.mysql
-%doc README.replication
+#%doc README.replication
 
 %files db-pgsql
 %defattr(644,root,root,755)
-%doc database/*.pgsql
+
+%files update
+%defattr(644,root,root,755)
+%{_appdir}/htdocs/update.php
+%{_appdir}/database
 
 %files xmlrpc
 %defattr(644,root,root,755)
This page took 0.093031 seconds and 4 git commands to generate.