From a966b7a5ab816798879fa16787019cc2862840d8 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 7 Dec 2015 15:18:00 +0100 Subject: [PATCH] allow to enable or disable systemd units for offline update --- configure.ac | 8 ++++++++ data/Makefile.am | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index fb5dfd463..d9b8562fb 100644 --- a/configure.ac +++ b/configure.ac @@ -248,6 +248,13 @@ if test x$enable_systemd = xyes; then fi AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$has_systemdsystemunitdir"]) +dnl --------------------------------------------------------------------------- +dnl - Use systemd offline update +dnl --------------------------------------------------------------------------- +AC_ARG_ENABLE(offline-update, AS_HELP_STRING([--enable-offline-update],[enable offline update via systemd]), + enable_offline_update=$enableval,enable_offline_update=yes) +AM_CONDITIONAL(ENABLE_OFFLINE_UPDATE, [test x$enable_systemd = xyes -a x$enable_offline_update = xyes]) + dnl --------------------------------------------------------------------------- dnl - Generate man pages ? (default enabled) dnl --------------------------------------------------------------------------- @@ -626,6 +633,7 @@ echo " cppflags: ${CPPFLAGS} Able to run locally: ${enable_local} Use systemd: ${enable_systemd} + Enable offline update: ${enable_offline_update} Networking stacks: ${networking_apis} Browser plugin: ${build_browser_plugin} GStreamer plugin: ${build_gstreamer_plugin} diff --git a/data/Makefile.am b/data/Makefile.am index bd36cd218..dbd936e1d 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -40,7 +40,7 @@ install-data-hook: echo "Remove global read access for: $(DESTDIR)$(localstatedir)/lib/PackageKit/$$file"; \ chmod o-r $(DESTDIR)$(localstatedir)/lib/PackageKit/$$file; \ done -if HAVE_SYSTEMD +if ENABLE_OFFLINE_UPDATE mkdir -p $(DESTDIR)$(systemdservicedir)/system-update.target.wants ln -sf ../packagekit-offline-update.service $(DESTDIR)$(systemdservicedir)/system-update.target.wants/packagekit-offline-update.service endif