1
0
Fork 0

Harmonizing update-alternatives handling across all lzip-alternative providing packages.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-23 19:18:37 +01:00
parent b399d8ecda
commit f5a49e7dc0
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
3 changed files with 7 additions and 7 deletions

View file

@ -5,8 +5,8 @@ set -e
case "${1}" in
configure)
update-alternatives --quiet \
--install /usr/bin/lzip lzip /usr/bin/lzip.public-domain 20 \
--slave /usr/share/man/man1/lzip.1.gz lzip.1.gz /usr/share/man/man1/lzip.public-domain.1.gz
--install /usr/bin/lzip lzip /usr/bin/lzip.pdlzip 20 \
--slave /usr/share/man/man1/lzip.1.gz lzip.1.gz /usr/share/man/man1/lzip.pdlzip.1.gz
;;
abort-upgrade|abort-remove|abort-deconfigure)

2
debian/pdlzip.prerm vendored
View file

@ -4,7 +4,7 @@ set -e
case "${1}" in
remove|upgrade|deconfigure)
update-alternatives --quiet --remove lzip /usr/bin/lzip.public-domain
update-alternatives --quiet --remove lzip /usr/bin/lzip.pdlzip
;;
failed-upgrade)

8
debian/rules vendored
View file

@ -7,11 +7,11 @@ override_dh_auto_install:
dh_auto_install -- DESTDIR=$(CURDIR)/debian/pdlzip
# alternative handling
mv debian/pdlzip/usr/bin/pdlzip debian/pdlzip/usr/bin/lzip.public-domain
mv debian/pdlzip/usr/share/man/man1/pdlzip.1 debian/pdlzip/usr/share/man/man1/lzip.public-domain.1
mv debian/pdlzip/usr/bin/pdlzip debian/pdlzip/usr/bin/lzip.pdlzip
mv debian/pdlzip/usr/share/man/man1/pdlzip.1 debian/pdlzip/usr/share/man/man1/lzip.pdlzip.1
ln -s /usr/bin/lzip.public-domain debian/pdlzip/usr/bin/pdlzip
ln -s /usr/share/man/man1/lzip.public-domain.1.gz debian/pdlzip/usr/share/man/man1/pdlzip.1.gz
ln -s /usr/bin/lzip.pdlzip debian/pdlzip/usr/bin/pdlzip
ln -s /usr/share/man/man1/lzip.pdlzip.1.gz debian/pdlzip/usr/share/man/man1/pdlzip.1.gz
override_dh_builddeb:
dh_builddeb -- -Zxz