From 4572b4f7f422c84b4c552984dcf5927e3fa00faa Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 7 Nov 2015 07:45:17 +0100 Subject: Adding debian version 0.2-2. Signed-off-by: Daniel Baumann --- debian/changelog | 6 ++++++ debian/control | 2 ++ debian/lzd.postinst | 23 +++++++++++++++++++++++ debian/lzd.prerm | 22 ++++++++++++++++++++++ debian/rules | 5 +++++ 5 files changed, 58 insertions(+) create mode 100644 debian/lzd.postinst create mode 100644 debian/lzd.prerm diff --git a/debian/changelog b/debian/changelog index 96ef5be..20b6db8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +lzd (0.2-2) experimental; urgency=low + + * Adding lzip alternatives handling. + + -- Daniel Baumann Tue, 04 Jun 2013 16:53:08 +0200 + lzd (0.2-1) experimental; urgency=low * Merging upstream version 0.2. diff --git a/debian/control b/debian/control index 81bcb18..26f3218 100644 --- a/debian/control +++ b/debian/control @@ -9,6 +9,8 @@ Homepage: http://www.nongnu.org/lzip/lzip.html Package: lzd Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} +Breaks: lzip (<< 1.15~) +Provides: lzip-alternative Description: Educational, lossless data compressor based on the LZMA algorithm 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/lzd.postinst b/debian/lzd.postinst new file mode 100644 index 0000000..309e810 --- /dev/null +++ b/debian/lzd.postinst @@ -0,0 +1,23 @@ +#!/bin/sh + +set -e + +case "${1}" in + configure) + update-alternatives --quiet \ + --install /usr/bin/lzip lzip /usr/bin/lzip.educational-decompressor 1 + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + + ;; + + *) + echo "postinst called with unknown argument \`${1}'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/lzd.prerm b/debian/lzd.prerm new file mode 100644 index 0000000..5582754 --- /dev/null +++ b/debian/lzd.prerm @@ -0,0 +1,22 @@ +#!/bin/sh + +set -e + +case "${1}" in + remove|upgrade|deconfigure) + update-alternatives --quiet --remove lzip /usr/bin/lzip.educational-decompressor + ;; + + failed-upgrade) + + ;; + + *) + echo "prerm called with unknown argument \`${1}'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/rules b/debian/rules index 76be7af..e3c3416 100755 --- a/debian/rules +++ b/debian/rules @@ -6,6 +6,11 @@ override_dh_auto_install: dh_auto_install -- DESTDIR=$(CURDIR)/debian/lzd + # alternative handling + mv debian/lzd/usr/bin/lzd debian/lzd/usr/bin/lzip.educational-decompressor + + ln -s /usr/bin/lzip.educational-decompressor debian/lzd/usr/bin/lzd + override_dh_builddeb: dh_builddeb -- -Zxz -- cgit v1.2.3