]> git.pld-linux.org Git - packages/rpm.git/blobdiff - rpm.macros
- final solution for GConf macros
[packages/rpm.git] / rpm.macros
index e10980526cbd4afbea0ad444f03af30fc6eed92a..a0a83181a109a3c0d3025b8344db918a70331f42 100644 (file)
 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,7 +436,7 @@ 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
@@ -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] <<EOF
 # the banner text, the banner text
-# the banner text, and following line HAVE TO BE:
-# EOF
+# the banner text, and following line
+#EOF
+# You can use any form of here-document, <<'EOF' <<-EOT will do.
+# NOTE: if your use "<<-EOF", then You can actually indent inside here-document.
+#
 # -a   - append to the banner
 # -e   - send to stderr instead of stdout
 # -n   - no show banner (overrides -t)
 # -t   - show only, if RPM_SCRIPTVERBOSITY >= 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
 
This page took 0.032549 seconds and 4 git commands to generate.