[packages/rpm-build-macros] - v1.654: extend _noautoreq with language specific macros

glen glen at pld-linux.org
Wed Oct 17 21:57:48 CEST 2012


commit 0a9bb9747529d8f89a74f6db5f317abe1454d8ac
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Wed Oct 17 22:51:54 2012 +0300

    - v1.654: extend _noautoreq with language specific macros
    
    perl and php added, more to come
    
    Usage:
    
    BuildRequires:	rpmbuild(macros) >= 1.654
    
    %define _noautoreq_pear Excluded.php PEAR/Something.php
    %define _noautoreq_perl Apache::.*

 rpm-build-macros.spec |  2 +-
 rpm.macros            | 14 +++++++++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/rpm-build-macros.spec b/rpm-build-macros.spec
index 3ea8e01..262b927 100644
--- a/rpm-build-macros.spec
+++ b/rpm-build-macros.spec
@@ -1,4 +1,4 @@
-%define		rpm_macros_rev	1.653
+%define		rpm_macros_rev	1.654
 %define		find_lang_rev	1.35
 Summary:	PLD Linux RPM build macros
 Summary(pl.UTF-8):	Makra do budowania pakietów RPM dla Linuksa PLD
diff --git a/rpm.macros b/rpm.macros
index 068380d..5a9c6d2 100644
--- a/rpm.macros
+++ b/rpm.macros
@@ -843,9 +843,21 @@ fi; \
 #
 %__noautoreqfiles	%(sed -e s'/#.*//' /etc/rpm/noautoreqfiles)%{?_noautoreqfiles: %{_noautoreqfiles}}
 %__noautoprovfiles	%(sed -e s'/#.*//' /etc/rpm/noautoprovfiles)%{?_noautoprovfiles: %{_noautoprovfiles}}
-%__noautoreq		%(sed -e s'/#.*//' /etc/rpm/noautoreq)%{?_noautoreq: %{_noautoreq}}
 %__noautoreqdep		%(sed -e s'/#.*//' /etc/rpm/noautoreqdep)%{?_noautoreqdep: %{_noautoreqdep}}
 %__noautoprov		%(sed -e s'/#.*//' /etc/rpm/noautoprov)%{?_noautoprov: %{_noautoprov}}
+%__noautoreq		%(sed -e s'/#.*//' /etc/rpm/noautoreq) \
+	%{?_noautoreq: %{_noautoreq}} \
+	%{?_noautoreq_pear: %{__noauto_regexp_helper -p pear %{_noautoreq_pear}}} \
+	%{?_noautoreq_perl: %{__noauto_regexp_helper -p perl %{_noautoreq_perl}}} \
+	%{nil}
+
+# helper for wrapping _noautoreq between perl() or pear()
+# Author: Elan Ruusamäe <glen at pld-linux.org>
+# Usage:
+# BuildRequires:	rpmbuild(macros) >= 1.654
+# %define _noautoreq_pear Excluded.php PEAR/Something.php
+# %define _noautoreq_perl Apache::.*
+%__noauto_regexp_helper(p:) %(echo "%*" | awk 'BEGIN{RS=" "}{printf("%{-p*}\\\\\\(%%s\\\\\\) ", $1)}')
 
 #%_noautocompressdoc	%{nil}
 #
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-macros.git/commitdiff/0a9bb9747529d8f89a74f6db5f317abe1454d8ac



More information about the pld-cvs-commit mailing list