aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--build.macros.in5
2 files changed, 5 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 832c70b..f06fb67 100644
--- a/NEWS
+++ b/NEWS
@@ -7,8 +7,6 @@ Version 2.51 - 3 February 2020, by Jani Välimaa
- build.macros: drop pyver macro (moved to python-rpm-macros)
- build.macros: drop unused macros
- _package_i18n()
- - _with()
- - _without()
- py_platlibdir
- py_purelibdir
- py_platsitedir
diff --git a/build.macros.in b/build.macros.in
index 9962c7a..fb3b548 100644
--- a/build.macros.in
+++ b/build.macros.in
@@ -315,6 +315,11 @@ export CFLAGS="%optflags"; export CXXFLAGS="%optflags"; export RPM_OPT_FLAGS="%o
Obsoletes: %{1} <= %{?epoch:%epoch}%{?!epoch:0}:%{version}-%{release} \
Provides: %{1} = %{?epoch:%epoch}%{?!epoch:0}:%{version}-%{release}
+# Shorthand for %{defined with_...}
+# macros provided by rpm 4.4, but buggy :(
+%_with() %{expand: %%{?_with_%1:1} %%{!?_with_%1: %%{?_without_%1:0} %%{!?_without_%1: %%{?with_%1:%%{with_%1}} %%{!?with_%1: %%{?without_%1:!%%{without_%1}} %%{!?without_%1: %%{?2:%%2} %%{!?2:1} } } } } }
+%_without() !%{expand: %%{with %1 %{?2:%2}}}
+
#------------------------------------------------------------------------------
# Java Macros
#