diff --git a/libdrm.spec b/libdrm.spec index 38cdb90..ef4771f 100644 --- a/libdrm.spec +++ b/libdrm.spec @@ -1,4 +1,11 @@ %define bcond_meson() %{lua: do + local option = rpm.expand("%{1}") + local with = rpm.expand("%{?with_" .. option .. "}") + local value = (with ~= '') and "enabled" or "disabled" + option = option:gsub('_', '-') + print(string.format("-D%s=%s", option, value)) +end} +%define bcond_meson_tf() %{lua: do local option = rpm.expand("%{1}") local with = rpm.expand("%{?with_" .. option .. "}") local value = (with ~= '') and "true" or "false" @@ -121,9 +128,9 @@ Utility programs for the kernel DRM interface. Will void your warranty. %{bcond_meson cairo_tests} \ %{bcond_meson man_pages} \ %{bcond_meson valgrind} \ - %{bcond_meson freedreno_kgsl} \ - %{bcond_meson install_test_programs} \ - %{bcond_meson udev} \ + %{bcond_meson_tf freedreno_kgsl} \ + %{bcond_meson_tf install_test_programs} \ + %{bcond_meson_tf udev} \ %{nil} %meson_build