[petsc] 03/03: add debug package with complex number support

Drew Parsons dparsons at moszumanska.debian.org
Thu Oct 8 18:53:22 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 6ebc9a0f75bfe60a1cf15ffc1b6428c312a800e4
Author: Drew Parsons <dparsons at debian.org>
Date:   Fri Oct 9 02:52:09 2015 +0800

    add debug package with complex number support
---
 debian/README.Debian                       |  9 +++++++-
 debian/changelog                           |  9 ++++++--
 debian/control                             | 31 +++++++++++++++++++++----
 debian/libpetsc-complex-3.6.2-dbg.postinst | 20 +++++++++++++++++
 debian/libpetsc-complex-3.6.2-dbg.prerm    | 14 ++++++++++++
 debian/rules                               | 36 +++++++++++++++++++++++++++---
 6 files changed, 109 insertions(+), 10 deletions(-)

diff --git a/debian/README.Debian b/debian/README.Debian
index fb9e684..0a4111c 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -12,7 +12,7 @@ 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 
+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
@@ -22,6 +22,9 @@ standard installation is located at
 e.g.
   /usr/lib/petscdir/3.6.2/x86_64-linux-gnu
 
+libpetsc.so is also controlled by alternatives (libpetsc.so.3.6)
+
+
 With libpetsc3.6.2-dev installed, you can build programs against it two ways:
 
      1. Standard build convention: use -I/usr/include/petsc for headers and
@@ -105,6 +108,10 @@ There are several ways to customize this package:
    architecture-dependent packages with different package names, directory
    names, and shared library sonames.
 
+If needed, you can change the soname of your custom library by using the configure
+flag --shared-library-extension=<ext>, which changes the library and soname to
+libpetsc<ext>.so
+
 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
diff --git a/debian/changelog b/debian/changelog
index e910285..3bbf22d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,8 +14,13 @@ petsc (3.6.2.dfsg1-1) UNRELEASED; urgency=medium
   * PETSc matlab scripts are linked to /usr/share/octave/site/m/petsc.
     Closes: #736662.
   * Add superlu support.  Closes: #671062.
-  * Provide new packages libpetsc-complex-3.6.2-dev and libpetsc-complex-3.6
-    with support for complex numbers. Closes: #730317.
+  * Provide new packages libpetsc-complex-3.6.2-dev, libpetsc-complex-3.6
+    and libpetsc-complex-3.6.2-dbg with support for complex numbers. 
+    Closes: #730317.
+  * The library and soname are modified for complex support,
+    libpetsc_complex.so.  The standard build with real numbers has a
+    modified soname to match, libpetc_real.so.  The preference for
+    libpetsc.so is controlled by alternatives.
 
  -- Drew Parsons <dparsons at debian.org>  Thu, 24 Sep 2015 11:55:47 +0800
 
diff --git a/debian/control b/debian/control
index 73b754a..766cb3f 100644
--- a/debian/control
+++ b/debian/control
@@ -28,7 +28,7 @@ Depends: libpetsc3.6 (= ${binary:Version}), mpi-default-dev (>= 1.0.2), libsuite
 Recommends: libhdf5-mpi-dev (>= 1.8.8), libssl-dev,
  tcsh | csh | c-shell, ksh | mksh | pdksh | zsh
 Suggests: petsc-dev (= ${binary:Version}), libpetsc3.6.2-dbg (= ${binary:Version}), petsc3.6.2-doc (= ${binary:Version}), libluminate-dev
-Provides: petsc3.6.2-dev
+Provides: petsc3.6-dev
 Description: Static libraries, shared links, header files for PETSc
  PETSc is the "Portable Extensible Toolkit for Scientific Computation", a suite
  of data structures and routines for the scalable (parallel) solution of
@@ -80,8 +80,8 @@ Pre-Depends: ${misc:Pre-Depends}
 Depends: libpetsc3.6.2-dev (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends},
  ${python:Depends}
 Recommends: tcsh | csh | c-shell, ksh | mksh | pdksh | zsh
-Provides: petsc3.6.2-dbg
-Description: Static debugging libraries for PETSc
+Provides: petsc3.6-dbg
+Description: Debugging libraries for PETSc
  PETSc is the "Portable Extensible Toolkit for Scientific Computation", a suite
  of data structures and routines for the scalable (parallel) solution of
  scientific applications modeled by partial differential equations.  It employs
@@ -120,7 +120,7 @@ Depends: libpetsc-complex-3.6 (= ${binary:Version}), mpi-default-dev (>= 1.0.2),
 Recommends: libhdf5-mpi-dev (>= 1.8.8), libssl-dev,
  tcsh | csh | c-shell, ksh | mksh | pdksh | zsh
 Suggests: petsc-dev (= ${binary:Version}), libpetsc3.6.2-dbg (= ${binary:Version}), petsc3.6.2-doc (= ${binary:Version}), libluminate-dev
-Provides: petsc-complex-3.6.2-dev
+Provides: petsc-complex-3.6-dev
 Description: Static libraries, shared links, header files for PETSc
  PETSc is the "Portable Extensible Toolkit for Scientific Computation", a suite
  of data structures and routines for the scalable (parallel) solution of
@@ -151,3 +151,26 @@ Description: Shared libraries for version 3.6 of PETSc with Complex Numbers
  This package contains the latest PETSc 3.6 shared library 
  and supports complex numbers.
 
+Package: libpetsc-complex-3.6.2-dbg
+Architecture: linux-any hurd-any
+Multi-Arch: same
+Section: debug
+Pre-Depends: ${misc:Pre-Depends}
+Depends: libpetsc-complex-3.6.2-dev (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends},
+ ${python:Depends}
+Recommends: tcsh | csh | c-shell, ksh | mksh | pdksh | zsh
+Provides: petsc-complex-3.6-dbg
+Description: Debugging libraries for PETSc
+ PETSc is the "Portable Extensible Toolkit for Scientific Computation", a suite
+ of data structures and routines for the scalable (parallel) solution of
+ scientific applications modeled by partial differential equations.  It employs
+ the MPI standard for all message-passing communication.  Several sample
+ scientific applications, as well as various papers and talks, demonstrate the
+ features of the PETSc libraries.
+ .
+ This package provides the development files and debugging libraries for
+ debugging applications using PETSc 3.6.2 with complex number support.
+ .
+ Libraries include unstripped symbols, but this package is also built with 
+ internal PETSc debugging activated.
+
diff --git a/debian/libpetsc-complex-3.6.2-dbg.postinst b/debian/libpetsc-complex-3.6.2-dbg.postinst
new file mode 100644
index 0000000..8ac2d42
--- /dev/null
+++ b/debian/libpetsc-complex-3.6.2-dbg.postinst
@@ -0,0 +1,20 @@
+#!/bin/sh -e
+
+DEB_HOST_MULTIARCH=__DEB_HOST_MULTIARCH__
+
+PETSC_VERSION=__PETSC_VERSION__
+PETSC_ARCH=${DEB_HOST_MULTIARCH}
+PETSC_DEBUG_ARCH=${PETSC_ARCH}-complex-debug
+
+# Make alternatives links
+if [ "$1" = "configure" ]; then
+update-alternatives --install /usr/lib/petsc petsc /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_DEBUG_ARCH} 36200 \
+  --slave /usr/lib/libpetsc.so libpetsc.so /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_DEBUG_ARCH}/lib/libpetsc_complex.so.${PETSC_VERSION} \
+  --slave /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc.so libpetsc.so.multiarch /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_DEBUG_ARCH}/lib/libpetsc_complex.so.${PETSC_VERSION} \
+  --slave /usr/include/petsc petscinclude /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_DEBUG_ARCH}/include \
+  --slave /usr/lib/pkgconfig/PETSc.pc PETSc.pc /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_DEBUG_ARCH}/lib/pkgconfig/PETSc.pc \
+  --slave /usr/share/octave/site/m/petsc petsc-octave /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_DEBUG_ARCH}/share/petsc/matlab
+fi
+
+
+#DEBHELPER#
diff --git a/debian/libpetsc-complex-3.6.2-dbg.prerm b/debian/libpetsc-complex-3.6.2-dbg.prerm
new file mode 100644
index 0000000..5cbceef
--- /dev/null
+++ b/debian/libpetsc-complex-3.6.2-dbg.prerm
@@ -0,0 +1,14 @@
+#!/bin/sh -e
+
+DEB_HOST_MULTIARCH=__DEB_HOST_MULTIARCH__
+
+PETSC_VERSION=__PETSC_VERSION__
+PETSC_ARCH=${DEB_HOST_MULTIARCH}
+PETSC_DEBUG_ARCH=${PETSC_ARCH}-complex-debug
+
+# Remove alternatives links
+if [ "$1" = "remove" ]; then
+  update-alternatives --remove petsc /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_DEBUG_ARCH}
+fi
+
+#DEBHELPER#
diff --git a/debian/rules b/debian/rules
index f2d30fc..73b2664 100755
--- a/debian/rules
+++ b/debian/rules
@@ -42,6 +42,7 @@ PETSC_HDF5_FLAGS=$(shell if [ -e /usr/lib/libhdf5.so ]; then echo "--with-hdf5=1
 PETSC_BUILD_DIR=$(PETSC_ARCH)-real
 PETSC_DEBUG_BUILD_DIR=$(PETSC_ARCH)-debug
 PETSC_COMPLEX_BUILD_DIR=$(PETSC_ARCH)-complex
+PETSC_COMPLEX_DEBUG_BUILD_DIR=$(PETSC_ARCH)-complex-debug
 
 # PETSC_VERSION is used for the package names, library sonames, and
 # /usr/lib/petscdir subdirectory names.
@@ -63,12 +64,14 @@ PETSC_DEBUG_PACKAGE=lib$(PETSC_NAME)-dbg
 PETSC_DOC_PACKAGE=$(PETSC_NAME)-doc
 PETSC_COMPLEX_VERSIONED_DEV_PACKAGE=lib$(PETSC_COMPLEX_NAME)-dev
 PETSC_COMPLEX_VERSIONED_PACKAGE=lib$(PETSC_COMPLEX_SONAME)
+PETSC_COMPLEX_DEBUG_PACKAGE=lib$(PETSC_COMPLEX_NAME)-dbg
 
 # install into /usr/lib/petscdir rather than /usr/lib/petsc 
 # to allow /usr/lib/petsc to be configured by alternatives
 PETSC_DIR_PREFIX=/usr/lib/petscdir/$(PETSC_VERSION)/$(PETSC_ARCH)-real
 PETSC_DIR_DEBUG_PREFIX=/usr/lib/petscdir/$(PETSC_VERSION)/$(PETSC_ARCH)-debug
 PETSC_COMPLEX_DIR_PREFIX=/usr/lib/petscdir/$(PETSC_VERSION)/$(PETSC_ARCH)-complex
+PETSC_COMPLEX_DEBUG_DIR_PREFIX=/usr/lib/petscdir/$(PETSC_VERSION)/$(PETSC_ARCH)-complex-debug
 
 PACKAGE_INSTALL_BASEDIR=debian/tmp/$(PETSC_NAME)-real
 PACKAGE_INSTALL_DIR=$(PACKAGE_INSTALL_BASEDIR)/$(PETSC_DIR_PREFIX)
@@ -76,6 +79,8 @@ PACKAGE_DEBUG_INSTALL_BASEDIR=debian/tmp/$(PETSC_NAME)-debug
 PACKAGE_DEBUG_INSTALL_DIR=$(PACKAGE_DEBUG_INSTALL_BASEDIR)/$(PETSC_DIR_DEBUG_PREFIX)
 PACKAGE_COMPLEX_INSTALL_BASEDIR=debian/tmp/$(PETSC_NAME)-complex
 PACKAGE_COMPLEX_INSTALL_DIR=$(PACKAGE_COMPLEX_INSTALL_BASEDIR)/$(PETSC_COMPLEX_DIR_PREFIX)
+PACKAGE_COMPLEX_DEBUG_INSTALL_BASEDIR=debian/tmp/$(PETSC_NAME)-comple-debug
+PACKAGE_COMPLEX_DEBUG_INSTALL_DIR=$(PACKAGE_COMPLEX_INSTALL_BASEDIR)/$(PETSC_COMPLEX_DEBUG_DIR_PREFIX)
 
 CONFIGURATION_OPTIONS=--with-shared-libraries \
 	  --useThreads 0 \
@@ -111,12 +116,16 @@ override_dh_auto_clean:
 	dh_auto_clean -p$(PETSC_COMPLEX_VERSIONED_DEV_PACKAGE) -- \
 	  PETSC_DIR=$(CURDIR) PETSC_ARCH=$(PETSC_COMPLEX_BUILD_DIR); \
 	fi
+	if [ -d $(PETSC_COMPLEX_DEBUG_BUILD_DIR) ]; then \
+	dh_auto_clean -p$(PETSC_COMPLEX_DEBUG_PACKAGE) -- \
+	  PETSC_DIR=$(CURDIR) PETSC_ARCH=$(PETSC_COMPLEX_DEBUG_BUILD_DIR); \
+	fi
 
 
 override_dh_auto_configure:
 	dh_auto_configure -p$(PETSC_DEBUG_PACKAGE) --  \
           --with-debugging=1  \
-	  --shared-library-extension=_real \
+          --shared-library-extension=_real \
           --with-hypre=1 --with-hypre-dir=/usr --with-clanguage=C++ --with-c-support \
           $(CONFIGURATION_OPTIONS)  \
           --prefix=$(PETSC_DIR_DEBUG_PREFIX)  \
@@ -126,7 +135,7 @@ override_dh_auto_configure:
             CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" MAKEFLAGS="$(MAKEFLAGS)"
 	dh_auto_configure -p$(PETSC_VERSIONED_DEV_PACKAGE) --  \
           --with-debugging=0  \
-	  --shared-library-extension=_real \
+          --shared-library-extension=_real \
           --with-hypre=1 --with-hypre-dir=/usr --with-clanguage=C++ --with-c-support \
           $(CONFIGURATION_OPTIONS)  \
           --prefix=$(PETSC_DIR_PREFIX)  \
@@ -136,13 +145,22 @@ override_dh_auto_configure:
             CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" MAKEFLAGS="$(MAKEFLAGS)"
 	dh_auto_configure -p$(PETSC_COMPLEX_VERSIONED_DEV_PACKAGE) --  \
           --with-debugging=0  \
-	  --with-scalar-type=complex --shared-library-extension=_complex \
+          --with-scalar-type=complex --shared-library-extension=_complex \
           $(CONFIGURATION_OPTIONS)  \
           --prefix=$(PETSC_COMPLEX_DIR_PREFIX)  \
           PETSC_DIR=$(CURDIR) --PETSC_ARCH=$(PETSC_COMPLEX_BUILD_DIR) \
             CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
             FCFLAGS="$(FCFLAGS)"  FFLAGS="$(FFLAGS)"  \
             CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" MAKEFLAGS="$(MAKEFLAGS)"
+	dh_auto_configure -p$(PETSC_COMPLEX_DEBUG_PACKAGE) --  \
+          --with-debugging=1  \
+          --with-scalar-type=complex --shared-library-extension=_complex \
+          $(CONFIGURATION_OPTIONS)  \
+          --prefix=$(PETSC_COMPLEX_DEBUG_DIR_PREFIX)  \
+          PETSC_DIR=$(CURDIR) --PETSC_ARCH=$(PETSC_COMPLEX_DEBUG_BUILD_DIR) \
+            CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
+            FCFLAGS="$(FCFLAGS)"  FFLAGS="$(FFLAGS)"  \
+            CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" MAKEFLAGS="$(MAKEFLAGS)"
 
 
 override_dh_auto_build:
@@ -152,6 +170,8 @@ override_dh_auto_build:
           PETSC_DIR=$(CURDIR) PETSC_ARCH=$(PETSC_BUILD_DIR)
 	dh_auto_build -p$(PETSC_COMPLEX_VERSIONED_DEV_PACKAGE)  --  \
           PETSC_DIR=$(CURDIR) PETSC_ARCH=$(PETSC_COMPLEX_BUILD_DIR)
+	dh_auto_build -p$(PETSC_COMPLEX_DEBUG_PACKAGE)  --  \
+          PETSC_DIR=$(CURDIR) PETSC_ARCH=$(PETSC_COMPLEX_DEBUG_BUILD_DIR)
 
 
 override_dh_auto_test:
@@ -164,6 +184,9 @@ override_dh_auto_test:
 	dh_auto_test -p$(PETSC_COMPLEX_VERSIONED_DEV_PACKAGE) -- \
 	  PETSC_DIR=$(CURDIR) PETSC_ARCH=$(PETSC_COMPLEX_BUILD_DIR) \
 	  LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):$(CURDIR)/$(PETSC_COMPLEX_BUILD_DIR)/lib
+	dh_auto_test -p$(PETSC_COMPLEX_DEBUG_PACKAGE) -- \
+	  PETSC_DIR=$(CURDIR) PETSC_ARCH=$(PETSC_COMPLEX_DEBUG_BUILD_DIR) \
+	  LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):$(CURDIR)/$(PETSC_COMPLEX_DEBUG_BUILD_DIR)/lib
 
 
 override_dh_auto_install:
@@ -176,6 +199,9 @@ override_dh_auto_install:
 	dh_auto_install -p$(PETSC_COMPLEX_VERSIONED_DEV_PACKAGE) --destdir=$(PACKAGE_COMPLEX_INSTALL_DIR) --  \
           DESTDIR=$(PACKAGE_COMPLEX_INSTALL_DIR) \
           PETSC_DIR=$(CURDIR) PETSC_ARCH=$(PETSC_COMPLEX_BUILD_DIR)
+	dh_auto_install -p$(PETSC_COMPLEX_DEBUG_PACKAGE) --destdir=$(PACKAGE_COMPLEX_DEBUG_INSTALL_DIR) --  \
+          DESTDIR=$(PACKAGE_COMPLEX_DEBUG_INSTALL_DIR) \
+          PETSC_DIR=$(CURDIR) PETSC_ARCH=$(PETSC_COMPLEX_DEBUG_BUILD_DIR)
 
 
 override_dh_install:
@@ -192,6 +218,8 @@ override_dh_install:
 	dh_link -p$(PETSC_COMPLEX_VERSIONED_DEV_PACKAGE)  usr/lib/$(DEB_HOST_MULTIARCH)/libpetsc_complex.so.$(PETSC_VERSION)  $(PETSC_COMPLEX_DIR_PREFIX)/lib/libpetsc_complex.so.$(PETSC_VERSION)
 	dh_link -p$(PETSC_COMPLEX_VERSIONED_PACKAGE)  usr/lib/$(DEB_HOST_MULTIARCH)/libpetsc_complex.so.$(PETSC_VERSION)  usr/lib/$(DEB_HOST_MULTIARCH)/libpetsc_complex.so.$(PETSC_SONAME_VERSION)
 	dh_link -p$(PETSC_COMPLEX_VERSIONED_DEV_PACKAGE)  usr/lib/$(DEB_HOST_MULTIARCH)/libpetsc_complex.so.$(PETSC_VERSION)  usr/lib/$(DEB_HOST_MULTIARCH)/libpetsc_complex.so
+	
+	dh_install -p$(PETSC_COMPLEX_DEBUG_PACKAGE) --sourcedir $(PACKAGE_COMPLEX_DEBUG_INSTALL_BASEDIR) --autodest --exclude=*html  usr
 
 
 override_dh_installdocs:
@@ -209,6 +237,7 @@ override_dh_python2:
 	dh_python2 -p$(PETSC_VERSIONED_DEV_PACKAGE) $(PETSC_DIR_PREFIX)/bin
 	dh_python2 -p$(PETSC_DEBUG_PACKAGE) $(PETSC_DIR_DEBUG_PREFIX)/bin
 	dh_python2 -p$(PETSC_COMPLEX_VERSIONED_DEV_PACKAGE) $(PETSC_COMPLEX_DIR_PREFIX)/bin
+	dh_python2 -p$(PETSC_COMPLEX_DEBUG_PACKAGE) $(PETSC_COMPLEX_DEBUG_DIR_PREFIX)/bin
 
 override_dh_installdeb:
 	dh_installdeb
@@ -219,6 +248,7 @@ override_dh_installdeb:
 
 override_dh_strip:
 	dh_strip --dbg-package=$(PETSC_DEBUG_PACKAGE)
+	dh_strip --dbg-package=$(PETSC_COMPLEX_DEBUG_PACKAGE)
 
 
 DEB_SOURCE_PACKAGE = petsc

-- 
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