2013-05-08 14:33:11 +04:00
% with udevdir % { _udevdir }
% enableif % { enable_cmirror } cmirrord
% enableif % { enable_udev } udev_sync
% enableif % { enable_profiling } profiling
% global enable_lvmetad % ( if echo % { services } | grep - q lvmetad ; then echo 1 ; else echo 0 ; fi )
% enableif % { enable_lvmetad } lvmetad
2015-05-13 14:14:54 +03:00
% global enable_lvmpolld % ( if echo % { services } | grep - q lvmpolld ; then echo 1 ; else echo 0 ; fi )
% enableif % { enable_lvmpolld } lvmpolld
2013-05-08 14:33:11 +04:00
% build
% configure \
-- with - default - dm - run - dir =% { _default_dm_run_dir } \
-- with - default - run - dir =% { _default_run_dir } \
-- with - default - pid - dir =% { _default_pid_dir } \
-- with - default - locking - dir =% { _default_locking_dir } \
-- with - usrlibdir =% { _libdir } \
-- enable - lvm1_fallback \
-- enable - fsadm \
-- with - pool = internal \
-- with - user = \
-- with - group = \
-- with - device - uid = 0 \
-- with - device - gid = 6 \
-- with - device - mode = 0660 \
-- enable - pkgconfig \
-- enable - applib \
-- enable - cmdlib \
-- enable - dmeventd \
2015-05-11 14:51:49 +03:00
-- enable - write_install \
2013-05-08 14:33:11 +04:00
% { configure_flags }
make % { ? _smp_mflags }
% { ? extra_build_commands }
% install
make install DESTDIR = $RPM_BUILD_ROOT
make install_system_dirs DESTDIR = $RPM_BUILD_ROOT
% if % { enable_systemd }
make install_systemd_units DESTDIR = $RPM_BUILD_ROOT
make install_tmpfiles_configuration DESTDIR = $RPM_BUILD_ROOT
2015-05-13 14:14:54 +03:00
% else
make install_initscripts DESTDIR = $RPM_BUILD_ROOT
2013-05-08 14:33:11 +04:00
% endif
2014-06-27 03:24:47 +04:00
% if % { enable_testsuite }
make - C test install DESTDIR = $RPM_BUILD_ROOT
% endif
2013-05-08 14:33:11 +04:00
# when building an src.rpm from freestanding specfiles
test - e % { _sourcedir } / source . inc || cp source . inc build . inc packages . inc macros . inc % { _sourcedir }
% check
% { ? check_commands }
% clean
2013-12-16 00:12:06 +04:00
pwd
test - n rpm - no - clean || rm - rf $RPM_BUILD_ROOT