[slepc] 01/04: alternatives set preferred major version (3.6) in /usr/lib/slepcdir

Drew Parsons dparsons at moszumanska.debian.org
Thu Jun 2 18:24:54 UTC 2016


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

dparsons pushed a commit to branch master
in repository slepc.

commit e63021d0e145c8da7ecc289c768a2ae3127ce652
Author: Drew Parsons <dparsons at debian.org>
Date:   Thu Jun 2 23:01:36 2016 +0800

    alternatives set preferred major version (3.6) in /usr/lib/slepcdir
    
    including real and complex versions, i.e. controlling
      /usr/lib/slepcdir/3.6
      /usr/lib/slepcdir/3.6-real
      /usr/lib/slepcdir/3.6-complex
---
 debian/changelog                         |  7 +++++++
 debian/libslepc-complex-3.6-dev.postinst | 25 +++++++++++++++++++++++++
 debian/libslepc-complex-3.6-dev.prerm    | 18 ++++++++++++++++++
 debian/libslepc-complex-3.6.3.postinst   |  4 +---
 debian/libslepc-complex-3.6.3.prerm      |  3 +--
 debian/libslepc3.6-dev.postinst          | 25 +++++++++++++++++++++++++
 debian/libslepc3.6-dev.prerm             | 18 ++++++++++++++++++
 debian/libslepc3.6.3.postinst            |  4 +---
 debian/libslepc3.6.3.prerm               |  3 +--
 debian/rules                             |  2 +-
 10 files changed, 98 insertions(+), 11 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index c299917..29179e3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+slepc (3.6.3.dfsg1-6) UNRELEASED; urgency=medium
+
+  * Use alternatives to set default versions for soname (3.6) in
+    /usr/lib/slepcdir, including real and complex versions.
+
+ -- Drew Parsons <dparsons at debian.org>  Thu, 02 Jun 2016 22:55:01 +0800
+
 slepc (3.6.3.dfsg1-5) unstable; urgency=medium
 
   * Build doc package from files installed for the standard (real)
diff --git a/debian/libslepc-complex-3.6-dev.postinst b/debian/libslepc-complex-3.6-dev.postinst
new file mode 100644
index 0000000..ce128c3
--- /dev/null
+++ b/debian/libslepc-complex-3.6-dev.postinst
@@ -0,0 +1,25 @@
+#!/bin/sh -e
+
+DEB_HOST_MULTIARCH=__DEB_HOST_MULTIARCH__
+
+SLEPC_VERSION=__SLEPC_VERSION__
+SLEPC_ARCH=${DEB_HOST_MULTIARCH}
+SLEPC_COMPLEX_ARCH=${SLEPC_ARCH}-complex
+SLEPC_VERSION_NUMBER=$( echo ${SLEPC_VERSION} | sed "s/\.//g" )
+SONAME=__SLEPC_SONAME_VERSION__
+
+SLEPC_DIR_COMPLEX=/usr/lib/slepcdir/${SLEPC_VERSION}/${SLEPC_COMPLEX_ARCH}
+
+# Make alternatives links
+if [ "$1" = "configure" ]; then
+
+# alternative slepc for this soname (e.g. real or complex)
+update-alternatives --install /usr/lib/slepcdir/${SONAME} slepc${SONAME} ${SLEPC_DIR_COMPLEX} ${SLEPC_VERSION_NUMBER}73
+
+# alternative complex slepc for this soname
+update-alternatives --install /usr/lib/slepcdir/${SONAME}-complex slepc${SONAME}-complex ${SLEPC_DIR_COMPLEX} ${SLEPC_VERSION_NUMBER}73
+
+fi
+
+
+#DEBHELPER#
diff --git a/debian/libslepc-complex-3.6-dev.prerm b/debian/libslepc-complex-3.6-dev.prerm
new file mode 100644
index 0000000..6015d32
--- /dev/null
+++ b/debian/libslepc-complex-3.6-dev.prerm
@@ -0,0 +1,18 @@
+#!/bin/sh -e
+
+DEB_HOST_MULTIARCH=__DEB_HOST_MULTIARCH__
+
+SLEPC_VERSION=__SLEPC_VERSION__
+SLEPC_ARCH=${DEB_HOST_MULTIARCH}
+SLEPC_COMPLEX_ARCH=${SLEPC_ARCH}-complex
+SONAME=__SLEPC_SONAME_VERSION__
+
+SLEPC_DIR_COMPLEX=/usr/lib/slepcdir/${SLEPC_VERSION}/${SLEPC_COMPLEX_ARCH}
+
+# Remove alternatives links
+if [ "$1" = "remove" ]; then
+  update-alternatives --remove slepc${SONAME} ${SLEPC_DIR_COMPLEX}
+  update-alternatives --remove slepc${SONAME}-complex ${SLEPC_DIR_COMPLEX}
+fi
+
+#DEBHELPER#
diff --git a/debian/libslepc-complex-3.6.3.postinst b/debian/libslepc-complex-3.6.3.postinst
index ca7219b..6d67896 100644
--- a/debian/libslepc-complex-3.6.3.postinst
+++ b/debian/libslepc-complex-3.6.3.postinst
@@ -4,9 +4,7 @@ DEB_HOST_MULTIARCH=__DEB_HOST_MULTIARCH__
 
 SLEPC_VERSION=__SLEPC_VERSION__
 SLEPC_VERSION_NUMBER=$( echo ${SLEPC_VERSION} | sed "s/\.//g" )
-
-# use only major.minor as general soname (rather than major.minor.patch.build)
-SONAME=$( echo ${SLEPC_VERSION} | awk 'BEGIN { FS="."}; {print $1"."$2 }' )
+SONAME=__SLEPC_SONAME_VERSION__
 
 # Make alternatives links
 if [ "$1" = "configure" ]; then
diff --git a/debian/libslepc-complex-3.6.3.prerm b/debian/libslepc-complex-3.6.3.prerm
index 09da466..d2b3659 100644
--- a/debian/libslepc-complex-3.6.3.prerm
+++ b/debian/libslepc-complex-3.6.3.prerm
@@ -2,8 +2,7 @@
 
 DEB_HOST_MULTIARCH=__DEB_HOST_MULTIARCH__
 SLEPC_VERSION=__SLEPC_VERSION__
-# use only major.minor as general soname (rather than major.minor.patch.build)
-SONAME=$( echo ${SLEPC_VERSION} | awk 'BEGIN { FS="."}; {print $1"."$2 }' )
+SONAME=__SLEPC_SONAME_VERSION__
 
 # Remove alternatives links
 if [ "$1" = "remove" ]; then
diff --git a/debian/libslepc3.6-dev.postinst b/debian/libslepc3.6-dev.postinst
new file mode 100644
index 0000000..ec3dfd6
--- /dev/null
+++ b/debian/libslepc3.6-dev.postinst
@@ -0,0 +1,25 @@
+#!/bin/sh -e
+
+DEB_HOST_MULTIARCH=__DEB_HOST_MULTIARCH__
+
+SLEPC_VERSION=__SLEPC_VERSION__
+SLEPC_ARCH=${DEB_HOST_MULTIARCH}
+SLEPC_REAL_ARCH=${SLEPC_ARCH}-real
+SLEPC_VERSION_NUMBER=$( echo ${SLEPC_VERSION} | sed "s/\.//g" )
+SONAME=__SLEPC_SONAME_VERSION__
+
+SLEPC_DIR_REAL=/usr/lib/slepcdir/${SLEPC_VERSION}/${SLEPC_REAL_ARCH}
+
+# Make alternatives links
+if [ "$1" = "configure" ]; then
+
+# alternative slepc for this soname (e.g. real or complex)
+update-alternatives --install /usr/lib/slepcdir/${SONAME} slepc${SONAME} ${SLEPC_DIR_REAL} ${SLEPC_VERSION_NUMBER}77
+
+# alternative real slepc for this soname
+update-alternatives --install /usr/lib/slepcdir/${SONAME}-real slepc${SONAME}-real ${SLEPC_DIR_REAL} ${SLEPC_VERSION_NUMBER}77
+
+fi
+
+
+#DEBHELPER#
diff --git a/debian/libslepc3.6-dev.prerm b/debian/libslepc3.6-dev.prerm
new file mode 100644
index 0000000..11ca610
--- /dev/null
+++ b/debian/libslepc3.6-dev.prerm
@@ -0,0 +1,18 @@
+#!/bin/sh -e
+
+DEB_HOST_MULTIARCH=__DEB_HOST_MULTIARCH__
+
+SLEPC_VERSION=__SLEPC_VERSION__
+SLEPC_ARCH=${DEB_HOST_MULTIARCH}
+SLEPC_REAL_ARCH=${SLEPC_ARCH}-real
+SONAME=__SLEPC_SONAME_VERSION__
+
+SLEPC_DIR_REAL=/usr/lib/slepcdir/${SLEPC_VERSION}/${SLEPC_REAL_ARCH}
+
+# Remove alternatives links
+if [ "$1" = "remove" ]; then
+  update-alternatives --remove slepc${SONAME} ${SLEPC_DIR_REAL}
+  update-alternatives --remove slepc${SONAME}-real ${SLEPC_DIR_REAL}
+fi
+
+#DEBHELPER#
diff --git a/debian/libslepc3.6.3.postinst b/debian/libslepc3.6.3.postinst
index fb01ff8..c998e20 100644
--- a/debian/libslepc3.6.3.postinst
+++ b/debian/libslepc3.6.3.postinst
@@ -4,9 +4,7 @@ DEB_HOST_MULTIARCH=__DEB_HOST_MULTIARCH__
 
 SLEPC_VERSION=__SLEPC_VERSION__
 SLEPC_VERSION_NUMBER=$( echo ${SLEPC_VERSION} | sed "s/\.//g" )
-
-# use only major.minor as general soname (rather than major.minor.patch.build)
-SONAME=$( echo ${SLEPC_VERSION} | awk 'BEGIN { FS="."}; {print $1"."$2 }' )
+SONAME=__SLEPC_SONAME_VERSION__
 
 # Make alternatives links
 if [ "$1" = "configure" ]; then
diff --git a/debian/libslepc3.6.3.prerm b/debian/libslepc3.6.3.prerm
index 969ee50..589eca7 100644
--- a/debian/libslepc3.6.3.prerm
+++ b/debian/libslepc3.6.3.prerm
@@ -2,8 +2,7 @@
 
 DEB_HOST_MULTIARCH=__DEB_HOST_MULTIARCH__
 SLEPC_VERSION=__SLEPC_VERSION__
-# use only major.minor as general soname (rather than major.minor.patch.build)
-SONAME=$( echo ${SLEPC_VERSION} | awk 'BEGIN { FS="."}; {print $1"."$2 }' )
+SONAME=__SLEPC_SONAME_VERSION__
 
 # Remove alternatives links
 if [ "$1" = "remove" ]; then
diff --git a/debian/rules b/debian/rules
index a94e559..bb24a44 100755
--- a/debian/rules
+++ b/debian/rules
@@ -184,7 +184,7 @@ override_dh_python2:
 override_dh_installdeb:
 	dh_installdeb
 	for pkg in $$(dh_listpackages -a); do \
-	  sed -i -e 's/__SLEPC_VERSION__/$(SLEPC_VERSION)/; s/__DEB_HOST_MULTIARCH__/$(DEB_HOST_MULTIARCH)/' debian/$$pkg/DEBIAN/*; \
+	  sed -i -e 's/__SLEPC_SONAME_VERSION__/$(SLEPC_SONAME_VERSION)/; s/__SLEPC_VERSION__/$(SLEPC_VERSION)/; s/__DEB_HOST_MULTIARCH__/$(DEB_HOST_MULTIARCH)/' debian/$$pkg/DEBIAN/*; \
 	done
 
 

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



More information about the debian-science-commits mailing list