1
0
Fork 0

Adding alternative handling for /usr/bin/lzip.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-24 03:57:50 +01:00
parent cfbffdc6b3
commit babddf4dca
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
4 changed files with 57 additions and 0 deletions

1
debian/control vendored
View file

@ -9,6 +9,7 @@ Homepage: http://www.nongnu.org/lzip/plzip.html
Package: plzip Package: plzip
Architecture: any Architecture: any
Depends: ${misc:Depends}, ${shlibs:Depends} Depends: ${misc:Depends}, ${shlibs:Depends}
Breaks: lzip (<< 1.15~)
Description: parallel, lossless data compressor based on the LZMA algorithm Description: parallel, lossless data compressor based on the LZMA algorithm
Lzip is a lossless data compressor based on the LZMA algorithm, with very safe 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. integrity checking and a user interface similar to the one of gzip or bzip2.

25
debian/plzip.postinst vendored Normal file
View file

@ -0,0 +1,25 @@
#!/bin/sh
set -e
case "${1}" in
configure)
update-alternatives --quiet \
--install /usr/bin/lzip lzip /usr/bin/lzip.parallel 200 \
--slave /usr/share/info/lzip.info.gz lzip.info.gz /usr/share/info/lzip.parallel.info.gz \
--slave /usr/share/man/man1/lzip.1.gz lzip.1.gz /usr/share/man/man1/lzip.parallel.1.gz
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`${1}'" >&2
exit 1
;;
esac
#DEBHELPER#
exit 0

22
debian/plzip.prerm vendored Normal file
View file

@ -0,0 +1,22 @@
#!/bin/sh
set -e
case "${1}" in
remove|upgrade|deconfigure)
update-alternatives --quiet --remove lzip /usr/bin/lzip.parallel
;;
failed-upgrade)
;;
*)
echo "prerm called with unknown argument \`${1}'" >&2
exit 1
;;
esac
#DEBHELPER#
exit 0

9
debian/rules vendored
View file

@ -11,6 +11,15 @@ override_dh_auto_install:
# removing unused files # removing unused files
rm -f debian/plzip/usr/share/info/dir* rm -f debian/plzip/usr/share/info/dir*
# alernative handling
mv debian/plzip/usr/bin/plzip debian/plzip/usr/bin/lzip.parallel
mv debian/plzip/usr/share/info/plzip.info debian/plzip/usr/share/info/lzip.parallel.info
mv debian/plzip/usr/share/man/man1/plzip.1 debian/plzip/usr/share/man/man1/lzip.parallel.1
ln -s /usr/bin/lzip.parallel debian/plzip/usr/bin/plzip
ln -s /usr/share/info/lzip.parallel.info.gz debian/plzip/usr/share/info/plzip.info.gz
ln -s /usr/share/man/man1/lzip.parallel.1.gz debian/plzip/usr/share/man/man1/plzip.1.gz
ifeq ($(DEB_BUILD_ARCH),sparc) ifeq ($(DEB_BUILD_ARCH),sparc)
override_dh_auto_test: override_dh_auto_test:
# disabled, see #608642 for more information # disabled, see #608642 for more information