]> git.pld-linux.org Git - packages/rpm-build-macros.git/blobdiff - rpm.macros
- check for /usr/bin/gconftool-2 existence in %gconf_schema_* macros, in case pkg...
[packages/rpm-build-macros.git] / rpm.macros
index e95c79d23757497a4805b8588066205151133a18..4f204a33ed43c70a75d0063a47b24b33514f39a0 100644 (file)
@@ -519,14 +519,18 @@ fi; }; __spec_install_post_chrpath } } }
 # Requires: GConf2
 #
 %gconf_schema_install() \
-       umask 022; \
-       GCONF_CONFIG_SOURCE="xml:readwrite:/etc/gconf/gconf.xml.defaults" /usr/bin/gconftool-2 --makefile-install-rule /etc/gconf/schemas/%{?1}%{!?1:*.schemas} > /dev/null; \
+       if [ -x /usr/bin/gconftool-2 ]; then \
+               umask 022; \
+               GCONF_CONFIG_SOURCE="xml:readwrite:/etc/gconf/gconf.xml.defaults" \\\
+               /usr/bin/gconftool-2 --makefile-install-rule /etc/gconf/schemas/%{?1}%{!?1:*.schemas} > /dev/null; \
+       fi; \
 %{nil}
 
 %gconf_schema_uninstall() \
-if [ $1 = 0 ]; then \
+if [ $1 = 0 -a -x /usr/bin/gconftool-2 ]; then \
        umask 022; \
-       GCONF_CONFIG_SOURCE="xml:readwrite:/etc/gconf/gconf.xml.defaults" /usr/bin/gconftool-2 --makefile-uninstall-rule /etc/gconf/schemas/%{?1} > /dev/null \
+       GCONF_CONFIG_SOURCE="xml:readwrite:/etc/gconf/gconf.xml.defaults" \\\
+       /usr/bin/gconftool-2 --makefile-uninstall-rule /etc/gconf/schemas/%{?1} > /dev/null \
 fi; \
 %{nil}
 
@@ -1133,7 +1137,7 @@ echo -e "</dependencies>\\n" >> %{_mavendepmapdir}/maven2-depmap.xml
 %__pear_install_log \
 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 \
+grep 'can optionally use' install.log | sed -e 's,package "pear/,package "php-pear-,g;s,^pear/,php-pear-,;s,^pear/,php-pear-,;s,^channel://.*/,,' > optional-packages.txt \
 if [ -s optional-packages.txt ]; then \
        awk -F'"' '/use package/{print $2}' optional-packages.txt | sed -e "s,_,/,g;s,php-pear-, 'pear(,;s,$,.*)'," | tr -d '\\\n' > _noautoreq \
 else \
@@ -1159,7 +1163,7 @@ fi \
        --nodeps \\\
        %{-f:--force} \\\
        %{!-z:%{S:%{-a*}%{!-a:0}}}%{-z:$_P} > .install.log || { c=$?; cat .install.log; exit $c; }; \
-       %{-c:cp -a %{builddir}/%{builddir}/%{php_pear_dir} %{builddir}/%{dirname:%{php_pear_dir}}; rm -rf %{builddir}/%{builddir}; } \
+       %{-c:cp -a %{builddir}/%{builddir}/%{php_pear_dir} %{builddir}/%(dirname %{php_pear_dir}); rm -rf %{builddir}/%{builddir}; } \
 %{nil}
 
 # The main macro.
This page took 0.075905 seconds and 4 git commands to generate.