Adding alternative handling for /usr/bin/lzip.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
466ac635fc
commit
032a653572
3 changed files with 53 additions and 0 deletions
24
debian/lunzip.postinst
vendored
Normal file
24
debian/lunzip.postinst
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
case "${1}" in
|
||||
configure)
|
||||
update-alternatives --quiet \
|
||||
--install /usr/bin/lzip lzip /usr/bin/lzip.decompressor 10 \
|
||||
--slave /usr/share/man/man1/lzip.1.gz lzip.1.gz /usr/share/man/man1/lzip.decompressor.1.gz
|
||||
;;
|
||||
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postinst called with unknown argument \`${1}'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
22
debian/lunzip.prerm
vendored
Normal file
22
debian/lunzip.prerm
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
case "${1}" in
|
||||
remove|upgrade|deconfigure)
|
||||
update-alternatives --quiet --remove lzip /usr/bin/lzip.decompressor
|
||||
;;
|
||||
|
||||
failed-upgrade)
|
||||
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "prerm called with unknown argument \`${1}'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
7
debian/rules
vendored
7
debian/rules
vendored
|
@ -6,6 +6,13 @@
|
|||
override_dh_auto_install:
|
||||
dh_auto_install -- DESTDIR=$(CURDIR)/debian/lunzip
|
||||
|
||||
# alernative handling
|
||||
mv debian/lunzip/usr/bin/lunzip debian/lunzip/usr/bin/lzip.decompressor
|
||||
mv debian/lunzip/usr/share/man/man1/lunzip.1 debian/lunzip/usr/share/man/man1/lzip.decompressor.1
|
||||
|
||||
ln -s /usr/bin/lzip.decompressor debian/lunzip/usr/bin/lunzip
|
||||
ln -s /usr/share/man/man1/lzip.decompressor.1.gz debian/lunzip/usr/share/man/man1/lunzip.1.gz
|
||||
|
||||
override_dh_builddeb:
|
||||
dh_builddeb -- -Zxz
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue