]> git.pld-linux.org Git - packages/rpm.git/blobdiff - php-pear-build-macros
- this one is dead
[packages/rpm.git] / php-pear-build-macros
index 04b959ce0d97978e6c08db022f4e0aa46c38eae2..7e508a5034b9b74077bb4328fb5b2eac52d27858 100644 (file)
@@ -12,6 +12,8 @@
 #
 # -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
 # 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:) \
+%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}}; P=%{_pearname}-%{version}/package.xml; [ -f $P ] || P=package.xml} \
 pear \\\
        -d doc_dir=/docs \\\
        -d php_dir=%{php_pear_dir} \\\
@@ -41,7 +44,8 @@ pear \\\
        --installroot=${D} \\\
        --offline \\\
        --nodeps \\\
-       %{S:%{-a*}%{!-a:0}} | 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 \
@@ -63,6 +67,7 @@ grep -rl "${D}" ./{%{_bindir},%{php_pear_dir}}/* | xargs -r sed -i -e "s,${D},,"
 # 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} \
+find $RPM_BUILD_ROOT%{php_pear_dir} '(' -name '*~' -o -name '*.orig' ')' | xargs -r rm -v \
 # help the developer out a little: \
 if [ -f _noautoreq ]; then \
        echo "AutoReqdep detected:" \
This page took 0.079958 seconds and 4 git commands to generate.