[SCM] tsdecrypt/master: Install alternatives to let users choose which CSA decrypting library is appropriate for them.

alessio at users.alioth.debian.org alessio at users.alioth.debian.org
Sun Apr 15 10:21:10 UTC 2012


The following commit has been merged in the master branch:
commit 245d90acfef601b13240501944ecb4959fc91313
Author: Alessio Treglia <alessio at debian.org>
Date:   Sun Apr 15 12:18:41 2012 +0200

    Install alternatives to let users choose which CSA decrypting library is appropriate for them.

diff --git a/debian/rules b/debian/rules
index bdf2082..d9399f4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,8 +17,6 @@ override_dh_auto_install:
 	$(MAKE)
 	mv tsdecrypt tsdecrypt_dvbcsa
 	# Install binaries
-	cd $(DESTDIR) && \
-		mkdir -p usr/bin && \
-		mkdir -p usr/lib/tsdecrypt/
+	cd $(DESTDIR) && mkdir -p usr/bin
 	install tsdecrypt_ffdecsa tsdecrypt_dvbcsa \
-		$(DESTDIR)/usr/lib/tsdecrypt
+		$(DESTDIR)/usr/bin
diff --git a/debian/tsdecrypt.postinst b/debian/tsdecrypt.postinst
new file mode 100644
index 0000000..7c44d09
--- /dev/null
+++ b/debian/tsdecrypt.postinst
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] ; then
+    update-alternatives --install /usr/bin/tsdecrypt \
+        tsdecrypt /usr/bin/tsdecrypt_dvbcsa 40
+    update-alternatives --install /usr/bin/tsdecrypt \
+        tsdecrypt /usr/bin/tsdecrypt_ffdecsa 20
+fi
+
+#DEBHELPER#
diff --git a/debian/tsdecrypt.prerm b/debian/tsdecrypt.prerm
new file mode 100644
index 0000000..ae4e279
--- /dev/null
+++ b/debian/tsdecrypt.prerm
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ] ; then
+    update-alternatives --remove tsdecrypt /usr/bin/tsdecrypt
+fi
+
+#DEBHELPER#

-- 
tsdecrypt packaging



More information about the pkg-multimedia-commits mailing list