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}}}\
LANG=C\
export LANG\
unset DISPLAY ||:\
+unset LINGUAS ||:\
%{nil}
# ------------------------------------------------------------------------
%_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:
%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 <at> pld-linux <dot> 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 \
# 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