Hi,
Mohammed Adnène Trojette wrote:
> I am working on new lzma packages[1].
Thanks, that's great news, and it seems to be in nice shape.
Nitpicks:
- debian/copyright says:
Copyright (c) The Regents of the University of California.
All rights reserved.
:)
- debian/rules says:
# Sample debian/rules that uses debhelper.
Here's a rough patch to start using alternatives. To apply, run
"mv debian/lzma.1 debian/lzma-lzma.1" first. No Pre-Depends needed.
---
debian/changelog | 6 ++
debian/compat | 2 +-
debian/control | 1 +
debian/lzma-lzma.1 | 187 ++++++++++++++++++++++++++++++++++++++++++++++++++
debian/lzma.1 | 187 --------------------------------------------------
debian/lzma.install | 2 +-
debian/lzma.links | 8 +-
debian/lzma.manpages | 2 +-
debian/lzma.postinst | 13 ++++
debian/lzma.prerm | 10 +++
debian/rules | 4 +
11 files changed, 228 insertions(+), 194 deletions(-)
create mode 100644 debian/lzma-lzma.1
delete mode 100644 debian/lzma.1
create mode 100644 debian/lzma.postinst
create mode 100644 debian/lzma.prerm
diff --git a/debian/changelog b/debian/changelog
index 5c6e0567..9989b46d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
lzma (9.22-1) experimental; urgency=low
+ [ Mohammed Adnène Trojette ]
* New upstream release (Closes: #460501, #518365)
+ LZMA SDK is placed in the public domain since 4.62.
* Update debian/patches/02_lzmp.diff.
@@ -17,6 +18,11 @@ lzma (9.22-1) experimental; urgency=low
* Add deb-lzma script to convert a deb package to LZMA format. Script
courtesy of Roger Millan. (Closes: #536275)
+ [ Jonathan Nieder ]
+ * Bump debhelper compatibility to 7.
+ * Manage lzma, unlzma, and lzcat through the alternatives system.
+ Conflicts: xz-lzma (<< 5.1.1alpha+20110809-3). (Closes: #547802)
+
-- Mohammed Adnène Trojette <[email protected]> Fri, 26 Aug 2011 19:18:41
+0200
lzma (4.43-14) unstable; urgency=low
diff --git a/debian/compat b/debian/compat
index 7ed6ff82..7f8f011e 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-5
+7
diff --git a/debian/control b/debian/control
index 8ba09351..54874a60 100644
--- a/debian/control
+++ b/debian/control
@@ -12,6 +12,7 @@ Standards-Version: 3.9.2
Package: lzma
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
+Conflicts: xz-lzma (<< 5.1.1alpha+20110809-3)
Description: Compression and decompression in the LZMA format - command line
utility
The Lempel-Ziv Markov-chain Algorithm is a compression method based on
the famous LZ77 algorithm, and was first introduced by 7-Zip for use in
diff --git a/debian/lzma.install b/debian/lzma.install
index 369c901f..d94c3c44 100644
--- a/debian/lzma.install
+++ b/debian/lzma.install
@@ -1 +1 @@
-CPP/7zip/Bundles/LzmaCon/lzma usr/bin
+usr/bin/lzma-lzma
diff --git a/debian/lzma.links b/debian/lzma.links
index 4327da69..a4d6613f 100644
--- a/debian/lzma.links
+++ b/debian/lzma.links
@@ -1,4 +1,4 @@
-usr/bin/lzma usr/bin/unlzma
-usr/bin/lzma usr/bin/lzcat
-usr/share/man/man1/lzma.1.gz usr/share/man/man1/unlzma.1.gz
-usr/share/man/man1/lzma.1.gz usr/share/man/man1/lzcat.1.gz
+usr/bin/lzma-lzma usr/bin/lzma-unlzma
+usr/bin/lzma-lzma usr/bin/lzma-lzcat
+usr/share/man/man1/lzma-lzma.1.gz usr/share/man/man1/lzma-unlzma.1.gz
+usr/share/man/man1/lzma-lzma.1.gz usr/share/man/man1/lzma-lzcat.1.gz
diff --git a/debian/lzma.manpages b/debian/lzma.manpages
index 8325c71c..fed4d292 100644
--- a/debian/lzma.manpages
+++ b/debian/lzma.manpages
@@ -1 +1 @@
-debian/lzma.1
+debian/lzma-lzma.1
diff --git a/debian/lzma.postinst b/debian/lzma.postinst
new file mode 100644
index 00000000..db9a3692
--- /dev/null
+++ b/debian/lzma.postinst
@@ -0,0 +1,13 @@
+#!/bin/sh
+set -e
+update-alternatives \
+ --install /usr/bin/lzma lzma /usr/bin/lzma-lzma 30 \
+ --slave /usr/bin/unlzma unlzma /usr/bin/lzma-unlzma \
+ --slave /usr/bin/lzcat lzcat /usr/bin/lzma-lzcat \
+ --slave /usr/share/man/man1/lzma.1.gz lzma.1.gz \
+ /usr/share/man/man1/lzma-lzma.1.gz \
+ --slave /usr/share/man/man1/unlzma.1.gz unlzma.1.gz \
+ /usr/share/man/man1/lzma-unlzma.1.gz \
+ --slave /usr/share/man/man1/lzcat.1.gz lzcat.1.gz \
+ /usr/share/man/man1/lzma-lzcat.1.gz
+#DEBHELPER#
diff --git a/debian/lzma.prerm b/debian/lzma.prerm
new file mode 100644
index 00000000..dfbb88a6
--- /dev/null
+++ b/debian/lzma.prerm
@@ -0,0 +1,10 @@
+#!/bin/sh
+set -e
+if
+ test "$1" != upgrade ||
+ # downgrading to a pre-alternatives version
+ dpkg --compare-versions "$2" lt-nl 9.22-1
+then
+ update-alternatives --remove lzma /usr/bin/lzma-lzma
+fi
+#DEBHELPER#
diff --git a/debian/rules b/debian/rules
index 96b2c004..8cf1bf00 100755
--- a/debian/rules
+++ b/debian/rules
@@ -23,6 +23,10 @@ override_dh_auto_build:
$(MAKE) all -C $(SRC_DIR_C) -f makefile.gcc
$(MAKE) all -C $(SRC_DIR_CPP) -f makefile.gcc
+override_dh_auto_install:
+ install -d debian/tmp/usr/bin
+ install -m 755 $(SRC_DIR_CPP)/lzma debian/tmp/usr/bin/lzma-lzma
+
override_dh_auto_clean:
$(MAKE) clean -C $(SRC_DIR_C) -f makefile.gcc
$(MAKE) clean -C $(SRC_DIR_CPP) -f makefile.gcc
--
1.7.6
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]