[petsc] 01/05: adjust real/complex alternatives
Drew Parsons
dparsons at moszumanska.debian.org
Thu Oct 8 02:44:43 UTC 2015
This is an automated email from the git hooks/post-receive script.
dparsons pushed a commit to branch master
in repository petsc.
commit 7e8b9e8a6d83d013730b3c8f5529b70809c03e04
Author: Drew Parsons <dparsons at debian.org>
Date: Mon Oct 5 15:26:45 2015 +0800
adjust real/complex alternatives
Use petsc as the master name for the alternative links for the dev
packages libpetsc*3.6.2-dev
and libpetsc.so.3.6 for the library packages libpetsc*3.6
It's not convenient to streamline the alternative entries into
"petsc-*" entries, e.g. petsc-include rather than petscinclude,
since petsc 3.4 already claims the links (/usr/include/petsc is
already controlled by petscinclude). It's simpler to keep using
petscinclude than to rearrange the links in petsc 3.4.
---
debian/README.Debian | 20 +++++++++++++++-----
debian/libpetsc-complex-3.6.2-dev.postinst | 6 +++---
debian/libpetsc-complex-3.6.postinst | 3 ++-
debian/libpetsc3.6.2-dev.postinst | 6 +++---
debian/libpetsc3.6.postinst | 3 ++-
5 files changed, 25 insertions(+), 13 deletions(-)
diff --git a/debian/README.Debian b/debian/README.Debian
index 25713b3..fb9e684 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -11,6 +11,10 @@ various alternatives links; debugging libraries are in libpetsc3.6.2-dbg;
extensive documentation and source code from "tests" and "tutorials"
directories are in petsc3.6.2-doc.
+Standard packages are configured for real numbers. Complex numbers are
+configured in the libpetsc*complex* packages. The preferred default
+configuration may be set using alternatives (petsc and libpetsc.so.3.6).
+
The preferred PETSc installation is located at /usr/lib/petsc. This is a symlink
to the actual installation, managed by Debian alternatives (see below). The
standard installation is located at
@@ -101,6 +105,11 @@ There are several ways to customize this package:
architecture-dependent packages with different package names, directory
names, and shared library sonames.
+Note that individual users can build against non-default installed versions of
+PETSc simply by setting the PETSC_DIR environment variable to the target
+directory instead of /usr/lib/petsc, for example to build against the lam
+version a user might set PETSC_DIR=/usr/lib/petscdir/3.6.2/x86_64-linux-gnu-lam-real .
+
NOTE ON SYMBOLIC LINKS THROUGH /etc/alternatives
Because it is possible and often desirable to have multiple versions of PETSc
@@ -120,12 +129,13 @@ links if you have multiple versions of PETSc installed. The command:
(as root) will present you with a list of possible values to choose from, if
there is more than one.
+When setting your preference for /usr/lib/petsc via "update-alternatives --config petsc",
+it is important for consistency to also update your preference for the
+main shared library files provided by libpetsc3.6 or libpetsc-complex-3.6.
+These alternative links are controlled by libpetsc.so.3.6:
+ update-alternatives --config libpetsc.so.3.6
+
To maintain the consistency of the master and slave symlinks, it is very
important that you use the Debian update-alternatives command, and do NOT
hand-edit the symbolic links yourself.
-Note that individual users can build against non-default installed versions of
-PETSc simply by setting the PETSC_DIR environment variable to the target
-directory instead of /usr/lib/petsc, for example to build against the lam
-version a user might set PETSC_DIR=/usr/lib/petscdir/3.6.2-lam .
-
diff --git a/debian/libpetsc-complex-3.6.2-dev.postinst b/debian/libpetsc-complex-3.6.2-dev.postinst
index f92433e..facb950 100644
--- a/debian/libpetsc-complex-3.6.2-dev.postinst
+++ b/debian/libpetsc-complex-3.6.2-dev.postinst
@@ -9,9 +9,9 @@ PETSC_COMPLEX_ARCH=${PETSC_ARCH}-complex
# Make alternatives links
if [ "$1" = "configure" ]; then
update-alternatives --install /usr/lib/petsc petsc /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_COMPLEX_ARCH} 3620 \
- --slave /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc.so petsc-libpetsc.so /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc-complex.so.${PETSC_VERSION} \
- --slave /usr/include/petsc petsc-include /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_COMPLEX_ARCH}/include \
- --slave /usr/lib/pkgconfig/PETSc.pc petsc-PETSc.pc /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_COMPLEX_ARCH}/lib/pkgconfig/PETSc.pc \
+ --slave /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc.so libpetsc.so /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc-complex.so.${PETSC_VERSION} \
+ --slave /usr/include/petsc petscinclude /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_COMPLEX_ARCH}/include \
+ --slave /usr/lib/pkgconfig/PETSc.pc PETSc.pc /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_COMPLEX_ARCH}/lib/pkgconfig/PETSc.pc \
--slave /usr/share/octave/site/m/petsc petsc-octave /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_COMPLEX_ARCH}/share/petsc/matlab
fi
diff --git a/debian/libpetsc-complex-3.6.postinst b/debian/libpetsc-complex-3.6.postinst
index 8c9112c..1f08231 100644
--- a/debian/libpetsc-complex-3.6.postinst
+++ b/debian/libpetsc-complex-3.6.postinst
@@ -9,7 +9,8 @@ SONAME=$( echo ${PETSC_VERSION} | awk 'BEGIN { FS="."}; {print $1"."$2 }' )
# Make alternatives links
if [ "$1" = "configure" ]; then
- update-alternatives --install /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc.so.${SONAME} petsc-libpetsc.soname /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc-complex.so.${PETSC_VERSION} 3620
+ update-alternatives --install /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc.so.${SONAME} libpetsc.so.${SONAME} /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc-complex.so.${PETSC_VERSION} 3620 \
+ --slave /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc.so.${PETSC_VERSION} libpetsc.so.${PETSC_VERSION} /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc-complex.so.${PETSC_VERSION}
fi
diff --git a/debian/libpetsc3.6.2-dev.postinst b/debian/libpetsc3.6.2-dev.postinst
index fcde748..189f303 100644
--- a/debian/libpetsc3.6.2-dev.postinst
+++ b/debian/libpetsc3.6.2-dev.postinst
@@ -9,9 +9,9 @@ PETSC_REAL_ARCH=${PETSC_ARCH}-real
# Make alternatives links
if [ "$1" = "configure" ]; then
update-alternatives --install /usr/lib/petsc petsc /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_REAL_ARCH} 3622 \
- --slave /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc.so petsc-libpetsc.so /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc-real.so.${PETSC_VERSION} \
- --slave /usr/include/petsc petsc-include /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_REAL_ARCH}/include \
- --slave /usr/lib/pkgconfig/PETSc.pc petsc-PETSc.pc /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_REAL_ARCH}/lib/pkgconfig/PETSc.pc \
+ --slave /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc.so libpetsc.so /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc-real.so.${PETSC_VERSION} \
+ --slave /usr/include/petsc petscinclude /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_REAL_ARCH}/include \
+ --slave /usr/lib/pkgconfig/PETSc.pc PETSc.pc /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_REAL_ARCH}/lib/pkgconfig/PETSc.pc \
--slave /usr/share/octave/site/m/petsc petsc-octave /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_REAL_ARCH}/share/petsc/matlab
fi
diff --git a/debian/libpetsc3.6.postinst b/debian/libpetsc3.6.postinst
index 29c0dd9..c56d239 100644
--- a/debian/libpetsc3.6.postinst
+++ b/debian/libpetsc3.6.postinst
@@ -9,7 +9,8 @@ SONAME=$( echo ${PETSC_VERSION} | awk 'BEGIN { FS="."}; {print $1"."$2 }' )
# Make alternatives links
if [ "$1" = "configure" ]; then
- update-alternatives --install /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc.so.${SONAME} petsc-libpetsc.soname /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc-real.so.${PETSC_VERSION} 3622
+ update-alternatives --install /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc.so.${SONAME} libpetsc.so.${SONAME} /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc-real.so.${PETSC_VERSION} 3622 \
+ --slave /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc.so.${PETSC_VERSION} libpetsc.so.${PETSC_VERSION} /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc-real.so.${PETSC_VERSION}
fi
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/petsc.git
More information about the debian-science-commits
mailing list