Install systemd .service files (Closes: #679450)

This commit is contained in:
Laurent Bigonville 2012-08-12 23:14:24 +02:00
parent 8141cb7297
commit 0d1e4a2dcc
2 changed files with 15 additions and 2 deletions

3
debian/changelog vendored
View File

@ -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 <bigon@debian.org> Sun, 12 Aug 2012 22:18:36 +0200
-- Laurent Bigonville <bigon@debian.org> Sun, 12 Aug 2012 23:14:05 +0200
nut (2.6.4-2) unstable; urgency=low

14
debian/rules vendored
View File

@ -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