]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
Add flag to disable install of systemd files (#523)
authorTBK <858296+TBK@users.noreply.github.com>
Fri, 27 Nov 2020 11:02:03 +0000 (12:02 +0100)
committerGitHub <noreply@github.com>
Fri, 27 Nov 2020 11:02:03 +0000 (12:02 +0100)
* Add flag to disable install of systemd files

* Update Makefile.am

Co-authored-by: Arvin Schnell <aschnell@suse.com>
configure.ac
data/Makefile.am

index ae70e0cebeb49a9bb7d8aa92b31dbc91298cb215..f2345da7f48da939598896d4f0ec41894be2c658 100644 (file)
@@ -82,7 +82,6 @@ SYSCONFIG=/etc/sysconfig
 
 AC_ARG_WITH([conf], AC_HELP_STRING([--with-conf], [Use a custom sysconfig directory (default is /etc/sysconfig)]),
        [with_conf=$withval], [with_conf=no])
-
 AS_IF([test "x$with_conf" != xno], [SYSCONFIG="${with_conf}"])
 
 CPPFLAGS="${CPPFLAGS} -DCONF_DIR='\"${SYSCONFIG}\"'"
@@ -90,7 +89,6 @@ CPPFLAGS="${CPPFLAGS} -DCONF_DIR='\"${SYSCONFIG}\"'"
 
 AC_ARG_ENABLE([btrfs], AC_HELP_STRING([--disable-btrfs],[Disable Btrfs internal snapshots support]),
                [with_btrfs=$enableval],[with_btrfs=yes])
-
 AM_CONDITIONAL(ENABLE_BTRFS, [test "x$with_btrfs" = "xyes"])
 
 if test "x$with_btrfs" = "xyes"; then
@@ -99,7 +97,6 @@ fi
 
 AC_ARG_ENABLE([ext4], AC_HELP_STRING([--disable-ext4],[Disable ext4 snapshots support]),
                [with_ext4=$enableval],[with_ext4=yes])
-
 AM_CONDITIONAL(ENABLE_EXT4, [test "x$with_ext4" = "xyes"])
 
 if test "x$with_ext4" = "xyes"; then
@@ -108,7 +105,6 @@ fi
 
 AC_ARG_ENABLE([lvm], AC_HELP_STRING([--disable-lvm],[Disable LVM thinprovisioned snapshots support]),
                [with_lvm=$enableval],[with_lvm=yes])
-
 AM_CONDITIONAL(ENABLE_LVM, [test "x$with_lvm" = "xyes"])
 
 if test "x$with_lvm" = "xyes"; then
@@ -123,6 +119,10 @@ AC_ARG_ENABLE([zypp], AC_HELP_STRING([--disable-zypp],[Disable zypp plugin suppo
                [with_zypp=$enableval],[with_zypp=yes])
 AM_CONDITIONAL(HAVE_ZYPP, [test "x$with_zypp" = "xyes"])
 
+AC_ARG_ENABLE([systemd], AC_HELP_STRING([--disable-systemd],[Disable systemd support]),
+               [enable_systemd=$enableval],[enable_systemd=yes])
+AM_CONDITIONAL(ENABLE_SYSTEMD, [test "x$enable_systemd" = "xyes"])
+
 AC_CHECK_LIB(btrfs, btrfs_read_and_process_send_stream)
 AC_CHECK_HEADERS([btrfs/version.h])
 
index 81f8b4874487bcd4e42598e4b6b67bc8184ddfc8..b9a761cf78e1de40073fc19e8b3ec19b92e31623 100644 (file)
@@ -21,6 +21,7 @@ install-data-local:
        install -D -m 644 org.opensuse.Snapper.conf $(DESTDIR)/etc/dbus-1/system.d/org.opensuse.Snapper.conf
        install -D -m 644 org.opensuse.Snapper.service $(DESTDIR)/usr/share/dbus-1/system-services/org.opensuse.Snapper.service
 
+if ENABLE_SYSTEMD
        install -D -m 644 timeline.service $(DESTDIR)/usr/lib/systemd/system/snapper-timeline.service
        install -D -m 644 timeline.timer $(DESTDIR)/usr/lib/systemd/system/snapper-timeline.timer
        install -D -m 644 cleanup.service $(DESTDIR)/usr/lib/systemd/system/snapper-cleanup.service
@@ -28,6 +29,7 @@ install-data-local:
        install -D -m 644 boot.service $(DESTDIR)/usr/lib/systemd/system/snapper-boot.service
        install -D -m 644 boot.timer $(DESTDIR)/usr/lib/systemd/system/snapper-boot.timer
        install -D -m 644 snapperd.service $(DESTDIR)/usr/lib/systemd/system/snapperd.service
+endif
 
 if HAVE_ZYPP
        install -D -m 644 zypp-plugin.conf $(DESTDIR)/etc/snapper/zypp-plugin.conf