]> TLD Linux GIT Repositories - packages/rpm-tld-macros.git/commitdiff
- added enabled_disabled macros
authorMarcin Krol <hawk@tld-linux.org>
Fri, 1 Jan 2021 21:06:40 +0000 (22:06 +0100)
committerMarcin Krol <hawk@tld-linux.org>
Fri, 1 Jan 2021 21:06:40 +0000 (22:06 +0100)
macros.tld
rpm-tld-macros.spec

index 522578804c9f7ee7dabe99134476cfccfda37c3f..7b3e1e33c1bde5b5bcd1fef505f4afd20ee041cf 100644 (file)
@@ -629,6 +629,10 @@ LC_ALL=C.UTF-8 %{__meson} \
 %__true_false() %{expand:%%{?with_%{1}:true}%%{!?with_%{1}:false}}
 %__true_false_not() %{expand:%%{?with_%{1}:false}%%{!?with_%{1}:true}}
 
+# expands to enabled or disabled based on bcond; for use with meson or cmake
+%__enabled_disabled() %{expand:%%{?with_%{1}:enabled}%%{!?with_%{1}:disabled}}
+%__enabled_disabled_not() %{expand:%%{?with_%{1}:enabled}%%{!?with_%{1}:disabled}}
+
 # for use with cmake:
 # Usage: cmake_on_off BCOND_NAME [OPTION_NAME]
 # BuildRequires: rpmbuild(macros) >= 1.742
index f08edbca4847878d0447091957c1d384cf516ed1..ae25390f649f7cdc1780eb6fb5899833bf5355de 100644 (file)
@@ -6,7 +6,7 @@ Summary:        TLD Linux RPM macros
 Summary(pl.UTF-8):     Makra RPM dla Linuksa TLD
 Name:          rpm-tld-macros
 Version:       %{rpm_macros_rev}
-Release:       1.1
+Release:       1.2
 License:       GPL v2+
 Group:         Development/Building
 Source0:       macros.tld