Switch from cdbs to debhelper sequence
This commit is contained in:
parent
0808410404
commit
57fac761d2
3 changed files with 42 additions and 36 deletions
3
debian/changelog
vendored
3
debian/changelog
vendored
|
@ -10,6 +10,7 @@ nut (2.7.4-9) UNRELEASED; urgency=medium
|
||||||
LP: #1814314)
|
LP: #1814314)
|
||||||
|
|
||||||
[ Laurent Bigonville ]
|
[ Laurent Bigonville ]
|
||||||
|
* Switch from cdbs to debhelper sequence
|
||||||
* Add libltdl-dev to the build-dependencies and fix FTBFS when it is
|
* Add libltdl-dev to the build-dependencies and fix FTBFS when it is
|
||||||
installed (Closes: #831740)
|
installed (Closes: #831740)
|
||||||
* debian/control: Bump Standards-Version to 4.4.0 (no further changes)
|
* debian/control: Bump Standards-Version to 4.4.0 (no further changes)
|
||||||
|
@ -32,7 +33,7 @@ nut (2.7.4-9) UNRELEASED; urgency=medium
|
||||||
by nut-server initscript
|
by nut-server initscript
|
||||||
* debian/nut-client.lintian-overrides: Drop unused override
|
* debian/nut-client.lintian-overrides: Drop unused override
|
||||||
|
|
||||||
-- Laurent Bigonville <bigon@debian.org> Sat, 27 Jul 2019 14:31:16 +0200
|
-- Laurent Bigonville <bigon@debian.org> Sat, 27 Jul 2019 15:16:11 +0200
|
||||||
|
|
||||||
nut (2.7.4-8) unstable; urgency=medium
|
nut (2.7.4-8) unstable; urgency=medium
|
||||||
|
|
||||||
|
|
4
debian/control
vendored
4
debian/control
vendored
|
@ -4,7 +4,6 @@ Priority: optional
|
||||||
Maintainer: Arnaud Quette <aquette@debian.org>
|
Maintainer: Arnaud Quette <aquette@debian.org>
|
||||||
Uploaders: Laurent Bigonville <bigon@debian.org>
|
Uploaders: Laurent Bigonville <bigon@debian.org>
|
||||||
Build-Depends: autotools-dev,
|
Build-Depends: autotools-dev,
|
||||||
cdbs (>= 0.4.122~),
|
|
||||||
debhelper (>= 9.20160709~),
|
debhelper (>= 9.20160709~),
|
||||||
dh-autoreconf,
|
dh-autoreconf,
|
||||||
dh-python,
|
dh-python,
|
||||||
|
@ -19,6 +18,7 @@ Build-Depends: autotools-dev,
|
||||||
libusb-dev (>= 0.1.8),
|
libusb-dev (>= 0.1.8),
|
||||||
libwrap0-dev (>= 7.6),
|
libwrap0-dev (>= 7.6),
|
||||||
python (>= 2.6.6-3~),
|
python (>= 2.6.6-3~),
|
||||||
|
python3,
|
||||||
systemd [linux-any]
|
systemd [linux-any]
|
||||||
Build-Depends-Indep: asciidoc (>= 8.6.3),
|
Build-Depends-Indep: asciidoc (>= 8.6.3),
|
||||||
asciidoc-dblatex,
|
asciidoc-dblatex,
|
||||||
|
@ -51,7 +51,7 @@ Depends: adduser,
|
||||||
nut-client (= ${binary:Version}),
|
nut-client (= ${binary:Version}),
|
||||||
${misc:Depends},
|
${misc:Depends},
|
||||||
${shlibs:Depends},
|
${shlibs:Depends},
|
||||||
${udev}
|
udev [linux-any]
|
||||||
Suggests: nut-cgi, nut-ipmi, nut-snmp, nut-xml
|
Suggests: nut-cgi, nut-ipmi, nut-snmp, nut-xml
|
||||||
Conflicts: nut-hal-drivers
|
Conflicts: nut-hal-drivers
|
||||||
Replaces: nut (<< 2.6.1-2~)
|
Replaces: nut (<< 2.6.1-2~)
|
||||||
|
|
71
debian/rules
vendored
71
debian/rules
vendored
|
@ -1,29 +1,16 @@
|
||||||
#!/usr/bin/make -f
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
include /usr/share/cdbs/1/rules/debhelper.mk
|
|
||||||
include /usr/share/cdbs/1/class/autotools.mk
|
|
||||||
include /usr/share/cdbs/1/class/python-module.mk
|
|
||||||
|
|
||||||
include /usr/share/cdbs/1/rules/autoreconf.mk
|
|
||||||
# We cannot call autoreconf -f -i as it updates INSTALL which is used for doc
|
|
||||||
# generation
|
|
||||||
DEB_DH_AUTORECONF_ARGS = --as-needed
|
|
||||||
|
|
||||||
DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null)
|
DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null)
|
||||||
|
|
||||||
# List any files which are not installed
|
|
||||||
include /usr/share/cdbs/1/rules/utils.mk
|
|
||||||
common-binary-post-install-arch:: list-missing
|
|
||||||
|
|
||||||
DEB_BUILD_MAINT_OPTIONS=hardening=+all
|
DEB_BUILD_MAINT_OPTIONS=hardening=+all
|
||||||
DEB_LDFLAGS_MAINT_APPEND=-Wl,-z,defs -Wl,-O1 -Wl,--as-needed
|
DEB_LDFLAGS_MAINT_APPEND=-Wl,-z,defs -Wl,-O1 -Wl,--as-needed
|
||||||
include /usr/share/dpkg/buildflags.mk
|
include /usr/share/dpkg/buildflags.mk
|
||||||
|
|
||||||
DEB_CONFIGURE_PREFIX :=
|
DEB_CONFIGURE_EXTRA_FLAGS := --prefix= \
|
||||||
DEB_CONFIGURE_SYSCONFDIR := /etc/nut
|
--sysconfdir=/etc/nut \
|
||||||
DEB_CONFIGURE_INCLUDEDIR := /usr/include
|
--includedir=/usr/include \
|
||||||
DEB_CONFIGURE_MANDIR := /usr/share/man
|
--mandir=/usr/share/man \
|
||||||
DEB_CONFIGURE_EXTRA_FLAGS := --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
|
--libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
|
||||||
--with-ssl --with-nss \
|
--with-ssl --with-nss \
|
||||||
--with-cgi \
|
--with-cgi \
|
||||||
--with-dev \
|
--with-dev \
|
||||||
|
@ -47,7 +34,21 @@ ifneq ($(shell which asciidoc),)
|
||||||
DEB_CONFIGURE_EXTRA_FLAGS+=--with-doc=html-chunked,pdf
|
DEB_CONFIGURE_EXTRA_FLAGS+=--with-doc=html-chunked,pdf
|
||||||
endif
|
endif
|
||||||
|
|
||||||
common-install-arch::
|
%:
|
||||||
|
dh $@ --with python2 --with python3 --with autoreconf --with systemd
|
||||||
|
|
||||||
|
override_dh_auto_configure:
|
||||||
|
dh_auto_configure -- $(DEB_CONFIGURE_EXTRA_FLAGS)
|
||||||
|
|
||||||
|
override_dh_autoreconf:
|
||||||
|
dh_autoreconf --as-needed
|
||||||
|
|
||||||
|
override_dh_install:
|
||||||
|
dh_install --list-missing
|
||||||
|
|
||||||
|
override_dh_auto_install-arch:
|
||||||
|
dh_auto_install -a
|
||||||
|
|
||||||
# install the bash completion script
|
# install the bash completion script
|
||||||
mkdir -p $(CURDIR)/debian/tmp/usr/share/bash-completion/completions/
|
mkdir -p $(CURDIR)/debian/tmp/usr/share/bash-completion/completions/
|
||||||
cp $(CURDIR)/scripts/misc/nut.bash_completion \
|
cp $(CURDIR)/scripts/misc/nut.bash_completion \
|
||||||
|
@ -115,7 +116,9 @@ ifeq (linux,$(DEB_HOST_ARCH_OS))
|
||||||
$(CURDIR)/debian/nut-server/usr/lib/tmpfiles.d/nut-server.conf
|
$(CURDIR)/debian/nut-server/usr/lib/tmpfiles.d/nut-server.conf
|
||||||
endif
|
endif
|
||||||
|
|
||||||
common-install-indep::
|
override_dh_auto_install-indep:
|
||||||
|
dh_auto_install -i
|
||||||
|
|
||||||
#install documentation
|
#install documentation
|
||||||
mkdir -p $(CURDIR)/debian/tmp/usr/share/doc/nut-doc/pdf
|
mkdir -p $(CURDIR)/debian/tmp/usr/share/doc/nut-doc/pdf
|
||||||
mkdir -p $(CURDIR)/debian/tmp/usr/share/doc/nut-doc/html
|
mkdir -p $(CURDIR)/debian/tmp/usr/share/doc/nut-doc/html
|
||||||
|
@ -127,18 +130,20 @@ common-install-indep::
|
||||||
cp -a $${f} $(CURDIR)/debian/tmp/usr/share/doc/nut-doc/html/$${nf}/; \
|
cp -a $${f} $(CURDIR)/debian/tmp/usr/share/doc/nut-doc/html/$${nf}/; \
|
||||||
done
|
done
|
||||||
|
|
||||||
binary-install/nut-monitor::
|
override_dh_installinit:
|
||||||
dh_python2 -pnut-monitor
|
dh_installinit --restart-after-upgrade --error-handler=handle_start_failure
|
||||||
|
|
||||||
DEB_DH_INSTALLINIT_ARGS_nut-server := --init-script=nut-server --restart-after-upgrade --error-handler=handle_start_failure
|
override_dh_systemd_start:
|
||||||
DEB_DH_INSTALLINIT_ARGS_nut-client := --init-script=nut-client --restart-after-upgrade --error-handler=handle_start_failure
|
dh_systemd_start --restart-after-upgrade
|
||||||
DEB_DH_SYSTEMD_START_ARGS_nut-server := --restart-after-upgrade
|
|
||||||
DEB_DH_SYSTEMD_START_ARGS_nut-client := --restart-after-upgrade
|
|
||||||
DEB_DH_COMPRESS_ARGS_nut-doc := -X.pdf
|
|
||||||
|
|
||||||
ifeq (linux,$(DEB_HOST_ARCH_OS))
|
override_dh_compress:
|
||||||
# for Debian
|
dh_compress -X.pdf
|
||||||
DEB_DH_GENCONTROL_ARGS := -- -Vudev="udev (>= 0.124-1)"
|
|
||||||
# for Ubuntu
|
override_dh_installdocs:
|
||||||
# DEB_DH_GENCONTROL_ARGS := -- -Vudev="udev (>= 136-1)"
|
dh_installdocs -A ./README ./NEWS ./TODO ./AUTHORS
|
||||||
endif
|
|
||||||
|
override_dh_installchangelogs:
|
||||||
|
# dh_installchangelogs automagically rename history.txt to changelog, let's try
|
||||||
|
# to avoid that
|
||||||
|
dh_installchangelogs -pnut -Xhistory.txt
|
||||||
|
dh_installchangelogs --remaining-packages
|
||||||
|
|
Loading…
Reference in a new issue