SPECS (DEVEL): drupal.spec - added php-mbstring for better multiby...

glen glen at pld-linux.org
Fri Dec 30 18:18:36 CET 2005


Author: glen                         Date: Fri Dec 30 17:18:36 2005 GMT
Module: SPECS                         Tag: DEVEL
---- Log message:
- added php-mbstring for better multibyte support
- made -cron package autodep php binary
- fixed themes install
- added banner to drupal first install

---- Files affected:
SPECS:
   drupal.spec (1.42.2.4 -> 1.42.2.5) 

---- Diffs:

================================================================
Index: SPECS/drupal.spec
diff -u SPECS/drupal.spec:1.42.2.4 SPECS/drupal.spec:1.42.2.5
--- SPECS/drupal.spec:1.42.2.4	Thu Dec 29 16:53:04 2005
+++ SPECS/drupal.spec	Fri Dec 30 18:18:30 2005
@@ -4,7 +4,7 @@
 Summary(pl):	Platforma do zarządzania treścią o otwartych źródłach
 Name:		drupal
 Version:	4.7.0
-Release:	0.%{_beta}.3
+Release:	0.%{_beta}.13
 License:	GPL
 Group:		Applications/WWW
 Source0:	http://drupal.org/files/projects/%{name}-%{version}-%{_beta}.tar.gz
@@ -14,10 +14,11 @@
 Source3:	%{name}.PLD
 #Patch0:	%{name}-replication.patch
 Patch1:		%{name}-sitesdir.patch
-#Patch2:	%{name}-topdir.patch
+Patch2:		%{name}-topdir.patch
 Patch3:		%{name}-themedir2.patch
 #Patch4:	%{name}-emptypass.patch
-#Patch5:	%{name}-cron.patch
+Patch5:	%{name}-cron.patch
+Patch6:	%{name}-mysql.patch
 URL:		http://drupal.org/
 BuildRequires:	rpmbuild(macros) >= 1.264
 BuildRequires:	sed >= 4.0
@@ -28,6 +29,7 @@
 Requires:	apache(mod_expires)
 Requires:	apache(mod_rewrite)
 Requires:	php >= 3:4.3.3
+Requires:	php-mbstring
 Requires:	php-mysql
 Requires:	php-pcre
 Requires:	php-xml
@@ -92,7 +94,6 @@
 Summary(pl):	Usługa cron dla Drupala
 Group:		Applications/WWW
 Requires:	%{name} = %{version}-%{release}
-Requires:	/usr/bin/php
 Requires:	crondaemon
 Requires:	php-cli >= 3:4.3.3
 
@@ -164,10 +165,11 @@
 %setup -q %{?_beta:-n %{name}-%{version}-%{_beta}}
 #%patch0 -p1
 %patch1 -p1
-#%patch2 -p1
+%patch2 -p1
 %patch3 -p1
 #%patch4 -p1
-#%patch5 -p1
+%patch5 -p1
+%patch6 -p1
 
 find -name '*~' | xargs -r rm -v
 cp -p %{SOURCE3} README.PLD
@@ -182,7 +184,7 @@
 cp -a update.php 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}
+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}
@@ -194,19 +196,34 @@
 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
+install_theme() {
+set -x
+	local theme=$1
+	local appdir=$RPM_BUILD_ROOT%{_appdir}
+	local themedir=$appdir/htdocs/themes
+	local themedir_shadow=$appdir/themes
+
+	install -d $themedir/$theme
+	cp -a themes/$theme/*.* $themedir/$theme
+	if [ -f themes/$theme/*.theme ]; then
+		install -d $themedir_shadow/$theme
+		mv $themedir/$theme/*.theme $themedir_shadow/$theme
+		ln -s ../../htdocs/themes/$theme/screenshot.png $themedir_shadow/$theme
+	else
+		if [[ $theme = */* ]]; then
+			ln -s ../../htdocs/themes/$theme $themedir_shadow/$theme
+		else
+			ln -s ../htdocs/themes/$theme $themedir_shadow/$theme
+		fi
+	fi
+}
 
-# a hack
-s=themes/chameleon/marvin
-ln -s ../../htdocs/$s $RPM_BUILD_ROOT%{_appdir}/$s
+install -d $RPM_BUILD_ROOT%{_appdir}/{themes,htdocs/themes}
+install_theme bluemarine
+install_theme chameleon
+install_theme chameleon/marvin
+install_theme pushbutton
+cp -a themes/engines $RPM_BUILD_ROOT%{_appdir}/themes
 
 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
@@ -215,14 +232,23 @@
 %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
@@ -230,7 +256,7 @@
 
 %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
@@ -336,7 +362,7 @@
 %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)
@@ -362,6 +388,12 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.42.2.5  2005/12/30 17:18:30  glen
+- added php-mbstring for better multibyte support
+- made -cron package autodep php binary
+- fixed themes install
+- added banner to drupal first install
+
 Revision 1.42.2.4  2005/12/29 15:53:04  glen
 - merged from HEAD
 - avoid perl deps
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/drupal.spec?r1=1.42.2.4&r2=1.42.2.5&f=u



More information about the pld-cvs-commit mailing list