From f0588d42f855a6205529fa36b3c7b352c69c57a3 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 17 Feb 2025 22:26:17 +0100 Subject: [PATCH] Adding lzip-decompressor alternatives. Signed-off-by: Daniel Baumann --- debian/control | 1 + debian/lunzip.postinst | 6 ++++++ debian/lunzip.prerm | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/debian/control b/debian/control index bbf37a5..eff6693 100644 --- a/debian/control +++ b/debian/control @@ -17,6 +17,7 @@ Depends: ${shlibs:Depends}, Provides: lzip-alternative, + lzip-decompressor, Description: data compressor based on the LZMA algorithm (decompressor) Lzip is a lossless data compressor based on the LZMA algorithm, with very safe integrity checking and a user interface similar to the one of gzip or bzip2. diff --git a/debian/lunzip.postinst b/debian/lunzip.postinst index 9e7208e..4c02908 100755 --- a/debian/lunzip.postinst +++ b/debian/lunzip.postinst @@ -4,9 +4,15 @@ 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) diff --git a/debian/lunzip.prerm b/debian/lunzip.prerm index 6e75227..0bb9f30 100755 --- a/debian/lunzip.prerm +++ b/debian/lunzip.prerm @@ -4,7 +4,11 @@ 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)