[packages/rpm-pld-macros/rpm.org] - version 1.752: "noarchpackage" macro to cut down boilerplate

baggins baggins at pld-linux.org
Sun Oct 4 17:33:25 CEST 2020


commit 30647bdfd22924ab2eb101b67422432c831d8520
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri Oct 2 17:11:47 2020 +0200

    - version 1.752: "noarchpackage" macro to cut down boilerplate

 macros.pld          | 8 ++++++++
 rpm-pld-macros.spec | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/rpm-pld-macros.spec b/rpm-pld-macros.spec
index a74a7cd..05c225e 100644
--- a/rpm-pld-macros.spec
+++ b/rpm-pld-macros.spec
@@ -1,4 +1,4 @@
-%define		rpm_macros_rev	1.751
+%define		rpm_macros_rev	1.752
 %define		find_lang_rev	1.40
 # split into individual X_prov_ver if there is a reason to desync
 %define		prov_ver	4.15
diff --git a/macros.pld b/macros.pld
index 5336239..fea1c61 100644
--- a/macros.pld
+++ b/macros.pld
@@ -675,6 +675,14 @@ Provides: %{1} = %{?epoch:%{epoch}:}%{?version:%{version}}%{?release:-%{release}
 %_ver_lt()	%(test $(rpmvercmp "%{1}" "%{2}" >/dev/null 2>&1; echo $?) -ne 2; echo $?)
 %_ver_ge()	%(test $(rpmvercmp "%{1}" "%{2}" >/dev/null 2>&1; echo $?) -eq 2; echo $?)
 
+# noarch subpackage helper
+# BuildRequires:	rpmbuild(macros) >= 1.752
+%noarchpackage \
+%if %{_ver_ge '%{_rpmversion}' '4.6'} \
+BuildArch:		noarch \
+%endif \
+%{nil}
+
 %apache_modules_api %{expand:%%global apache_modules_api %(awk '/#define MODULE_MAGIC_NUMBER_MAJOR/ {print $3}' /usr/include/apache/ap_mmn.h 2>/dev/null || echo ERROR)}%apache_modules_api
 
 # sgml macros
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm-pld-macros.git/commitdiff/30647bdfd22924ab2eb101b67422432c831d8520



More information about the pld-cvs-commit mailing list