[petsc] 02/02: reorganise binary packages with multiarch

Drew Parsons dparsons at moszumanska.debian.org
Wed Sep 30 17:08:49 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 17949811d8df9cbdcf083aad5ae869ca6b18cd02
Author: Drew Parsons <dparsons at debian.org>
Date:   Thu Oct 1 01:06:36 2015 +0800

    reorganise binary packages with multiarch
---
 debian/control | 14 ++++++++------
 debian/rules   | 43 ++++++++++++++++++++++++++++++-------------
 2 files changed, 38 insertions(+), 19 deletions(-)

diff --git a/debian/control b/debian/control
index d0334b3..788bb64 100644
--- a/debian/control
+++ b/debian/control
@@ -20,11 +20,9 @@ Homepage: http://www.mcs.anl.gov/petsc
 Package: libpetsc3.6.1-dev
 Architecture: linux-any hurd-any
 Section: libdevel
-Depends: libpetsc3.6.1 (= ${binary:Version}), ${mpi-dev}, ${linear-algebra-dev}, ${petsc-compilers},
- ${petsc-extra-dev}, libx11-dev, libsuitesparse-dev, libsuperlu-dev, libspooles-dev,
- libhypre-dev (>= 2.0.0.dfsg-7), libptscotch-dev, ${babel-dev}, ${misc:Depends},
- ${hdf5-dev}, libblacs-mpi-dev, libscalapack-mpi-dev, libmumps-dev,
- libfftw3-dev, libfftw3-mpi-dev
+Depends: libpetsc3.6.1 (= ${binary:Version}), libx11-dev, 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
 Suggests: petsc-dev (= ${binary:Version}), libpetsc3.6.1-dbg (= ${binary:Version}), petsc3.6.1-doc (= ${binary:Version}), libluminate-dev
 Provides: petsc3.6.1-dev
 Description: Static libraries, shared links, header files for PETSc
@@ -46,8 +44,10 @@ Description: Virtual package depending on latest PETSc development package
 
 Package: libpetsc3.6.1
 Architecture: linux-any hurd-any
+Multi-Arch: same
 Section: libs
-Depends: ${shlibs:Depends}, ${mpi}, ${misc:Depends}
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}
 Description: Shared libraries for version 3.6.1 of PETSc
  PETSc is the "Portable Extensible Toolkit for Scientific Computation", a suite
  of data structures and routines for the scalable (parallel) solution of
@@ -58,7 +58,9 @@ Description: Shared libraries for version 3.6.1 of PETSc
 
 Package: libpetsc3.6.1-dbg
 Architecture: linux-any hurd-any
+Multi-Arch: same
 Section: debug
+Pre-Depends: ${misc:Pre-Depends}
 Depends: libpetsc3.6.1-dev (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
 Provides: petsc3.6.1-dbg
 Description: Static debugging libraries for PETSc
diff --git a/debian/rules b/debian/rules
index 71c1feb..18683de 100755
--- a/debian/rules
+++ b/debian/rules
@@ -16,15 +16,17 @@ include /usr/share/dpkg/default.mk
 # package maintainers to append LDFLAGS
 #export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
 
+# Overriding this with "contrib" attempts to link with parmetis (unimplemented).
+DEBIAN_DIST=main
+
 DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_SYSTEM ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_SYSTEM)
-DEB_BUILD_MULTIARCH ?= $(shell dpkg-architecture -qDEB_BUILD_MULTIARCH)
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
 # On Alpha, override this with debian/rules PETSC_ARCH=linux_alpha_dec binary
 # to build PETSc libs with the Compaq compilers, though that requires at least:
 # libots, cpml-ev(5|6), cxml-ev(5|6), cfal and ccc.
 # Note that only arch-dependent .debs are generated when you do this.
-PETSC_ARCH=$(DEB_BUILD_MULTIARCH)
+PETSC_ARCH=$(DEB_HOST_MULTIARCH)
 
 # This defines the MPI implementation to use.  The easiest way to override this
 # default is to specify while building, e.g. debian/rules PETSC_MPI=lam binary.
@@ -48,6 +50,13 @@ PETSC_VERSION=3.6.1$(PETSC_EXT)
 # PETSC_NAME is the install dir under /usr/lib and the base for package names
 PETSC_NAME=petsc$(PETSC_VERSION)
 
+# debian binary package names
+PETSC_DEV_PACKAGE=$(PETSC_NAME)-dev
+PETSC_VERSIONED_DEV_PACKAGE=lib$(PETSC_NAME)-dev
+PETSC_VERSIONED_PACKAGE=lib$(PETSC_NAME)
+PETSC_DEBUG_PACKAGE=lib$(PETSC_NAME)-dbg
+PETSC_DOC_PACKAGE=$(PETSC_NAME)-doc
+
 
 PETSC_DIR_PREFIX=/usr/lib/petsc/$(PETSC_VERSION)/$(PETSC_ARCH)-cxx-opt
 PETSC_DIR_DEBUG_PREFIX=/usr/lib/petsc/$(PETSC_VERSION)/$(PETSC_ARCH)-cxx-debug
@@ -87,7 +96,7 @@ CONFIGURATION_OPTIONS=--with-shared-libraries \
 # dh_make generated override targets
 # This is example for Cmake (See https://bugs.debian.org/641051 )
 override_dh_auto_configure:
-	dh_auto_configure -plibpetsc3.6.1-dbg --  \
+	dh_auto_configure -p$(PETSC_DEBUG_PACKAGE) --  \
           --with-debugging=1  \
           $(CONFIGURATION_OPTIONS)  \
           --prefix=$(PETSC_DIR_DEBUG_PREFIX)  \
@@ -95,7 +104,7 @@ override_dh_auto_configure:
             CFLAGS=$(CFLAGS) CXXFLAGS=$(CXXFLAGS) \
             FCFLAGS=$(FCFLAGS)  FFLAGS=$(FFLAGS)  \
             CPPFLAGS=$(CPPFLAGS) LDFLAGS=$(LDFLAGS) MAKEFLAGS=$(MAKEFLAGS)
-	dh_auto_configure -plibpetsc3.6.1  --  \
+	dh_auto_configure -p$(PETSC_VERSIONED_DEV_PACKAGE) --  \
           --with-debugging=0  \
           $(CONFIGURATION_OPTIONS)  \
           --prefix=$(PETSC_DIR_PREFIX)  \
@@ -106,33 +115,41 @@ override_dh_auto_configure:
 
 
 override_dh_auto_build:
-	dh_auto_build -plibpetsc3.6.1-dbg --  \
+	dh_auto_build -p$(PETSC_DEBUG_PACKAGE) --  \
           PETSC_DIR=$(CURDIR) PETSC_ARCH=$(PETSC_DEBUG_BUILD_DIR)
-	dh_auto_build -plibpetsc3.6.1  --  \
+	dh_auto_build -p$(PETSC_VERSIONED_DEV_PACKAGE)  --  \
           PETSC_DIR=$(CURDIR) PETSC_ARCH=$(PETSC_BUILD_DIR)
 
 
 override_dh_auto_test:
-	dh_auto_test -plibpetsc3.6.1-dbg -- \
+	dh_auto_test -p$(PETSC_DEBUG_PACKAGE) -- \
 	  PETSC_DIR=$(CURDIR) PETSC_ARCH=$(PETSC_DEBUG_BUILD_DIR) \
 	  LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):$(CURDIR)/$(PETSC_DEBUG_BUILD_DIR)/lib
-	dh_auto_test -plibpetsc3.6.1 -- \
+	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
 
 
 override_dh_auto_install:
-	dh_auto_install -plibpetsc3.6.1-dbg --destdir=$(PACKAGE_DEBUG_INSTALL_DIR) --  \
+	dh_auto_install -p$(PETSC_DEBUG_PACKAGE) --destdir=$(PACKAGE_DEBUG_INSTALL_DIR) --  \
           DESTDIR=$(PACKAGE_DEBUG_INSTALL_DIR)  \
           PETSC_DIR=$(CURDIR) PETSC_ARCH=$(PETSC_DEBUG_BUILD_DIR)
-	dh_auto_install -plibpetsc3.6.1 --destdir=$(PACKAGE_INSTALL_DIR) --  \
+	dh_auto_install -p$(PETSC_VERSIONED_DEV_PACKAGE) --destdir=$(PACKAGE_INSTALL_DIR) --  \
           DESTDIR=$(PACKAGE_INSTALL_DIR) \
           PETSC_DIR=$(CURDIR) PETSC_ARCH=$(PETSC_BUILD_DIR)
 
+
+override_dh_install:
+	dh_install -p$(PETSC_VERSIONED_PACKAGE) --sourcedir $(PACKAGE_INSTALL_BASEDIR) --exclude=*html  $(PETSC_DIR_PREFIX)/lib/libpetsc.so.$(PETSC_VERSION)  usr/lib/$(DEB_HOST_MULTIARCH)
+	dh_install -p$(PETSC_VERSIONED_DEV_PACKAGE) --sourcedir $(PACKAGE_INSTALL_BASEDIR) --autodest --exclude=*html --exclude=libpetsc.so.$(PETSC_VERSION)  usr
+	dh_link -p$(PETSC_VERSIONED_DEV_PACKAGE)  usr/lib/$(DEB_HOST_MULTIARCH)/libpetsc.so.$(PETSC_VERSION)  $(PETSC_DIR_PREFIX)/lib/libpetsc.so.$(PETSC_VERSION) 
+	dh_install -p$(PETSC_DEBUG_PACKAGE) --sourcedir $(PACKAGE_DEBUG_INSTALL_BASEDIR) --autodest --exclude=*html  usr
+
+
 override_dh_installdocs:
 	dh_installdocs
-	dh_install -p$(PETSC_NAME)-doc --sourcedir $(PACKAGE_DEBUG_INSTALL_BASEDIR) --autodest $(PETSC_DIR_DEBUG_PREFIX)/include/*html
-	dh_install -p$(PETSC_NAME)-doc --sourcedir $(PACKAGE_DEBUG_INSTALL_BASEDIR) --autodest $(PETSC_DIR_DEBUG_PREFIX)/include/petsc/*/*html
+	dh_install -p$(PETSC_DOC_PACKAGE) --sourcedir $(PACKAGE_DEBUG_INSTALL_BASEDIR) --autodest $(PETSC_DIR_DEBUG_PREFIX)/include/*html
+	dh_install -p$(PETSC_DOC_PACKAGE) --sourcedir $(PACKAGE_DEBUG_INSTALL_BASEDIR) --autodest $(PETSC_DIR_DEBUG_PREFIX)/include/petsc/*/*html
 
 
 # dh_installchangelogs can't handle a directory of changelog files, so skip them here

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