]> TLD Linux GIT Repositories - packages/rpm-tld-macros.git/blobdiff - macros.tld
- updated systemd macros from master, required before rpm.org migration
[packages/rpm-tld-macros.git] / macros.tld
index 08928abbf1524e34727dff27fb138815f383d1be..b835fea55a07151d3b76289c2e5c201ba8b4f548 100644 (file)
@@ -1,7 +1,7 @@
 # vim:ts=4 sw=4 noet ft=spec
 #
 # TLD Linux rpm macros.
-# <https://www.tld-linux.org/>
+# <https://tld-linux.org/>
 
 # can be used by builder script to check for version
 %rpm_build_macros      {Revision}
@@ -429,6 +429,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}:disabled}%%{!?with_%{1}:enabled}}
+
 # for use with cmake:
 # Usage: cmake_on_off BCOND_NAME [OPTION_NAME]
 # BuildRequires: rpmbuild(macros) >= 1.742