From dd0db568af63c5cf887d7ac537b37d23af21e5a7 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 29 Dec 2021 03:18:36 +0100 Subject: Moving to dh_installalternatives. Signed-off-by: Daniel Baumann --- debian/control | 1 + debian/lunzip.alternatives | 15 +++++++++++++++ debian/lunzip.postinst | 30 ------------------------------ debian/lunzip.prerm | 26 -------------------------- 4 files changed, 16 insertions(+), 56 deletions(-) create mode 100644 debian/lunzip.alternatives delete mode 100755 debian/lunzip.postinst delete mode 100755 debian/lunzip.prerm diff --git a/debian/control b/debian/control index 5fc4a45..b0acf4f 100644 --- a/debian/control +++ b/debian/control @@ -3,6 +3,7 @@ Section: utils Priority: optional Maintainer: Daniel Baumann Build-Depends: + debhelper (>= 13.1~), debhelper-compat (= 13), Rules-Requires-Root: no Standards-Version: 4.6.0 diff --git a/debian/lunzip.alternatives b/debian/lunzip.alternatives new file mode 100644 index 0000000..55d6245 --- /dev/null +++ b/debian/lunzip.alternatives @@ -0,0 +1,15 @@ +# lzip-alternative +Name: lzip +Link: /usr/bin/lzip +Alternative: /usr/bin/lzip.lunzip +Dependents: + /usr/share/man/man1/lzip.1.gz lzip.1.gz /usr/share/man/man1/lzip.lunzip.1.gz +Priority: -1000 + +# lzip-decompressor +Name: lzip-decompressor +Link: /usr/bin/lzip-decompressor +Alternative: /usr/bin/lzip.lunzip +Dependents: + /usr/share/man/man1/lzip-decompressor.1.gz lzip-decompressor.1.gz /usr/share/man/man1/lzip.lunzip.1.gz +Priority: -1000 diff --git a/debian/lunzip.postinst b/debian/lunzip.postinst deleted file mode 100755 index 4c02908..0000000 --- a/debian/lunzip.postinst +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh - -set -e - -case "${1}" in - configure) - # lzip-alternative - update-alternatives --quiet \ - --install /usr/bin/lzip lzip /usr/bin/lzip.lunzip -1000 \ - --slave /usr/share/man/man1/lzip.1.gz lzip.1.gz /usr/share/man/man1/lzip.lunzip.1.gz - - # lzip-decompressor - update-alternatives --quiet \ - --install /usr/bin/lzip-decompressor lzip-decompressor /usr/bin/lzip.lunzip -1000 \ - --slave /usr/share/man/man1/lzip-decompressor.1.gz lzip-decompressor.1.gz /usr/share/man/man1/lzip.lunzip.1.gz - ;; - - abort-upgrade|abort-remove|abort-deconfigure) - - ;; - - *) - echo "postinst called with unknown argument \`${1}'" >&2 - exit 1 - ;; -esac - -#DEBHELPER# - -exit 0 diff --git a/debian/lunzip.prerm b/debian/lunzip.prerm deleted file mode 100755 index 0bb9f30..0000000 --- a/debian/lunzip.prerm +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -set -e - -case "${1}" in - remove|upgrade|deconfigure) - # lzip-alternative - update-alternatives --quiet --remove lzip /usr/bin/lzip.lunzip - - # lzip-decompressor - update-alternatives --quiet --remove lzip-decompressor /usr/bin/lzip.lunzip - ;; - - failed-upgrade) - - ;; - - *) - echo "prerm called with unknown argument \`${1}'" >&2 - exit 1 - ;; -esac - -#DEBHELPER# - -exit 0 -- cgit v1.2.3