summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 06:45:17 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 06:45:17 +0000
commit4572b4f7f422c84b4c552984dcf5927e3fa00faa (patch)
tree5a6ba3d6bd875092e9288fbc29be19ed4ecf16b8
parentAdding debian version 0.2-1. (diff)
downloadlzd-4572b4f7f422c84b4c552984dcf5927e3fa00faa.tar.xz
lzd-4572b4f7f422c84b4c552984dcf5927e3fa00faa.zip
Adding debian version 0.2-2.debian/0.2-2
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to '')
-rw-r--r--debian/changelog6
-rw-r--r--debian/control2
-rw-r--r--debian/lzd.postinst23
-rw-r--r--debian/lzd.prerm22
-rwxr-xr-xdebian/rules5
5 files changed, 58 insertions, 0 deletions
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 <mail@daniel-baumann.ch> 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