packages: rpm-build-macros/rpm-build-macros.spec, rpm-build-macros/rpm.macr...
glen
glen at pld-linux.org
Mon Dec 13 22:57:30 CET 2010
Author: glen Date: Mon Dec 13 21:57:30 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- 1.595: add %banner -o (once) support
---- Files affected:
packages/rpm-build-macros:
rpm-build-macros.spec (1.279 -> 1.280) , rpm.macros (1.594 -> 1.595)
---- Diffs:
================================================================
Index: packages/rpm-build-macros/rpm-build-macros.spec
diff -u packages/rpm-build-macros/rpm-build-macros.spec:1.279 packages/rpm-build-macros/rpm-build-macros.spec:1.280
--- packages/rpm-build-macros/rpm-build-macros.spec:1.279 Mon Dec 6 10:52:09 2010
+++ packages/rpm-build-macros/rpm-build-macros.spec Mon Dec 13 22:57:25 2010
@@ -1,5 +1,5 @@
# $Revision$, $Date$
-%define rpm_macros_rev 1.594
+%define rpm_macros_rev 1.595
%define find_lang_rev 1.33
Summary: PLD Linux RPM build macros
Summary(pl.UTF-8): Makra do budowania pakietów RPM dla Linuksa PLD
@@ -90,6 +90,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.280 2010/12/13 21:57:25 glen
+- 1.595: add %banner -o (once) support
+
Revision 1.279 2010/12/06 09:52:09 glen
- 1.594: always remove pear tests
================================================================
Index: packages/rpm-build-macros/rpm.macros
diff -u packages/rpm-build-macros/rpm.macros:1.594 packages/rpm-build-macros/rpm.macros:1.595
--- packages/rpm-build-macros/rpm.macros:1.594 Mon Dec 6 10:51:56 2010
+++ packages/rpm-build-macros/rpm.macros Mon Dec 13 22:57:25 2010
@@ -1073,7 +1073,7 @@
# banner support (useful in {pre,post}{,un} and triggers)
#
# Usage:
-# %banner name [-a] [-e] [-n] [-tn] <<EOF
+# %banner name [-a] [-e] [-n] [-tn] [-o] <<EOF
# the banner text, the banner text
# the banner text, and following line
#EOF
@@ -1084,12 +1084,16 @@
# -e - send to stderr instead of stdout
# -n - no show banner (overrides -t)
# -t - show only, if RPM_SCRIPTVERBOSITY >= n; default n=5
+# -o - show only once, i.e when package is installed for the first time
#
# Tests:
# (rpm -E '%banner -e banner <<EOF'; echo -e 'hi\nEOF') > m; sh -x m
+# (rpm -E '%banner -o -e banner <<EOF'; echo -e 'hi\nEOF') > m; sh -x m
+# (rpm -E '%banner -o -e banner <<EOF'; echo -e 'hi\nEOF') > m; sh -x m 1
# rpm -E 'date | %banner -e banner' > m; sh -x m
+# rpm -E 'date | %banner -o -e banner' > m; sh -x m
#
-%banner(aent:) ( \
+%banner(aenot:) %{-o:([ "$1" != 1 ] ||} ( \
RPM_SCRIPTVERBOSITY=5 \
[ -r /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm \
if [ -x /usr/bin/banner.sh ]; then \
@@ -1097,7 +1101,7 @@
else \
CMD="cat%{-e: >&2}" \
fi \
-eval $CMD %{?2:%2}%{?3: %3}) \
+eval $CMD %{?2:%2}%{?3: %3})%{-o:)} \
%{nil}
# useradd/groupadd macros
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/rpm-build-macros/rpm-build-macros.spec?r1=1.279&r2=1.280&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/rpm-build-macros/rpm.macros?r1=1.594&r2=1.595&f=u
More information about the pld-cvs-commit
mailing list