X-Git-Url: https://git.tld-linux.org/?a=blobdiff_plain;f=macros.tld;h=9f6bcbd3dc88ae0b783f91266a6f31d546faa9f6;hb=04aa83ed7a5c08323cec49e49f5972dca66352d3;hp=7e26d8c537fb4cf256c394e81bf04f4a717659df;hpb=9a710165b069622ace5c1c784494f2281db74256;p=packages%2Frpm-tld-macros.git diff --git a/macros.tld b/macros.tld index 7e26d8c..9f6bcbd 100644 --- a/macros.tld +++ b/macros.tld @@ -1,7 +1,7 @@ # vim:ts=4 sw=4 noet ft=spec # # TLD Linux rpm macros. -# +# %distribution TLD Linux %vendor tld @@ -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}:disabled}%%{!?with_%{1}:enabled}} + # for use with cmake: # Usage: cmake_on_off BCOND_NAME [OPTION_NAME] # BuildRequires: rpmbuild(macros) >= 1.742