-e "s#@NUMCOMM@#$$numcomm#g" \
-e "s#@DIRTY@#$$dirty#g" \
-e "s#@date@#$$date#g" \
- $< > $@-t; \
+ $< > $@-t
+if BUILD_RUNAUTOGEN
+ sed -i -e "s#@bcond_runautogen@#bcond_without#g" $@-t
+else
+ sed -i -e "s#@bcond_runautogen@#bcond_with#g" $@-t
+endif
+if INSTALL_SYSTEMD
+ sed -i -e "s#@bcond_systemd@#bcond_without#g" $@-t
+else
+ sed -i -e "s#@bcond_systemd@#bcond_with#g" $@-t
+endif
chmod a-w $@-t
mv $@-t $@
[enable_secure_build="yes"])
AC_ARG_ENABLE([systemd],
- [ --enable-systemd : Install systemd service files],,
+ [ --enable-systemd : Build with libsystemd and install systemd service files],,
[ enable_systemd="no" ])
AM_CONDITIONAL(INSTALL_SYSTEMD, test x$enable_systemd = xyes)
[ SYSTEMDDIR="/lib/systemd/system" ])
AC_ARG_ENABLE([qdevices],
- [ --disable-qdevices : Quorum devices support ],,
+ [ --disable-qdevices : Quorum devices support ],,
[ enable_qdevices="yes" ])
AM_CONDITIONAL(BUILD_QDEVICES, test x$enable_qdevices = xyes)
AC_ARG_ENABLE([qnetd],
- [ --disable-qnetd : Quorum Net Daemon support ],,
+ [ --disable-qnetd : Quorum Net Daemon support ],,
[ enable_qnetd="yes" ])
AM_CONDITIONAL(BUILD_QNETD, test x$enable_qnetd = xyes)
+AC_ARG_ENABLE([runautogen],
+ [ --enable-runautogen : run autogen.sh (RPM specfile)],,
+ [ enable_runautogen="no" ])
+AM_CONDITIONAL([BUILD_RUNAUTOGEN], [test x$enable_runautogen = xyes])
# *FLAGS handling goes here
# Conditionals
# Invoke "rpmbuild --without <feature>" or "rpmbuild --with <feature>"
# to disable or enable specific features
-%bcond_with runautogen
-%bcond_with systemd
+%@bcond_runautogen@ runautogen
+%@bcond_systemd@ systemd
%global gitver %{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}
%global gittarver %{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}