[petsc] 04/07: create packages with complex number support

Drew Parsons dparsons at moszumanska.debian.org
Mon Oct 5 02:31:50 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 72ea23b38f9b9e6803a4fde3bb4084684f84a72f
Author: Drew Parsons <dparsons at debian.org>
Date:   Mon Oct 5 00:33:17 2015 +0800

    create packages with complex number support
    
    Provide new packages libpetsc-complex-3.6.2-dev and
    libpetsc-complex-3.6 with support for complex numbers.
    
    Closes: #730317.
---
 debian/changelog                                   |  2 ++
 debian/control                                     | 38 ++++++++++++++++++++++
 debian/libpetsc-complex-3.6.2-dev.docs             |  1 +
 ...ostinst => libpetsc-complex-3.6.2-dev.postinst} |  9 ++---
 debian/libpetsc-complex-3.6.2-dev.prerm            |  8 +++++
 debian/libpetsc3.6.2-dev.postinst                  |  2 +-
 debian/rules                                       | 34 +++++++++++++++++++
 7 files changed, 89 insertions(+), 5 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 5c25915..8ede28a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -16,6 +16,8 @@ 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.
 
  -- Drew Parsons <dparsons at debian.org>  Thu, 24 Sep 2015 11:55:47 +0800
 
diff --git a/debian/control b/debian/control
index 05ec982..8ddc018 100644
--- a/debian/control
+++ b/debian/control
@@ -108,3 +108,41 @@ Description: Documentation and examples for PETSc
  .
  This package contains documentation for developing with PETSc 3.6.2.
 
+Package: libpetsc-complex-3.6.2-dev
+Architecture: linux-any hurd-any
+Section: libdevel
+Depends: libpetsc-complex-3.6 (= ${binary:Version}), mpi-default-dev (>= 1.0.2), libsuitesparse-dev, libsuperlu-dev, libspooles-dev,
+ libhypre-dev (>= 2.0.0.dfsg-7), libptscotch-dev, ${misc:Depends}, libblacs-mpi-dev, libscalapack-mpi-dev,
+ libmumps-dev, libfftw3-dev, libfftw3-mpi-dev
+Recommends: libhdf5-mpi-dev (>= 1.8.8), libssl-dev,
+ python, 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
+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
+ 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 for building applications 
+ using PETSc 3.6.2 with support for complex numbers.
+
+Package: libpetsc-complex-3.6
+Architecture: linux-any hurd-any
+Multi-Arch: same
+Section: libs
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Shared libraries for version 3.6 of PETSc with Complex Numbers
+ 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 contains the latest PETSc 3.6 shared library 
+ and supports complex numbers.
+
diff --git a/debian/libpetsc-complex-3.6.2-dev.docs b/debian/libpetsc-complex-3.6.2-dev.docs
new file mode 100644
index 0000000..e174728
--- /dev/null
+++ b/debian/libpetsc-complex-3.6.2-dev.docs
@@ -0,0 +1 @@
+debian/README.Debian
diff --git a/debian/libpetsc3.6.2-dev.postinst b/debian/libpetsc-complex-3.6.2-dev.postinst
similarity index 64%
copy from debian/libpetsc3.6.2-dev.postinst
copy to debian/libpetsc-complex-3.6.2-dev.postinst
index 544dd1e..cdc4a6f 100644
--- a/debian/libpetsc3.6.2-dev.postinst
+++ b/debian/libpetsc-complex-3.6.2-dev.postinst
@@ -4,13 +4,14 @@ DEB_HOST_MULTIARCH=__DEB_HOST_MULTIARCH__
 
 PETSC_VERSION=__PETSC_VERSION__
 PETSC_ARCH=${DEB_HOST_MULTIARCH}
+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_ARCH} 3610 \
-  --slave /usr/include/petsc petscinclude /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_ARCH}/include \
-  --slave /usr/lib/libpetsc.so libpetsc.so /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc.so.${PETSC_VERSION} \
-  --slave /usr/lib/pkgconfig/PETSc.pc PETSc.pc /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_ARCH}/lib/pkgconfig/PETSc.pc
+update-alternatives --install /usr/lib/petsc petsc /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_COMPLEX_ARCH} 3610 \
+  --slave /usr/include/petsc petscinclude /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_COMPLEX_ARCH}/include \
+  --slave /usr/lib/libpetsc.so libpetsc.so /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc-complex.so.${PETSC_VERSION} \
+  --slave /usr/lib/pkgconfig/PETSc.pc PETSc.pc /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_COMPLEX_ARCH}/lib/pkgconfig/PETSc.pc
 fi
 
 
diff --git a/debian/libpetsc-complex-3.6.2-dev.prerm b/debian/libpetsc-complex-3.6.2-dev.prerm
new file mode 100644
index 0000000..167dbb1
--- /dev/null
+++ b/debian/libpetsc-complex-3.6.2-dev.prerm
@@ -0,0 +1,8 @@
+#!/bin/sh -e
+
+# Remove alternatives links
+if [ "$1" = "remove" ]; then
+  update-alternatives --remove petsc /usr/lib/petsc
+fi
+
+#DEBHELPER#
diff --git a/debian/libpetsc3.6.2-dev.postinst b/debian/libpetsc3.6.2-dev.postinst
index 544dd1e..bcd57a2 100644
--- a/debian/libpetsc3.6.2-dev.postinst
+++ b/debian/libpetsc3.6.2-dev.postinst
@@ -7,7 +7,7 @@ PETSC_ARCH=${DEB_HOST_MULTIARCH}
 
 # Make alternatives links
 if [ "$1" = "configure" ]; then
-update-alternatives --install /usr/lib/petsc petsc /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_ARCH} 3610 \
+update-alternatives --install /usr/lib/petsc petsc /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_ARCH} 3612 \
   --slave /usr/include/petsc petscinclude /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_ARCH}/include \
   --slave /usr/lib/libpetsc.so libpetsc.so /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc.so.${PETSC_VERSION} \
   --slave /usr/lib/pkgconfig/PETSc.pc PETSc.pc /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_ARCH}/lib/pkgconfig/PETSc.pc
diff --git a/debian/rules b/debian/rules
index e8271d7..0226771 100755
--- a/debian/rules
+++ b/debian/rules
@@ -41,6 +41,7 @@ PETSC_HDF5_FLAGS=$(shell if [ -e /usr/lib/libhdf5.so ]; then echo "--with-hdf5=1
 
 PETSC_BUILD_DIR=$(PETSC_ARCH)
 PETSC_DEBUG_BUILD_DIR=$(PETSC_ARCH)-debug
+PETSC_COMPLEX_BUILD_DIR=$(PETSC_ARCH)-complex
 
 # PETSC_VERSION is used for the package names, library sonames, and
 # /usr/lib/petscdir subdirectory names.
@@ -51,6 +52,8 @@ PETSC_SONAME_VERSION=$(shell echo $(PETSC_VERSION) | awk 'BEGIN { FS="."}; {prin
 # PETSC_NAME is the install dir under /usr/lib and the base for package names
 PETSC_SONAME=petsc$(PETSC_SONAME_VERSION)
 PETSC_NAME=petsc$(PETSC_VERSION)
+PETSC_COMPLEX_SONAME=petsc-complex-$(PETSC_SONAME_VERSION)
+PETSC_COMPLEX_NAME=petsc-complex-$(PETSC_VERSION)
 
 # debian binary package names
 PETSC_DEV_PACKAGE=$(PETSC_NAME)-dev
@@ -58,16 +61,21 @@ PETSC_VERSIONED_DEV_PACKAGE=lib$(PETSC_NAME)-dev
 PETSC_VERSIONED_PACKAGE=lib$(PETSC_SONAME)
 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)
 
 # 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)
 PETSC_DIR_DEBUG_PREFIX=/usr/lib/petscdir/$(PETSC_VERSION)/$(PETSC_ARCH)-debug
+PETSC_COMPLEX_DIR_PREFIX=/usr/lib/petscdir/$(PETSC_VERSION)/$(PETSC_ARCH)-complex
 
 PACKAGE_INSTALL_BASEDIR=debian/tmp/$(PETSC_NAME)
 PACKAGE_INSTALL_DIR=$(PACKAGE_INSTALL_BASEDIR)/$(PETSC_DIR_PREFIX)
 PACKAGE_DEBUG_INSTALL_BASEDIR=debian/tmp/$(PETSC_NAME)-dbg
 PACKAGE_DEBUG_INSTALL_DIR=$(PACKAGE_DEBUG_INSTALL_BASEDIR)/$(PETSC_DIR_DEBUG_PREFIX)
+PACKAGE_COMPLEX_INSTALL_BASEDIR=debian/tmp/$(PETSC_COMPLEX_NAME)
+PACKAGE_COMPLEX_INSTALL_DIR=$(PACKAGE_COMPLEX_INSTALL_BASEDIR)/$(PETSC_COMPLEX_DIR_PREFIX)
 
 CONFIGURATION_OPTIONS=--with-shared-libraries \
 	  --useThreads 0 \
@@ -107,6 +115,10 @@ override_dh_auto_clean:
 	dh_auto_clean -p$(PETSC_VERSIONED_DEV_PACKAGE) -- \
 	  PETSC_DIR=$(CURDIR) PETSC_ARCH=$(PETSC_BUILD_DIR); \
 	fi
+	if [ -d $(PETSC_COMPLEX_BUILD_DIR) ]; then \
+	dh_auto_clean -p$(PETSC_COMPLEX_VERSIONED_DEV_PACKAGE) -- \
+	  PETSC_DIR=$(CURDIR) PETSC_ARCH=$(PETSC_COMPLEX_BUILD_DIR); \
+	fi
 
 
 override_dh_auto_configure:
@@ -126,6 +138,14 @@ override_dh_auto_configure:
             CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
             FCFLAGS="$(FCFLAGS)"  FFLAGS="$(FFLAGS)"  \
             CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" MAKEFLAGS="$(MAKEFLAGS)"
+	dh_auto_configure -p$(PETSC_COMPLEX_VERSIONED_DEV_PACKAGE) --  \
+          --with-debugging=0  --with-scalar-type=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)"
 
 
 override_dh_auto_build:
@@ -133,6 +153,8 @@ override_dh_auto_build:
           PETSC_DIR=$(CURDIR) PETSC_ARCH=$(PETSC_DEBUG_BUILD_DIR)
 	dh_auto_build -p$(PETSC_VERSIONED_DEV_PACKAGE)  --  \
           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)
 
 
 override_dh_auto_test:
@@ -142,6 +164,9 @@ override_dh_auto_test:
 	dh_auto_test -p$(PETSC_VERSIONED_DEV_PACKAGE) -- \
 	  PETSC_DIR=$(CURDIR) PETSC_ARCH=$(PETSC_BUILD_DIR) \
 	  LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):$(CURDIR)/$(PETSC_BUILD_DIR)/lib
+	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
 
 
 override_dh_auto_install:
@@ -151,6 +176,9 @@ override_dh_auto_install:
 	dh_auto_install -p$(PETSC_VERSIONED_DEV_PACKAGE) --destdir=$(PACKAGE_INSTALL_DIR) --  \
           DESTDIR=$(PACKAGE_INSTALL_DIR) \
           PETSC_DIR=$(CURDIR) PETSC_ARCH=$(PETSC_BUILD_DIR)
+	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)
 
 
 override_dh_install:
@@ -161,6 +189,12 @@ override_dh_install:
 	dh_link -p$(PETSC_VERSIONED_DEV_PACKAGE)  usr/lib/$(DEB_HOST_MULTIARCH)/libpetsc.so.$(PETSC_VERSION)  usr/lib/$(DEB_HOST_MULTIARCH)/libpetsc.so
 	dh_link -p$(PETSC_VERSIONED_DEV_PACKAGE)  usr/lib/petscdir/$(PETSC_VERSION)/$(PETSC_ARCH)/share/petsc/matlab usr/share/octave/site/m/petsc
 	dh_install -p$(PETSC_DEBUG_PACKAGE) --sourcedir $(PACKAGE_DEBUG_INSTALL_BASEDIR) --autodest --exclude=*html  usr
+	
+	dh_install -p$(PETSC_COMPLEX_VERSIONED_PACKAGE) --sourcedir $(PACKAGE_COMPLEX_INSTALL_BASEDIR) --exclude=*html  $(PETSC_COMPLEX_DIR_PREFIX)/lib/libpetsc-complex.so.$(PETSC_VERSION)  usr/lib/$(DEB_HOST_MULTIARCH)
+	dh_install -p$(PETSC_COMPLEX_VERSIONED_DEV_PACKAGE) --sourcedir $(PACKAGE_COMPLEX_INSTALL_BASEDIR) --autodest --exclude=*html --exclude=libpetsc-complex.so.$(PETSC_VERSION)  usr
+	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
 
 
 override_dh_installdocs:

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