%%endif \
: \
%%{nil}
+
+#############################################################
+#
+# Disable event_activation when creating packages for system
+# with installed lvm2-testsuite
+#
+# This is used for internal package testing to avoid
+# updating lvm.conf after test suite installation.
+#
+%define lvm2_testsuite_build %( test -d /usr/share/lvm2-testsuite && echo 0 || echo 1 )
%global enable_lvmlockd_dlm 0
%global enable_lvmlockd_sanlock 0
-#############################################################
-#
-# Disable event_activation when creating packages for system
-# with installed lvm2-testsuite
-#
-# This is used for internal package testing to avoid
-# updating lvm.conf after test suite installation.
-#
-%if %{exists:/usr/share/lvm2-testsuite/lib/lvm}
- %with default-event-activation 0
-%else
- %with default-event-activation 1
-%endif
+%with default-event-activation %{lvm2_testsuite_build}
%if %{enable_udev}
%service lvmpolld 1