debian: refresh debian packaging to use current best practices
authorMichael Prokop <mika@grml.org>
Fri, 10 Jul 2020 08:12:13 +0000 (10:12 +0200)
committerMichael Prokop <mika@grml.org>
Fri, 10 Jul 2020 08:22:19 +0000 (10:22 +0200)
* replace Priority extra (deprecated) with optional
* drop debian/compat and switch to debhelper-compat approach
* minimize debian/rules
* drop empty/unused postinst/postrm scripts
* provide debian/source/format

debian/compat [deleted file]
debian/control
debian/grml-udev-config.install [new file with mode: 0644]
debian/postinst [deleted file]
debian/postrm [deleted file]
debian/rules
debian/source/format [new file with mode: 0644]

diff --git a/debian/compat b/debian/compat
deleted file mode 100644 (file)
index 7f8f011..0000000
+++ /dev/null
@@ -1 +0,0 @@
-7
index 3c2cc1a..7f29085 100644 (file)
@@ -1,9 +1,9 @@
 Source: grml-udev-config
 Section: admin
-Priority: extra
+Priority: optional
 Maintainer: Michael Prokop <mika@grml.org>
 Build-Depends:
- debhelper (>= 7),
+ debhelper-compat (= 12),
 Standards-Version: 4.5.0
 Homepage: https://git.grml.org/?p=grml-udev-config.git
 Vcs-git: git://git.grml.org/grml-udev-config.git
diff --git a/debian/grml-udev-config.install b/debian/grml-udev-config.install
new file mode 100644 (file)
index 0000000..d45fb93
--- /dev/null
@@ -0,0 +1,3 @@
+scripts/forensic-mark-readonly /etc/udev/scripts/
+scripts/grml-udev-rebuildfstab /etc/udev/scripts/
+scripts/brltty.sh /lib/brltty/
diff --git a/debian/postinst b/debian/postinst
deleted file mode 100644 (file)
index 329ff4c..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-# postinst script for grml-udev-config
-
-set -e
-
-case "$1" in
-    configure)
-    ;;
-
-    abort-upgrade|abort-remove|abort-deconfigure)
-    ;;
-
-    *)
-        echo "postinst called with unknown argument \`$1'" >&2
-        exit 1
-    ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/postrm b/debian/postrm
deleted file mode 100644 (file)
index e6adf51..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-# postrm script for grml-udev-config
-
-set -e
-
-case "$1" in
-    purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
-    ;;
-
-    *)
-        echo "postrm called with unknown argument \`$1'" >&2
-        exit 1
-    ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
index 1f1c465..638d628 100755 (executable)
@@ -1,63 +1,17 @@
 #!/usr/bin/make -f
 # -*- makefile -*-
 
-#export DH_VERBOSE=1
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
 
-build: build-stamp
+%:
+       dh $@
 
-build-stamp:
-       dh_testdir
-       touch $@
-
-clean:
-       dh_testdir
-       dh_testroot
-       rm -f build-stamp
-       dh_clean
-
-install: build
-       dh_testdir
-       dh_testroot
-       dh_prep
-       dh_installdirs /etc/udev/scripts
-       dh_installdirs /lib/brltty/
-
-       install -m 755 scripts/forensic-mark-readonly debian/grml-udev-config/etc/udev/scripts/forensic-mark-readonly
-       install -m 755 scripts/grml-udev-rebuildfstab debian/grml-udev-config/etc/udev/scripts/
-       install -m 755 scripts/brltty.sh debian/grml-udev-config/lib/brltty/brltty.sh
-
-# Build architecture-dependent files here.
-binary-arch: install
-# We have nothing to do by default.
-
-# Build architecture-independent files here.
-binary-indep: install
-       dh_testdir
-       dh_testroot
-       dh_installchangelogs
-       dh_installdocs
-       dh_installexamples
+override_dh_install:
+       dh_install
        dh_installudev --name=grml-forensic     --priority 01
        dh_installudev --name=grml-external     --priority 60
        dh_installudev --name=grml-usbdev       --priority 60
        dh_installudev --name=brltty            --priority 85
-       dh_installudev --name=grml-dm                   --priority 89
+       dh_installudev --name=grml-dm           --priority 89
        dh_installudev --name=grml-blockdevices --priority 90
-       dh_installinit --no-start --name=grml-udev
-       # do *NOT* automatically install it, see README.Debian
-       # --update-rcd-params='start 03 S .'
-       dh_installman
-       dh_link
-       dh_strip
-       dh_compress
-       mkdir -p debian/grml-udev-config/usr/share/lintian/overrides/
-       cp -av debian/overrides debian/grml-udev-config/usr/share/lintian/overrides/grml-udev-config
-       dh_fixperms
-       dh_installdeb
-       dh_shlibdeps
-       dh_gencontrol
-       dh_md5sums
-       dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install
diff --git a/debian/source/format b/debian/source/format
new file mode 100644 (file)
index 0000000..89ae9db
--- /dev/null
@@ -0,0 +1 @@
+3.0 (native)