Merge pull request #97 from eworm-de/offline-update

allow to enable or disable systemd units for offline update
This commit is contained in:
Richard Hughes 2015-12-07 14:50:01 +00:00
commit 2858fbba33
2 changed files with 9 additions and 1 deletions

View File

@ -248,6 +248,13 @@ if test x$enable_systemd = xyes; then
fi fi
AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$has_systemdsystemunitdir"]) 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 ---------------------------------------------------------------------------
dnl - Generate man pages ? (default enabled) dnl - Generate man pages ? (default enabled)
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
@ -626,6 +633,7 @@ echo "
cppflags: ${CPPFLAGS} cppflags: ${CPPFLAGS}
Able to run locally: ${enable_local} Able to run locally: ${enable_local}
Use systemd: ${enable_systemd} Use systemd: ${enable_systemd}
Enable offline update: ${enable_offline_update}
Networking stacks: ${networking_apis} Networking stacks: ${networking_apis}
Browser plugin: ${build_browser_plugin} Browser plugin: ${build_browser_plugin}
GStreamer plugin: ${build_gstreamer_plugin} GStreamer plugin: ${build_gstreamer_plugin}

View File

@ -40,7 +40,7 @@ install-data-hook:
echo "Remove global read access for: $(DESTDIR)$(localstatedir)/lib/PackageKit/$$file"; \ echo "Remove global read access for: $(DESTDIR)$(localstatedir)/lib/PackageKit/$$file"; \
chmod o-r $(DESTDIR)$(localstatedir)/lib/PackageKit/$$file; \ chmod o-r $(DESTDIR)$(localstatedir)/lib/PackageKit/$$file; \
done done
if HAVE_SYSTEMD if ENABLE_OFFLINE_UPDATE
mkdir -p $(DESTDIR)$(systemdservicedir)/system-update.target.wants mkdir -p $(DESTDIR)$(systemdservicedir)/system-update.target.wants
ln -sf ../packagekit-offline-update.service $(DESTDIR)$(systemdservicedir)/system-update.target.wants/packagekit-offline-update.service ln -sf ../packagekit-offline-update.service $(DESTDIR)$(systemdservicedir)/system-update.target.wants/packagekit-offline-update.service
endif endif