]> git.pld-linux.org Git - packages/rpm-build-macros.git/commitdiff
- 1.595: add %banner -o (once) support auto/ac/rpm-build-macros-1_595-1 auto/th/rpm-build-macros-1_595-1
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 13 Dec 2010 21:57:25 +0000 (21:57 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    rpm-build-macros.spec -> 1.280
    rpm.macros -> 1.595

rpm-build-macros.spec
rpm.macros

index a6438b96491a4085cc1a137886268045dfd17ccd..5aee726f1325a8f3efd4eca007b8f05985295e80 100644 (file)
@@ -1,4 +1,4 @@
-%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
index 643cf7f81ce7e16e23fc602ee271600ece3ef3fe..4d5345fdbd4015a6f8a29b793594a4e55f8ba217 100644 (file)
@@ -1073,7 +1073,7 @@ fi; \
 # 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 @@ fi; \
 # -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 @@ if [ -x /usr/bin/banner.sh ]; then \
 else \
        CMD="cat%{-e: >&2}" \
 fi \
-eval $CMD %{?2:%2}%{?3: %3}) \
+eval $CMD %{?2:%2}%{?3: %3})%{-o:)} \
 %{nil}
 
 # useradd/groupadd macros
This page took 0.037211 seconds and 4 git commands to generate.