X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=rpm.macros;h=a0a83181a109a3c0d3025b8344db918a70331f42;hb=5b8ed3c0e176e631dc29695f4bb222149f8ee747;hp=2a876ebcaeb9dab11c2f8b44e927e879f3596c80;hpb=ea4b29008d1ab14863f07920d3cb9e341f4fb4e7;p=packages%2Frpm.git diff --git a/rpm.macros b/rpm.macros index 2a876eb..a0a8318 100644 --- a/rpm.macros +++ b/rpm.macros @@ -112,12 +112,14 @@ LANG=C\ export LANG\ unset DISPLAY ||:\ +unset LINGUAS ||:\ %{nil} %build %%build\ LANG=C\ export LANG\ unset DISPLAY ||:\ +unset LINGUAS ||:\ %{nil} %install %{?_enable_debug_packages:%{?buildsubdir:%{debug_package}}}\ @@ -125,6 +127,7 @@ unset DISPLAY ||:\ LANG=C\ export LANG\ unset DISPLAY ||:\ +unset LINGUAS ||:\ %{nil} # ------------------------------------------------------------------------ @@ -358,15 +361,21 @@ echo "Compress kernel modules if any."; \ %_binary_payload w9.bzdio #----------------------------------------------------------------- -# Update all GConf2 schemas +# Update GConf2 schemas # # Requires: GConf2 # -%gconf_schema_install { umask 022; \ +%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/*.schemas > /dev/null \ -} + /usr/bin/gconftool-2 --makefile-install-rule %{?1}%{!?1:/etc/gconf/schemas/*.schemas} > /dev/null \ + %{nil} + +%gconf_schema_uninstall() \ + umask 022; \ + GCONF_CONFIG_SOURCE="xml:readwrite:/etc/gconf/gconf.xml.defaults" \ + /usr/bin/gconftool-2 --makefile-uninstall-rule %{?1} > /dev/null \ + %{nil} #----------------------------------------------------------------- # post %install sequence: @@ -427,13 +436,13 @@ echo "Compress kernel modules if any."; \ %py_ocomp python -O -c "import compileall; import sys; compileall.compile_dir(sys.argv[1], ddir=sys.argv[1][len('$RPM_BUILD_ROOT'):])" # Software written in Python language require Python with main version -%pyrequires_eq() Requires: python(bytecode) = %py_ver %1 +%pyrequires_eq() Requires: python(abi) = %py_ver %1 # Hardlink binary identical .pyc and .pyo files # (idea by glen pld-linux org) %__spec_install_post_py_hardlink {\ -%{!?no_install_post_py_hardlink: +%{!?no_install_post_py_hardlink: \ [ ! -d "$RPM_BUILD_ROOT" ] || find "$RPM_BUILD_ROOT" -name '*.pyc' | while read a; do \ b="$(echo $a|sed -e 's/.pyc$/.pyo/')"; \ if cmp -s "$a" "$b"; then \ @@ -506,22 +515,25 @@ fi; \ # banner support (useful in {pre,post}{,un} and triggers) # # Usage: -# %banner name [-a] [-e] [-n] [-tn] +# %banner name [-a] [-e] [-n] [-tn] <= n; default n=5 -%banner(a:e:n:t:) \ +%banner(aent:) \ RPM_SCRIPTVERBOSITY=5 \ [ -r /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm \ if [ -x /usr/bin/banner.sh ]; then \ - CMD="/usr/bin/banner.sh %{-e:--stderr} %{!-n:\`[ $RPM_SCRIPTVERBOSITY -ge %{-t:%{-t*}}%{!-t:5} ] && echo '-s'\`} %{!-a:-m}%{-a:-M} %1" \ + CMD="/usr/bin/banner.sh %{-e:--stderr} %{!-n:$([ $RPM_SCRIPTVERBOSITY -ge %{-t:%{-t*}}%{!-t:5} ] && echo -s)} %{!-a:-m}%{-a:-M} %1" \ else \ CMD="cat%{-e: >&2}" \ fi \ -$CMD << EOF \ +$CMD %2%{?3: %3} \ %nil