SPECS: php-pear-PEAR.spec - bootstraping, note this version is sti...

glen glen at pld-linux.org
Mon Mar 6 22:48:50 CET 2006


Author: glen                         Date: Mon Mar  6 21:48:50 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- bootstraping, note this version is still broken as it can't build packages
  already installed on system

---- Files affected:
SPECS:
   php-pear-PEAR.spec (1.106 -> 1.107) 

---- Diffs:

================================================================
Index: SPECS/php-pear-PEAR.spec
diff -u SPECS/php-pear-PEAR.spec:1.106 SPECS/php-pear-PEAR.spec:1.107
--- SPECS/php-pear-PEAR.spec:1.106	Mon Mar  6 20:37:09 2006
+++ SPECS/php-pear-PEAR.spec	Mon Mar  6 22:48:45 2006
@@ -1,20 +1,27 @@
 # $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.5
 Summary:	PEAR Base System
 Summary(pl):	Podstawowy system PEAR
 Name:		php-pear-%{_pearname}
 Version:	1.4.8
-Release:	0.4
+Release:	%{?with_bootstrap:bootstrap.}%{_rel}
 Epoch:		1
 License:	PHP 3.0
 Group:		Development/Languages/PHP
 Source0:	http://pear.php.net/get/%{_pearname}-%{version}.tgz
 # Source0-md5:	4d29453e1926f11e05b7cfbf4ab085e7
-Source1:	%{name}-template.spec
+Source1:	http://pear.php.net/get/Console_Getopt-1.2.tgz
+# Source2-md5:	8f9ec8253c04350bc01ee7ca941e24b6
+Source2:	%{name}-template.spec
 Patch0:		%{name}-sysconfdir.patch
 Patch1:		%{name}-rpmpkgname.patch
 Patch2:		%{name}-rpmvars.patch
@@ -24,7 +31,7 @@
 URL:		http://pear.php.net/package/PEAR
 BuildRequires:	php-cli
 BuildRequires:	php-pear >= 4:1.0-12.3
-BuildRequires:	rpm-php-pearprov >= 4.4.2-11
+%{!?with_bootstrap:BuildRequires:	rpm-php-pearprov >= 4.4.2-11}
 Requires:	%{name}-core = %{epoch}:%{version}-%{release}
 Requires:	/usr/bin/php
 Requires:	php-pcre
@@ -48,6 +55,11 @@
 %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
+
 %description
 The PEAR package contains:
 - the PEAR installer, for creating, distributing and installing
@@ -82,6 +94,9 @@
 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:
@@ -100,7 +115,21 @@
 - PEAR_ErrorStack i PEAR_Exception
 
 %prep
+%if %{with bootstrap}
+%setup -qc -a1
+(
+	D=$(pwd)
+	cd %{_class}-%{version}
+	mv ../package2.xml .
+	P=$(pwd)
+	C=$(echo ../Console_Getopt-*)
+	%define __pear php -doutput_buffering=1 -dinclude_path="${P}:${C}" ${P}/scripts/pearcmd.php
+	%__pear install --packagingroot=$D --offline --nodeps package2.xml
+) | %__pear_install_log
+%else
 %pear_package_setup
+%endif
+
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
@@ -112,7 +141,6 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-
 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{php_pear_dir},%{_bindir}}
 
 D=$(pwd)
@@ -154,7 +182,7 @@
 # for rpm to find interpreter
 chmod +x $RPM_BUILD_ROOT%{_bindir}/*
 
-sed -e '/^\$''Log: /,$d' %{SOURCE1} > $RPM_BUILD_ROOT%{php_pear_dir}/data/%{_class}/template.spec
+sed -e '/^\$''Log: /,$d' %{SOURCE2} > $RPM_BUILD_ROOT%{php_pear_dir}/data/%{_class}/template.spec
 echo '$''Log: $' >> $RPM_BUILD_ROOT%{php_pear_dir}/data/%{_class}/template.spec
 
 %post
@@ -227,6 +255,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.107  2006/03/06 21:48:45  glen
+- bootstraping, note this version is still broken as it can't build packages
+  already installed on system
+
 Revision 1.106  2006/03/06 19:37:09  qboosh
 - updated pl summary
 
================================================================

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



More information about the pld-cvs-commit mailing list