[Python-modules-commits] [websocket-client] 08/09: Using update-alternatives to manage /usr/bin/wsdump.
Thomas Goirand
zigo at moszumanska.debian.org
Tue Jul 12 09:33:43 UTC 2016
This is an automated email from the git hooks/post-receive script.
zigo pushed a commit to branch master
in repository websocket-client.
commit d105d848797984991c15cd99548dd05a3ebf061c
Author: Thomas Goirand <zigo at debian.org>
Date: Tue Jul 12 10:16:46 2016 +0200
Using update-alternatives to manage /usr/bin/wsdump.
---
debian/changelog | 1 +
debian/python-websocket.postinst | 11 +++++++++++
debian/python-websocket.postrm | 11 +++++++++++
debian/python-websocket.prerm | 11 +++++++++++
debian/python3-websocket.postinst | 11 +++++++++++
debian/python3-websocket.postrm | 11 +++++++++++
debian/python3-websocket.prerm | 11 +++++++++++
debian/rules | 4 ++--
8 files changed, 69 insertions(+), 2 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index cd50ead..0fb3a69 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,7 @@ websocket-client (0.37.0-1) unstable; urgency=medium
* Removed useless X-Python{3,}-Version headers.
* Standards-Version is now 3.9.8 (no change).
* Fixed duplicate short desc.
+ * Using update-alternatives to manage /usr/bin/wsdump.
-- Thomas Goirand <zigo at debian.org> Mon, 11 Jul 2016 22:54:11 +0200
diff --git a/debian/python-websocket.postinst b/debian/python-websocket.postinst
new file mode 100644
index 0000000..4e9bd8d
--- /dev/null
+++ b/debian/python-websocket.postinst
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "configure" ] ; then
+ update-alternatives --install /usr/bin/wsdump wsdump /usr/bin/python2-wsdump 300
+fi
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/python-websocket.postrm b/debian/python-websocket.postrm
new file mode 100644
index 0000000..a9d06de
--- /dev/null
+++ b/debian/python-websocket.postrm
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "remove" ] || [ "$1" = "disappear" ] ; then
+ update-alternatives --remove wsdump /usr/bin/python2-wsdump
+fi
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/python-websocket.prerm b/debian/python-websocket.prerm
new file mode 100644
index 0000000..2f727d7
--- /dev/null
+++ b/debian/python-websocket.prerm
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "remove" ] ; then
+ update-alternatives --remove wsdump /usr/bin/python2-wsdump
+fi
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/python3-websocket.postinst b/debian/python3-websocket.postinst
new file mode 100644
index 0000000..4c37b4a
--- /dev/null
+++ b/debian/python3-websocket.postinst
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "configure" ] ; then
+ update-alternatives --install /usr/bin/wsdump wsdump /usr/bin/python3-wsdump 200
+fi
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/python3-websocket.postrm b/debian/python3-websocket.postrm
new file mode 100644
index 0000000..a5079d4
--- /dev/null
+++ b/debian/python3-websocket.postrm
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "remove" ] || [ "$1" = "disappear" ] ; then
+ update-alternatives --remove wsdump /usr/bin/python3-wsdump
+fi
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/python3-websocket.prerm b/debian/python3-websocket.prerm
new file mode 100644
index 0000000..fb8c0dc
--- /dev/null
+++ b/debian/python3-websocket.prerm
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "remove" ] ; then
+ update-alternatives --remove wsdump /usr/bin/python3-wsdump
+fi
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/rules b/debian/rules
index a55cd70..d1f85e3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,6 +6,6 @@ export PYBUILD_NAME=websocket
dh $@ --with python2,python3 --buildsystem=pybuild
override_dh_install:
- mv $(CURDIR)/debian/python-websocket/usr/bin/wsdump.py $(CURDIR)/debian/python-websocket/usr/bin/wsdump
- mv $(CURDIR)/debian/python3-websocket/usr/bin/wsdump.py $(CURDIR)/debian/python3-websocket/usr/bin/wsdump3
+ mv $(CURDIR)/debian/python-websocket/usr/bin/wsdump.py $(CURDIR)/debian/python-websocket/usr/bin/python2-wsdump
+ mv $(CURDIR)/debian/python3-websocket/usr/bin/wsdump.py $(CURDIR)/debian/python3-websocket/usr/bin/python3-wsdump
dh_install
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/websocket-client.git
More information about the Python-modules-commits
mailing list