[numba] 06/09: set up alternatives for CLI script

Daniel Stender stender at moszumanska.debian.org
Sun Jul 23 14:51:26 UTC 2017


This is an automated email from the git hooks/post-receive script.

stender pushed a commit to branch master
in repository numba.

commit 7cf1d423371218be9790c6bc0e0cce488bab6305
Author: Daniel Stender <stender at debian.org>
Date:   Sun Jul 23 16:17:52 2017 +0200

    set up alternatives for CLI script
---
 debian/changelog              | 7 +++++--
 debian/python-numba.postinst  | 7 +++++++
 debian/python-numba.prerm     | 7 +++++++
 debian/python3-numba.postinst | 7 +++++++
 debian/python3-numba.prerm    | 7 +++++++
 debian/rules                  | 1 -
 6 files changed, 33 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index ee0ddd7..1a8093e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,9 +6,12 @@ numba (0.34.0-2) UNRELEASED; urgency=medium
   * deb/control:
     + bump standards version to 4.0.0 (no further changes needed).
   * use debhelper level 10 (changes in deb/compat and deb/control).
-  * drop manpage of deprecated pycc (manpages not yet distributed).
+  * drop manpage of deprecated pycc (manpages not yet distributed)
+  * set up alternatives for CLI script:
+    + add postinst and prerm maintscripts for both binaries.
+    + deb/rules: drop extra info on install-scripts about location.
 
- -- Daniel Stender <stender at debian.org>  Sun, 23 Jul 2017 16:13:24 +0200
+ -- Daniel Stender <stender at debian.org>  Sun, 23 Jul 2017 16:15:38 +0200
 
 numba (0.34.0-1) experimental; urgency=medium
 
diff --git a/debian/python-numba.postinst b/debian/python-numba.postinst
new file mode 100755
index 0000000..a6e67da
--- /dev/null
+++ b/debian/python-numba.postinst
@@ -0,0 +1,7 @@
+#!/bin/sh
+set -e
+if [ "$1" = configure ]
+then
+    update-alternatives --install /usr/bin/numba numba /usr/share/python-numba/numba 10
+fi
+#DEBHELPER#
diff --git a/debian/python-numba.prerm b/debian/python-numba.prerm
new file mode 100755
index 0000000..8faf63a
--- /dev/null
+++ b/debian/python-numba.prerm
@@ -0,0 +1,7 @@
+#!/bin/sh
+set -e
+if [ "$1" = remove ] || [ "$1" = deconfigure ]
+then
+	update-alternatives --remove numba /usr/share/python-numba/numba
+fi
+#DEBHELPER#
diff --git a/debian/python3-numba.postinst b/debian/python3-numba.postinst
new file mode 100755
index 0000000..c837c86
--- /dev/null
+++ b/debian/python3-numba.postinst
@@ -0,0 +1,7 @@
+#!/bin/sh
+set -e
+if [ "$1" = configure ]
+then
+    update-alternatives --install /usr/bin/numba numba /usr/share/python3-numba/numba 20
+fi
+#DEBHELPER#
diff --git a/debian/python3-numba.prerm b/debian/python3-numba.prerm
new file mode 100755
index 0000000..6ed3612
--- /dev/null
+++ b/debian/python3-numba.prerm
@@ -0,0 +1,7 @@
+#!/bin/sh
+set -e
+if [ "$1" = remove ] || [ "$1" = deconfigure ]
+then
+	update-alternatives --remove numba /usr/share/python3-numba/numba
+fi
+#DEBHELPER#
diff --git a/debian/rules b/debian/rules
index df3609d..c7ddd5c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,7 +3,6 @@
 #export DEB_BUILD_OPTIONS=nocheck
 export PYBUILD_NAME=numba
 
-# temporarily put scripts into /usr/share
 export PYBUILD_INSTALL_ARGS=--install-scripts=/usr/share/{package}
 
 %:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/numba.git



More information about the debian-science-commits mailing list