Simplify debian/rules, install systemd files on non-linux arch as well
This commit is contained in:
parent
1f4f8540a3
commit
9aba586fa8
3
debian/changelog
vendored
3
debian/changelog
vendored
|
@ -35,8 +35,9 @@ nut (2.7.4-9) UNRELEASED; urgency=medium
|
|||
* debian/nut-client.lintian-overrides: Drop unused override
|
||||
* debian/nut-monitor.install: Install nut-monitor.appdata.xml in
|
||||
/usr/share/metainfo/ instead of /usr/share/appdata/
|
||||
* Simplify debian/rules, install systemd files on non-linux arch as well
|
||||
|
||||
-- Laurent Bigonville <bigon@debian.org> Sat, 27 Jul 2019 17:46:48 +0200
|
||||
-- Laurent Bigonville <bigon@debian.org> Sat, 27 Jul 2019 18:49:39 +0200
|
||||
|
||||
nut (2.7.4-8) unstable; urgency=medium
|
||||
|
||||
|
|
1
debian/nut-client.install
vendored
1
debian/nut-client.install
vendored
|
@ -19,3 +19,4 @@ debian/tmp/usr/share/augeas/lenses/dist/nutupsschedconf.aug
|
|||
debian/tmp/usr/share/augeas/lenses/dist/nutupssetconf.aug
|
||||
debian/tmp/usr/share/augeas/lenses/dist/tests/test_nut.aug
|
||||
debian/tmp/usr/share/bash-completion/completions/nut
|
||||
debian/tmp/lib/systemd/system/nut-monitor.service
|
||||
|
|
3
debian/nut-server.install
vendored
3
debian/nut-server.install
vendored
|
@ -58,3 +58,6 @@ debian/tmp/sbin/upsdrvctl
|
|||
debian/tmp/usr/share/nut/cmdvartab
|
||||
debian/tmp/usr/share/nut/driver.list
|
||||
debian/tmp/bin/nut-scanner
|
||||
debian/tmp/lib/systemd/system-shutdown/nutshutdown
|
||||
debian/tmp/lib/systemd/system/nut-driver.service
|
||||
debian/tmp/lib/systemd/system/nut-server.service
|
||||
|
|
35
debian/rules
vendored
35
debian/rules
vendored
|
@ -23,11 +23,8 @@ DEB_CONFIGURE_EXTRA_FLAGS := --prefix= \
|
|||
--with-pidpath=/run/nut \
|
||||
--datadir=/usr/share/nut \
|
||||
--with-pkgconfig-dir=/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig \
|
||||
--with-user=nut --with-group=nut
|
||||
|
||||
ifeq (linux,$(DEB_HOST_ARCH_OS))
|
||||
DEB_CONFIGURE_EXTRA_FLAGS+=--with-udev-dir=/lib/udev --with-systemdsystemunitdir=/lib/systemd/system
|
||||
endif
|
||||
--with-user=nut --with-group=nut \
|
||||
--with-udev-dir=/lib/udev --with-systemdsystemunitdir=/lib/systemd/system
|
||||
|
||||
# only build documentation if asciidoc is installed
|
||||
ifneq ($(shell which asciidoc),)
|
||||
|
@ -91,28 +88,6 @@ override_dh_auto_install-arch:
|
|||
install -m 0755 debian/local/upsmon $(CURDIR)/debian/tmp/sbin/upsmon
|
||||
install -m 0755 debian/local/upsd $(CURDIR)/debian/tmp/sbin/upsd
|
||||
|
||||
# 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
|
||||
|
||||
# Add a symlink to mask the LSB initscript
|
||||
ln -s nut-monitor.service $(CURDIR)/debian/nut-client/lib/systemd/system/nut-client.service
|
||||
ln -s /dev/null $(CURDIR)/debian/nut-client/lib/systemd/system/ups-monitor.service
|
||||
|
||||
# Install tmpfiles config file to create /run/nut directory
|
||||
install -m 644 -D $(CURDIR)/debian/nut-client.tmpfiles \
|
||||
$(CURDIR)/debian/nut-client/usr/lib/tmpfiles.d/nut-client.conf
|
||||
install -m 644 -D $(CURDIR)/debian/nut-server.tmpfiles \
|
||||
$(CURDIR)/debian/nut-server/usr/lib/tmpfiles.d/nut-server.conf
|
||||
endif
|
||||
|
||||
override_dh_auto_install-indep:
|
||||
dh_auto_install -i
|
||||
|
||||
|
@ -130,6 +105,12 @@ override_dh_auto_install-indep:
|
|||
override_dh_installinit:
|
||||
dh_installinit --error-handler=handle_start_failure
|
||||
|
||||
override_dh_installsystemd:
|
||||
# Add a symlink to mask the LSB initscript
|
||||
ln -s nut-monitor.service $(CURDIR)/debian/nut-client/lib/systemd/system/nut-client.service
|
||||
ln -s /dev/null $(CURDIR)/debian/nut-client/lib/systemd/system/ups-monitor.service
|
||||
dh_installsystemd
|
||||
|
||||
override_dh_compress:
|
||||
dh_compress -X.pdf
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user