SOURCES: php-pear-build-macros - add -f for pear_package_setup, al...

glen glen at pld-linux.org
Tue Sep 27 23:17:47 CEST 2005


Author: glen                         Date: Tue Sep 27 21:17:47 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- add -f for pear_package_setup, allow package.xml outside subdir

---- Files affected:
SOURCES:
   php-pear-build-macros (1.16 -> 1.17) 

---- Diffs:

================================================================
Index: SOURCES/php-pear-build-macros
diff -u SOURCES/php-pear-build-macros:1.16 SOURCES/php-pear-build-macros:1.17
--- SOURCES/php-pear-build-macros:1.16	Tue Sep 27 23:08:45 2005
+++ SOURCES/php-pear-build-macros	Tue Sep 27 23:17:42 2005
@@ -13,6 +13,7 @@
 # -a #   - unpack SOURCE# instead of SOURCE0
 # -n FMT - create builddir with FMT, instead of default %%{_pearname}-%%{version}
 # -z     - unpack pear package and let pear use package.xml (not tarball) for install. use this for buggy packages.
+# -f     - force pear install. use with care.
 #
 # unpack PEAR package to %%{_builddir}/FMT. package is extracted with already
 # destination hierarchy. you should copy the tree to buildroot after
@@ -29,10 +30,10 @@
 # in %%post of a package. you should put this file to %%doc. noautocompressdoc is
 # automatically added for this file.
 #
-%define pear_package_setup(a:n:z) \
+%define pear_package_setup(a:n:zf) \
 %setup -q -c -T -n %{-n*}%{!-n:%{_pearname}-%{version}}\
 D=%{_builddir}/%{-n*}%{!-n:%{_pearname}-%{version}} \
-%{-z:tar zxf %{S:%{-a*}%{!-a:0}}} \
+%{-z:tar zxf %{S:%{-a*}%{!-a:0}}; P=%{_pearname}-%{version}/package.xml; [ -f $P ] || P=package.xml} \
 pear \\\
 	-d doc_dir=/docs \\\
 	-d php_dir=%{php_pear_dir} \\\
@@ -43,7 +44,8 @@
 	--installroot=${D} \\\
 	--offline \\\
 	--nodeps \\\
-	%{!-z:%{S:%{-a*}%{!-a:0}}}%{-z:%{_pearname}-%{version}/package.xml} | tee install.log \
+	%{-f:--force} \\\
+	%{!-z:%{S:%{-a*}%{!-a:0}}}%{-z:$P} | tee install.log \
 # make post message of optional packages \
 grep 'can optionally use' install.log | sed -e 's,package "pear/,package "php-pear-,g;s,^pear/,php-pear-,' > optional-packages.txt \
 if [ -s optional-packages.txt ]; then \
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/php-pear-build-macros?r1=1.16&r2=1.17&f=u




More information about the pld-cvs-commit mailing list