diff --git a/debian/changelog b/debian/changelog index 8918061..464e9b2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,8 +7,9 @@ nut (2.6.4-3) UNRELEASED; urgency=low [ Laurent Bigonville ] * Follow multi-arch policy + * Install systemd .service files (Closes: #679450) - -- Laurent Bigonville Sun, 12 Aug 2012 22:18:36 +0200 + -- Laurent Bigonville Sun, 12 Aug 2012 23:14:05 +0200 nut (2.6.4-2) unstable; urgency=low diff --git a/debian/rules b/debian/rules index 3dae758..42ddca7 100755 --- a/debian/rules +++ b/debian/rules @@ -30,7 +30,7 @@ DEB_CONFIGURE_EXTRA_FLAGS := --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \ --with-user=nut --with-group=nut ifeq (linux,$(DEB_HOST_ARCH_OS)) - DEB_CONFIGURE_EXTRA_FLAGS+=--with-udev-dir=/lib/udev + DEB_CONFIGURE_EXTRA_FLAGS+=--with-udev-dir=/lib/udev --with-systemdsystemunitdir=/lib/systemd/system endif # only build documentation if asciidoc is installed @@ -66,6 +66,18 @@ common-install-arch:: ln -s /lib/$(DEB_HOST_MULTIARCH)/libupsclient.so.1.1.0 \ $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libupsclient.so + # Install systemd files only on systems where it's supported +ifeq (linux,$(DEB_HOST_ARCH_OS)) + install -m 644 -D $(CURDIR)/debian/tmp/lib/systemd/system/nut-monitor.service \ + $(CURDIR)/debian/nut-client/lib/systemd/system/nut-monitor.service + install -D $(CURDIR)/debian/tmp/lib/systemd/system-shutdown/nutshutdown \ + $(CURDIR)/debian/nut-server/lib/systemd/system-shutdown/nutshutdown + install -m 644 -D $(CURDIR)/debian/tmp/lib/systemd/system/nut-driver.service \ + $(CURDIR)/debian/nut-server/lib/systemd/system/nut-driver.service + install -m 644 -D $(CURDIR)/debian/tmp/lib/systemd/system/nut-server.service \ + $(CURDIR)/debian/nut-server/lib/systemd/system/nut-server.service +endif + common-install-indep:: #install documentation mkdir -p $(CURDIR)/debian/tmp/usr/share/doc/nut-doc/pdf