SPECS: php-pear-PEAR.spec - 1.4.9 - builds without php-pear-PEAR, ...

glen glen at pld-linux.org
Thu Mar 30 12:27:19 CEST 2006


Author: glen                         Date: Thu Mar 30 10:27:19 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- 1.4.9
- builds without php-pear-PEAR, but suddenly rpmbuild fails to make rpm

---- Files affected:
SPECS:
   php-pear-PEAR.spec (1.113 -> 1.114) 

---- Diffs:

================================================================
Index: SPECS/php-pear-PEAR.spec
diff -u SPECS/php-pear-PEAR.spec:1.113 SPECS/php-pear-PEAR.spec:1.114
--- SPECS/php-pear-PEAR.spec:1.113	Tue Mar  7 19:20:11 2006
+++ SPECS/php-pear-PEAR.spec	Thu Mar 30 12:27:13 2006
@@ -1,24 +1,19 @@
 # $Revision$, $Date$
-#
-# Conditional build:
-%bcond_with	bootstrap		# bootstrapping - don't require rpm-php-pearprov  to build
-#
-%include	/usr/lib/rpm/macros.php
 %define		_class		PEAR
 %define		_status		stable
 %define		_pearname	%{_class}
 #
-%define	_rel 0.14
+%include	/usr/lib/rpm/macros.php
 Summary:	PEAR Base System
 Summary(pl):	Podstawowy system PEAR
 Name:		php-pear-%{_pearname}
-Version:	1.4.8
-Release:	%{?with_bootstrap:bootstrap.}%{_rel}
+Version:	1.4.9
+Release:	0.25
 Epoch:		1
 License:	PHP 3.0
 Group:		Development/Languages/PHP
 Source0:	http://pear.php.net/get/%{_pearname}-%{version}.tgz
-# Source0-md5:	4d29453e1926f11e05b7cfbf4ab085e7
+# Source0-md5:	52257e23987717c474a3da87f161a272
 Source1:	http://pear.php.net/get/Console_Getopt-1.2.tgz
 # Source1-md5:	8f9ec8253c04350bc01ee7ca941e24b6
 Source2:	%{name}-template.spec
@@ -30,7 +25,7 @@
 Patch5:		%{name}-FHS.patch
 URL:		http://pear.php.net/package/PEAR
 BuildRequires:	php-cli
-%{!?with_bootstrap:BuildRequires:	rpm-php-pearprov >= 4.4.2-11}
+BuildRequires:	rpm-php-pearprov >= 4.4.2-30.1
 Requires:	%{name}-core = %{epoch}:%{version}-%{release}
 Requires:	/usr/bin/php
 Requires:	php-pcre
@@ -52,12 +47,8 @@
 
 # PEAR_Command_Packaging is separate package
 %define		_noautoreq	'pear(PEAR/FTP.php)' 'pear(Net/FTP.php)' 'pear(XML/RPC.*)' 'pear(PEAR/Command/Packaging.php)'
-%define		_statedir	/var/lib/pear
-
-%if %{with bootstrap}
-%define __php_provides %{nil}
-%define __php_requires %{nil}
-%endif
+%define		_statedir		/var/lib/pear
+%define		pear_registry	%{_statedir}/registry
 
 %description
 The PEAR package contains:
@@ -93,9 +84,6 @@
 Summary:	PEAR core classes
 Summary(pl):	Główne klasy PEAR-a
 Group:		Development/Languages/PHP
-%if %{with bootstrap}
-Provides:	pear(PEAR.php)
-%endif
 
 %description core
 This package includes PEAR core classes:
@@ -114,17 +102,10 @@
 - PEAR_ErrorStack i PEAR_Exception
 
 %prep
-%if %{with bootstrap}
-P=%{_class}-%{version}
-C=$(basename %{SOURCE1} .tgz)
-%define __pear php -doutput_buffering=1 -dinclude_path=".:../${C}" scripts/pearcmd.php
+%define __build_dir %{_builddir}/%{_class}-%{version}
+%define	__php_include_path %{__build_dir}/%{_class}-%{version}:%{__build_dir}/%(basename %{SOURCE1} .tgz)
+%define __pear php -doutput_buffering=1 -dinclude_path="%__php_include_path" %{__build_dir}/%{_class}-%{version}/scripts/pearcmd.php
 %pear_package_setup -z -a1
-%else
-# always use bundled PEAR, as the 1.4.7+ version can't build if PEAR is present
-# on system. you may call it a hack.
-%define __pear php -doutput_buffering=1 scripts/pearcmd.php
-%pear_package_setup -z
-%endif
 
 %patch0 -p1
 %patch1 -p1
@@ -141,7 +122,7 @@
 
 D=$(pwd)
 pearcmd() {
-	php -doutput_buffering=1 -dinclude_path=".:${D}%{php_pear_dir}" ${D}%{php_pear_dir}/pearcmd.php -c ${D}/pearrc "$@"
+	%{__pear} -c ${D}/pearrc "$@"
 }
 pearcmd config-set doc_dir %{_docdir} || exit
 pearcmd config-set data_dir %{php_pear_dir}/data || exit
@@ -152,7 +133,10 @@
 
 %pear_package_install
 
-install -d $RPM_BUILD_ROOT%{_statedir}/{registry/.channel.{__uri,pecl.php.net},channels/.alias}
+install -d $RPM_BUILD_ROOT%{_statedir}/channels/.alias
+mv $RPM_BUILD_ROOT{%{php_pear_dir}/.registry,%{pear_registry}}
+ln -s %{pear_registry} $RPM_BUILD_ROOT%{php_pear_dir}/.registry
+install -d $RPM_BUILD_ROOT%{pear_registry}/{.channel.{__uri,pecl.php.net},channels/.alias}
 touch $RPM_BUILD_ROOT%{_statedir}/.depdb{,lock}
 touch $RPM_BUILD_ROOT%{_statedir}/channels/{__uri,{pear,pecl}.php.net}.reg
 touch $RPM_BUILD_ROOT%{_statedir}/channels/.alias/{pear,pecl}.txt
@@ -182,24 +166,22 @@
 echo '$''Log: $' >> $RPM_BUILD_ROOT%{php_pear_dir}/data/%{_class}/template.spec
 
 %post
-if [ ! -e %{php_pear_dir}/.registry ]; then
-	ln -s %{_statedir}/registry %{php_pear_dir}/.registry
+if [ ! -L %{php_pear_dir}/.registry ]; then
+	mv -f %{php_pear_dir}/.registry/*.reg %{pear_registry}
+	rmdir %{php_pear_dir/.registry/.channel.* 2>/dev/null
+	rmdir %{php_pear_dir}/.registry/* 2>/dev/null
+	rmdir %{php_pear_dir}/.registry 2>/dev/null || mv -v %{php_pear_dir}/.registry{,.rpmsave}
+	ln -s %{pear_registry} %{php_pear_dir}/.registry
 fi
+
 if [ ! -f %{php_pear_dir}/.lock ]; then
+	umask 2
 	%{_bindir}/pear list > /dev/null
 fi
 if [ -f %{_docdir}/%{name}-%{version}/optional-packages.txt ]; then
 	cat %{_docdir}/%{name}-%{version}/optional-packages.txt
 fi
 
-%triggerpostun -- %{name} < 1:1.4.7-0.3
-if [ ! -L %{php_pear_dir}/.registry ]; then
-	mv -f %{php_pear_dir}/.registry/*.reg %{_statedir}/registry
-	rmdir %{php_pear_dir}/.registry/* 2>/dev/null
-	rmdir %{php_pear_dir}/.registry 2>/dev/null || mv -v %{php_pear_dir}/.registry{,.rpmsave}
-	ln -s %{_statedir}/registry %{php_pear_dir}/.registry
-fi
-
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -208,7 +190,8 @@
 %doc install.log optional-packages.txt
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pear.conf
 %attr(755,root,root) %{_bindir}/*
-%{php_pear_dir}/.registry/*.reg
+%dir %{pear_registry}
+%{pear_registry}/*.reg
 %{php_pear_dir}/pearcmd.php
 %{php_pear_dir}/peclcmd.php
 %{php_pear_dir}/PEAR/[!CE]*
@@ -221,7 +204,6 @@
 
 %dir %{_statedir}
 %dir %{_statedir}/channels
-%dir %{_statedir}/registry
 %dir %{_statedir}/channels/.alias
 
 %ghost %{_statedir}/channels/.alias/pear.txt
@@ -235,6 +217,7 @@
 %ghost %{_statedir}/.depdb
 %ghost %{php_pear_dir}/.filemap
 %ghost %{php_pear_dir}/.lock
+%ghost %{php_pear_dir}/.registry
 
 %files core
 %defattr(644,root,root,755)
@@ -251,6 +234,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.114  2006/03/30 10:27:13  glen
+- 1.4.9
+- builds without php-pear-PEAR, but suddenly rpmbuild fails to make rpm
+
 Revision 1.113  2006/03/07 18:20:11  glen
 - lock and filemap not moved to /var until install is fixed
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/php-pear-PEAR.spec?r1=1.113&r2=1.114&f=u



More information about the pld-cvs-commit mailing list