summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-12-29 02:12:23 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-12-29 02:12:35 +0000
commit3e37ef91304b2da363ac85a11d3630bb6f9b3c4a (patch)
tree115c456a383fe699fbb487ec7638c2d5f2983e77
parentReleasing debian version 1.11-2. (diff)
downloadpdlzip-3e37ef91304b2da363ac85a11d3630bb6f9b3c4a.tar.xz
pdlzip-3e37ef91304b2da363ac85a11d3630bb6f9b3c4a.zip
Moving to dh_installalternatives.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--debian/control1
-rw-r--r--debian/pdlzip.alternatives26
-rwxr-xr-xdebian/pdlzip.postinst35
-rwxr-xr-xdebian/pdlzip.prerm29
4 files changed, 27 insertions, 64 deletions
diff --git a/debian/control b/debian/control
index ab7c542..29ee35f 100644
--- a/debian/control
+++ b/debian/control
@@ -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
diff --git a/debian/pdlzip.alternatives b/debian/pdlzip.alternatives
new file mode 100644
index 0000000..4993462
--- /dev/null
+++ b/debian/pdlzip.alternatives
@@ -0,0 +1,26 @@
+# lzip-alternative
+Name: lzip
+Link: /usr/bin/lzip
+Alternative: /usr/bin/lzip.pdlzip
+Dependents:
+ /usr/share/info/lzip.info.gz lzip.info.gz /usr/share/info/lzip.pdlzip.info.gz
+ /usr/share/man/man1/lzip.1.gz lzip.1.gz /usr/share/man/man1/lzip.pdlzip.1.gz
+Priority: 2000
+
+# lzip-compressor
+Name: lzip-compressor
+Link: /usr/bin/lzip-compressor
+Alternative: /usr/bin/lzip.pdlzip
+Dependents:
+ /usr/share/info/lzip-compressor.info.gz lzip-compressor.info.gz /usr/share/info/lzip.pdlzip.info.gz
+ /usr/share/man/man1/lzip-compressor.1.gz lzip-compressor.1.gz /usr/share/man/man1/lzip.pdlzip.1.gz
+Priority: 2000
+
+# lzip-decompressor
+Name: lzip-decompressor
+Link: /usr/bin/lzip-decompressor
+Alternative: /usr/bin/lzip.pdlzip
+Dependents:
+ /usr/share/info/lzip-decompressor.info.gz lzip-decompressor.info.gz /usr/share/info/lzip.pdlzip.info.gz
+ /usr/share/man/man1/lzip-decompressor.1.gz lzip-decompressor.1.gz /usr/share/man/man1/lzip.pdlzip.1.gz
+Priority: 2000
diff --git a/debian/pdlzip.postinst b/debian/pdlzip.postinst
deleted file mode 100755
index bd2d424..0000000
--- a/debian/pdlzip.postinst
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-
-set -e
-
-case "${1}" in
- configure)
- # lzip-alternative
- update-alternatives --quiet \
- --install /usr/bin/lzip lzip /usr/bin/lzip.pdlzip 2000 \
- --slave /usr/share/man/man1/lzip.1.gz lzip.1.gz /usr/share/man/man1/lzip.pdlzip.1.gz
-
- # lzip-compressor
- update-alternatives --quiet \
- --install /usr/bin/lzip-compressor lzip-compressor /usr/bin/lzip.pdlzip 2000 \
- --slave /usr/share/man/man1/lzip-compressor.1.gz lzip-compressor.1.gz /usr/share/man/man1/lzip.pdlzip.1.gz
-
- # lzip-decompressor
- update-alternatives --quiet \
- --install /usr/bin/lzip-decompressor lzip-decompressor /usr/bin/lzip.pdlzip 2000 \
- --slave /usr/share/man/man1/lzip-decompressor.1.gz lzip-decompressor.1.gz /usr/share/man/man1/lzip.pdlzip.1.gz
- ;;
-
- abort-upgrade|abort-remove|abort-deconfigure)
-
- ;;
-
- *)
- echo "postinst called with unknown argument \`${1}'" >&2
- exit 1
- ;;
-esac
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/pdlzip.prerm b/debian/pdlzip.prerm
deleted file mode 100755
index 57beec7..0000000
--- a/debian/pdlzip.prerm
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-set -e
-
-case "${1}" in
- remove|upgrade|deconfigure)
- # lzip-alternative
- update-alternatives --quiet --remove lzip /usr/bin/lzip.pdlzip
-
- # lzip-compressor
- update-alternatives --quiet --remove lzip-compressor /usr/bin/lzip.pdlzip
-
- # lzip-decompressor
- update-alternatives --quiet --remove lzip-decompressor /usr/bin/lzip.pdlzip
- ;;
-
- failed-upgrade)
-
- ;;
-
- *)
- echo "prerm called with unknown argument \`${1}'" >&2
- exit 1
- ;;
-esac
-
-#DEBHELPER#
-
-exit 0