[packages/rpm-pld-macros] - version 1.748: added %_ver_lt, %_ver_ge

qboosh qboosh at pld-linux.org
Sat Sep 26 16:14:18 CEST 2020


commit d77fb7bd17fea72a64b2942ccfa15bb98627de0a
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Sep 26 16:17:09 2020 +0200

    - version 1.748: added %_ver_lt, %_ver_ge

 macros.pld          | 5 +++++
 rpm-pld-macros.spec | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/rpm-pld-macros.spec b/rpm-pld-macros.spec
index c21a347..88ecec4 100644
--- a/rpm-pld-macros.spec
+++ b/rpm-pld-macros.spec
@@ -1,4 +1,4 @@
-%define		rpm_macros_rev	1.747
+%define		rpm_macros_rev	1.748
 %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 e029dc2..3eddc3e 100644
--- a/macros.pld
+++ b/macros.pld
@@ -516,6 +516,11 @@ LC_ALL=C.UTF-8 %{__meson} \
 Obsoletes: %{1} < %{?epoch:%{epoch}:}%{?version:%{version}}%{?release:-%{release}} \
 Provides: %{1} = %{?epoch:%{epoch}:}%{?version:%{version}}%{?release:-%{release}}
 
+# for package versions comparison (incl. cc_version or _rpmversion)
+# BuildRequires:	rpmbuild(macros) >= 1.748
+%_ver_lt()	%(test rpmvercmp "%{1}" "%{2}" >/dev/null 2>&1 -eq 2; echo $?)
+%_ver_ge()	!%(test rpmvercmp "%{1}" "%{2}" >/dev/null 2>&1 -eq 2; echo $?)
+
 %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/d77fb7bd17fea72a64b2942ccfa15bb98627de0a



More information about the pld-cvs-commit mailing list