SOURCES: php-pear-build-macros - little doc

glen glen at pld-linux.org
Mon Sep 19 09:56:25 CEST 2005


Author: glen                         Date: Mon Sep 19 07:56:25 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- little doc

---- Files affected:
SOURCES:
   php-pear-build-macros (1.8 -> 1.9) 

---- Diffs:

================================================================
Index: SOURCES/php-pear-build-macros
diff -u SOURCES/php-pear-build-macros:1.8 SOURCES/php-pear-build-macros:1.9
--- SOURCES/php-pear-build-macros:1.8	Mon Sep 19 00:43:04 2005
+++ SOURCES/php-pear-build-macros	Mon Sep 19 09:56:19 2005
@@ -1,8 +1,32 @@
 # vim:syn=spec:ai
 
-%define	pear_package_setup(a:) \
-%setup -q -c -T\
-D=%{_builddir}/%{name}-%{version} \
+# pear install macros written by glen at pld-linux.org.
+# All rights reserved. Permission to copy is hereby granted.. yada, yada, yada
+#
+# Usage:
+#	%%pear_package_setup [-a #] [-n FMT]
+#
+# -a #   - unpack SOURCE# instead of SOURCE0
+# -n FMT - create builddir with FMT, instead of default %%{name}-%%{version}
+#
+# unpack PEAR package to %%{_builddir}/FMT. package is extracted with already
+# destination hierarchy. you should copy the tree to buildroot after
+# patching/reorganizing with %%pear_package_install.
+#
+# additionally BUILDROOT is stripped from files and files are converted to UNIX
+# line endings.
+#
+# the pear install process output is recorded to install.log, you should put it
+# to %%doc for latter debug or just information.
+#
+# additionally additional-packages.txt is produced if it was detected that the
+# package has optional dependencies. the file format is suitable of displaying
+# 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:) \
+%setup -q -c -T %{-n:-n %{-n*}}\
+D=%{_builddir}/%{-n*}%{!-n:%{name}-%{version}} \
 pear \\\
 	-d doc_dir=/docs \\\
 	-d php_dir=%{php_pear_dir} \\\
@@ -29,7 +53,10 @@
 grep -rl "${D}" ./{%{_bindir},%{php_pear_dir}}/* | xargs -r sed -i -e "s,${D},," \
 %{nil}
 
- 
+
+# copies exctracted PEAR package structure to buildroot. also copies PEAR
+# registry file.
+# please use this macro, for future expansions being possible.
 %define	pear_package_install() \
 cp -a ./%{php_pear_dir}/{.registry,*} $RPM_BUILD_ROOT%{php_pear_dir} \
 # help the developer out a little: \
@@ -39,8 +66,12 @@
 fi \
 %{nil}
 
-# displayed in post
+# default excludes for PEAR packages.
+# if you need add something to the list use
+# %%{expand:%%%%define _noautocompressdoc %%{_noautocompressdoc} otherexcludes} in your specfile.
+
+# this file displayed in %post
 %define _noautocompressdoc optional-packages.txt
 
 # don't provide tests
-%define	_noautoprov 'pear(tests/.*)'
+%define _noautoprov 'pear(tests/.*)'
================================================================

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




More information about the pld-cvs-commit mailing list