1
0
Fork 0

Moving to dh_installalternatives.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-17 22:30:06 +01:00
parent 68a1b6af2d
commit 4a6fecdcb5
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
4 changed files with 16 additions and 56 deletions

1
debian/control vendored
View file

@ -3,6 +3,7 @@ Section: utils
Priority: optional
Maintainer: Daniel Baumann <daniel.baumann@progress-linux.org>
Build-Depends:
debhelper (>= 13.1~),
debhelper-compat (= 13),
Rules-Requires-Root: no
Standards-Version: 4.6.0

15
debian/lunzip.alternatives vendored Normal file
View file

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

View file

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

26
debian/lunzip.prerm vendored
View file

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