[scalapack] 01/01: Packaging updates: move to debhelper (dh) with cmake

Drew Parsons dparsons at moszumanska.debian.org
Sat Jul 8 14:30:27 UTC 2017


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

dparsons pushed a commit to branch experimental
in repository scalapack.

commit 37cd8bd2da5694e95e9e5942883947143d52daee
Author: Drew Parsons <dparsons at debian.org>
Date:   Sat Jul 8 22:27:49 2017 +0800

    Packaging updates: move to debhelper (dh) with cmake
    
    - add libscalapack-openmpi-dev and libscalapack-mpich-dev packages
    - d/rules: enable tests only if NUMJOBS is greater than 1
    - d/control: replace and provide blacs
    
    Thanks Christophe Trophime.
---
 debian/changelog                                   |   4 +
 debian/control                                     | 125 +++--
 debian/control.in                                  | 152 ------
 ...ck-mpi-dev.dirs => libscalapack-mpich-dev.dirs} |   0
 debian/libscalapack-mpich-dev.install              |   4 +
 ...-mpich1.install => libscalapack-mpich2.install} |   0
 ...-mpi-dev.dirs => libscalapack-openmpi-dev.dirs} |   0
 debian/libscalapack-openmpi-dev.install            |   4 +
 ...nmpi1.install => libscalapack-openmpi2.install} |   0
 debian/patches/series                              |  59 +--
 debian/patches/sharedlibs-soname.patch             |  66 +++
 debian/rules                                       | 531 ++-------------------
 12 files changed, 238 insertions(+), 707 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 749ede1..0c8e952 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,10 @@ scalapack (2.0.2-1exp1) UNRELEASED; urgency=medium
     - PxSYEVR/PxHEEVR: MRRR (Multiple Relatively Robust
       Representations) algorithm.
     - cmake support
+  * Packaging updates. Thanks Christophe Trophime.
+    - debian/rules: move to debhelper (dh) with cmake
+    - d/rules: enable tests only if NUMJOBS is greater than 1
+    - d/control: replace and provide blacs
 
  -- Drew Parsons <dparsons at debian.org>  Sat, 08 Jul 2017 00:07:01 +0800
 
diff --git a/debian/control b/debian/control
index 06a0f4f..1d9a823 100644
--- a/debian/control
+++ b/debian/control
@@ -6,21 +6,28 @@
 Source: scalapack
 Section: devel
 Priority: extra
-Maintainer: Debian Science Maintainers <debian-science-maintainers at lists.alioth.debian.org>
-Uploaders: Muammar El Khatib <muammar at debian.org>
-Standards-Version: 3.9.8
-Build-Depends: mpi-default-dev, pvm-dev, blacs-pvm-dev, gfortran, liblapack-dev, libblas-dev, debhelper (>= 9), dh-exec, libblacs-mpi-dev, pkg-config
+Maintainer: Muammar El Khatib <muammar at debian.org>
+Standards-Version: 3.9.4
+Build-Depends: debhelper (>= 9),
+ cmake, 
+ mpi-default-dev,
+ mpi-default-bin,
+ mpich, libmpich-dev,
+ gfortran,
+ liblapack-dev | liblapack.so,
+ libblas-dev | libblas.so,
+ debhelper (>= 6),
+ pkg-config
 Homepage: http://www.netlib.org/scalapack/
-Vcs-Git: https://anonscm.debian.org/git/debian-science/packages/scalapack.git
-Vcs-Browser: https://anonscm.debian.org/cgit/debian-science/packages/scalapack.git/
 
-Package: libscalapack-openmpi1
+Package: libscalapack-openmpi2
 Section: libs
-Architecture: alpha amd64 arm64 armel armhf hppa hurd-i386 i386 kfreebsd-amd64 kfreebsd-i386 mips mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390x sparc64 x32
+Architecture: alpha amd64 arm64 armel armhf hurd-i386 i386 kfreebsd-amd64 kfreebsd-i386 mips mipsel mips64 mips64el powerpc ppc64 ppc64el sparc s390x x32 sparc64 hppa
 Depends: mpi-default-bin, ${shlibs:Depends}, ${misc:Depends}
-Conflicts: scalapack1-mpich, scalapack1-lam
+Conflicts: scalapack2-mpich
 Breaks: libscalapack-mpi1 (<< 1.8.0-9.1)
-Replaces: scalapack1-mpich, scalapack1-lam, libscalapack-mpi1 (<< 1.8.0-9.1)
+Replaces: scalapack1-mpich, libscalapack-mpi1 (<< 1.8.0-9.1), libblacs-openmpi1
+Provides: libblacs-openmpi1
 Suggests: scalapack-doc
 Description: Scalable Linear Algebra Package - Shared libs. for OpenMPI
  ScaLAPACK is the parallel version of LAPACK and is used on Beowulf type
@@ -32,13 +39,14 @@ Description: Scalable Linear Algebra Package - Shared libs. for OpenMPI
  .
  Also included: PBLAS, Parallel Basic Linear Algebra Subprograms.
 
-Package: libscalapack-mpich1
+Package: libscalapack-mpich2
 Section: libs
 Architecture: m68k sh4
 Depends: mpi-default-bin, ${shlibs:Depends}, ${misc:Depends}
-Conflicts: scalapack1-mpich, scalapack1-lam
+Conflicts: scalapack2-mpich
 Breaks: libscalapack-mpi1 (<< 1.8.0-9.1)
-Replaces: scalapack1-mpich, scalapack1-lam, libscalapack-mpi1 (<< 1.8.0-9.1)
+Replaces: scalapack1-mpich, libscalapack-mpi1 (<< 1.8.0-9.1), libblacs-mpich1
+Provides: libblacs-mpich1
 Suggests: scalapack-doc
 Description: Scalable Linear Algebra Package - Shared libs. for MPICH
  ScaLAPACK is the parallel version of LAPACK and is used on Beowulf type
@@ -52,12 +60,30 @@ Description: Scalable Linear Algebra Package - Shared libs. for MPICH
 
 Package: libscalapack-mpi-dev
 Section: libdevel
-Architecture: alpha amd64 arm64 armel armhf hppa hurd-i386 i386 kfreebsd-amd64 kfreebsd-i386 mips mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390x sparc64 x32 m68k sh4
-Depends: libscalapack-openmpi1 (= ${binary:Version}) [alpha amd64 arm64 armel armhf hppa hurd-i386 i386 kfreebsd-amd64 kfreebsd-i386 mips mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390x sparc64 x32],
-         libscalapack-mpich1 (= ${binary:Version}) [m68k sh4],
-         libblacs-mpi-dev, ${misc:Depends}
-Conflicts: scalapack-mpich-dev, scalapack-lam-dev
-Replaces: scalapack-mpich-dev, scalapack-lam-dev
+Architecture: alpha amd64 arm64 armel armhf hurd-i386 i386 kfreebsd-amd64 kfreebsd-i386 mips mipsel mips64 mips64el powerpc ppc64 ppc64el sparc s390x x32 sparc64 hppa m68k sh4
+Depends: ${scalapack-mpi-dev}, mpi-default-dev, ${misc:Depends}
+Replaces: libblacs-mpi-dev
+Provides: libblacs-mpi-dev
+Suggests: scalapack-doc
+Description: Scalable Linear Algebra Package - Dev. files for MPICH
+ ScaLAPACK is the parallel version of LAPACK and is used on Beowulf type
+ clusters.
+ .
+ You can choose between an implementation based on MPI or PVM. This
+ package uses MPI.
+ .
+ The package is available for LAM and MPICH. This package uses MPICH. There
+ are packages for the shared libraries, for the static libraries and
+ the development files (this one) and for test programs.
+ .
+ Also included: PBLAS, Parallel Basic Linear Algebra Subprograms.
+ 
+Package: libscalapack-mpich-dev
+Section: libdevel
+Architecture: alpha amd64 arm64 armel armhf hurd-i386 i386 kfreebsd-amd64 kfreebsd-i386 mips mipsel mips64 mips64el powerpc ppc64 ppc64el sparc s390x x32 sparc64 hppa m68k sh4
+Depends: libscalapack-mpich2 (= ${binary:Version}), ${misc:Depends}
+Replaces: libblacs-mpi-dev
+Provides: libblacs-mpi-dev
 Suggests: scalapack-doc
 Description: Scalable Linear Algebra Package - Dev. files for MPICH
  ScaLAPACK is the parallel version of LAPACK and is used on Beowulf type
@@ -72,14 +98,14 @@ Description: Scalable Linear Algebra Package - Dev. files for MPICH
  .
  Also included: PBLAS, Parallel Basic Linear Algebra Subprograms.
 
-Package: scalapack-mpi-test
-Section: math
-Architecture: alpha amd64 arm64 armel armhf hppa hurd-i386 i386 kfreebsd-amd64 kfreebsd-i386 mips mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390x sparc64 x32 m68k sh4
-Depends: scalapack-test-common, ${shlibs:Depends}, ${misc:Depends}
-Conflicts: scalapack-mpich-test, scalapack-lam-test
-Replaces: scalapack-mpich-test, scalapack-lam-test
+Package: libscalapack-openmpi-dev
+Section: libdevel
+Architecture: alpha amd64 arm64 armel armhf hurd-i386 i386 kfreebsd-amd64 kfreebsd-i386 mips mipsel mips64 mips64el powerpc ppc64 ppc64el sparc s390x x32 sparc64 hppa m68k sh4
+Depends: libscalapack-openmpi2 (= ${binary:Version}), ${misc:Depends}
+Replaces: libblacs-mpi-dev
+Provides: libblacs-mpi-dev
 Suggests: scalapack-doc
-Description: Scalable Linear Algebra Package - Test files for MPICH
+Description: Scalable Linear Algebra Package - Dev. files for OPENMPI
  ScaLAPACK is the parallel version of LAPACK and is used on Beowulf type
  clusters.
  .
@@ -88,10 +114,44 @@ Description: Scalable Linear Algebra Package - Test files for MPICH
  .
  The package is available for LAM and MPICH. This package uses MPICH. There
  are packages for the shared libraries, for the static libraries and
- the development files and for test programs (this one).
+ the development files (this one) and for test programs.
  .
  Also included: PBLAS, Parallel Basic Linear Algebra Subprograms.
 
+# Package: scalapack-mpi-test
+# Section: math
+# Architecture: alpha amd64 arm64 armel armhf hurd-i386 i386 kfreebsd-amd64 kfreebsd-i386 mips mipsel mips64 mips64el powerpc ppc64 ppc64el sparc s390x x32 sparc64 hppa m68k sh4
+# Depends: scalapack-test-common, ${shlibs:Depends}, ${misc:Depends}
+# Conflicts: scalapack-mpich-test
+# Replaces: scalapack-mpich-test
+# Provides: blacs-mpi-test, blacs-mpi-test
+# Suggests: scalapack-doc
+# Description: Scalable Linear Algebra Package - Test files for MPICH
+#  ScaLAPACK is the parallel version of LAPACK and is used on Beowulf type
+#  clusters.
+#  .
+#  You can choose between an implementation based on MPI. This
+#  package uses MPI.
+#  .
+#  The package is available for LAM and MPICH. This package uses MPICH. There
+#  are packages for the shared libraries, for the static libraries and
+#  the development files and for test programs (this one).
+#  .
+#  Also included: PBLAS, Parallel Basic Linear Algebra Subprograms.
+
+# Package: scalapack-test-common
+# Architecture: all
+# Depends: ${misc:Depends}
+# Replaces: blacs-test-common
+# Provides: blacs-test-common
+# Suggests: scalapack-mpich-test
+# Description: Test data for ScaLAPACK testers
+#  ScaLAPACK is the parallel version of LAPACK and is used on Beowulf type
+#  clusters.
+#  .
+#  You can choose between an implementation based on MPI. This package
+#  provides test data for all ScaLAPACK packages (MPICH and OPENMPI versions).
+
 Package: libscalapack-pvm1
 Section: libs
 Architecture: any
@@ -144,14 +204,3 @@ Description: Scalable Linear Algebra Package - Test files for PVM
  the development files and for test programs (this one).
  .
  Also included: PBLAS, Parallel Basic Linear Algebra Subprograms.
-
-Package: scalapack-test-common
-Architecture: all
-Depends: ${misc:Depends}
-Suggests: scalapack-lam-test | scalapack-mpich-test | scalapack-pvm-test
-Description: Test data for ScaLAPACK testers
- ScaLAPACK is the parallel version of LAPACK and is used on Beowulf type
- clusters.
- .
- You can choose between an implementation based on MPI or PVM. This package
- provides test data for all ScaLAPACK packages (MPICH, LAM and PVM versions).
diff --git a/debian/control.in b/debian/control.in
deleted file mode 100644
index 789efbd..0000000
--- a/debian/control.in
+++ /dev/null
@@ -1,152 +0,0 @@
-Source: scalapack
-Section: devel
-Priority: extra
-Maintainer: Debian Science Maintainers <debian-science-maintainers at lists.alioth.debian.org>
-Uploaders: Muammar El Khatib <muammar at debian.org>
-Standards-Version: 3.9.8
-Build-Depends: mpi-default-dev, pvm-dev, blacs-pvm-dev, gfortran, liblapack-dev, libblas-dev, debhelper (>= 9), dh-exec, libblacs-mpi-dev, pkg-config
-Homepage: http://www.netlib.org/scalapack/
-Vcs-Git: https://anonscm.debian.org/git/debian-science/packages/scalapack.git
-Vcs-Browser: https://anonscm.debian.org/cgit/debian-science/packages/scalapack.git/
-
-Package: libscalapack-openmpi1
-Section: libs
-Architecture: @OPENMPI_ARCHS@
-Depends: mpi-default-bin, ${shlibs:Depends}, ${misc:Depends}
-Conflicts: scalapack1-mpich, scalapack1-lam
-Breaks: libscalapack-mpi1 (<< 1.8.0-9.1)
-Replaces: scalapack1-mpich, scalapack1-lam, libscalapack-mpi1 (<< 1.8.0-9.1)
-Suggests: scalapack-doc
-Description: Scalable Linear Algebra Package - Shared libs. for OpenMPI
- ScaLAPACK is the parallel version of LAPACK and is used on Beowulf type
- clusters.
- .
- You can choose between an implementation based on MPI or PVM. This
- package uses MPI. There are packages for the shared libraries (this one), for
- the static libraries and the development files and for test programs.
- .
- Also included: PBLAS, Parallel Basic Linear Algebra Subprograms.
-
-Package: libscalapack-mpich1
-Section: libs
-Architecture: @MPICH_ARCHS@
-Depends: mpi-default-bin, ${shlibs:Depends}, ${misc:Depends}
-Conflicts: scalapack1-mpich, scalapack1-lam
-Breaks: libscalapack-mpi1 (<< 1.8.0-9.1)
-Replaces: scalapack1-mpich, scalapack1-lam, libscalapack-mpi1 (<< 1.8.0-9.1)
-Suggests: scalapack-doc
-Description: Scalable Linear Algebra Package - Shared libs. for MPICH
- ScaLAPACK is the parallel version of LAPACK and is used on Beowulf type
- clusters.
- .
- You can choose between an implementation based on MPI or PVM. This
- package uses MPI. There are packages for the shared libraries (this one), for
- the static libraries and the development files and for test programs.
- .
- Also included: PBLAS, Parallel Basic Linear Algebra Subprograms.
-
-Package: libscalapack-mpi-dev
-Section: libdevel
-Architecture: @OPENMPI_ARCHS@ @MPICH_ARCHS@
-Depends: libscalapack-openmpi1 (= ${binary:Version}) [@OPENMPI_ARCHS@],
-         libscalapack-mpich1 (= ${binary:Version}) [@MPICH_ARCHS@],
-         libblacs-mpi-dev, ${misc:Depends}
-Conflicts: scalapack-mpich-dev, scalapack-lam-dev
-Replaces: scalapack-mpich-dev, scalapack-lam-dev
-Suggests: scalapack-doc
-Description: Scalable Linear Algebra Package - Dev. files for MPICH
- ScaLAPACK is the parallel version of LAPACK and is used on Beowulf type
- clusters.
- .
- You can choose between an implementation based on MPI or PVM. This
- package uses MPI.
- .
- The package is available for LAM and MPICH. This package uses MPICH. There
- are packages for the shared libraries, for the static libraries and
- the development files (this one) and for test programs.
- .
- Also included: PBLAS, Parallel Basic Linear Algebra Subprograms.
-
-Package: scalapack-mpi-test
-Section: math
-Architecture: @OPENMPI_ARCHS@ @MPICH_ARCHS@
-Depends: scalapack-test-common, ${shlibs:Depends}, ${misc:Depends}
-Conflicts: scalapack-mpich-test, scalapack-lam-test
-Replaces: scalapack-mpich-test, scalapack-lam-test
-Suggests: scalapack-doc
-Description: Scalable Linear Algebra Package - Test files for MPICH
- ScaLAPACK is the parallel version of LAPACK and is used on Beowulf type
- clusters.
- .
- You can choose between an implementation based on MPI or PVM. This
- package uses MPI.
- .
- The package is available for LAM and MPICH. This package uses MPICH. There
- are packages for the shared libraries, for the static libraries and
- the development files and for test programs (this one).
- .
- Also included: PBLAS, Parallel Basic Linear Algebra Subprograms.
-
-Package: libscalapack-pvm1
-Section: libs
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Suggests: scalapack-doc
-Conflicts: scalapack1-pvm
-Replaces: scalapack1-pvm
-Description: Scalable Linear Algebra Package - Shared libs. for PVM
- ScaLAPACK is the parallel version of LAPACK and is used on Beowulf type
- clusters.
- .
- You can choose between an implementation based on MPI or PVM. This
- package uses PVM.
- .
- There are packages for the shared libraries (this one), for the static
- libraries and the development files and for test programs.
- .
- Also included: PBLAS, Parallel Basic Linear Algebra Subprograms.
-
-Package: libscalapack-pvm-dev
-Section: libdevel
-Architecture: any
-Depends: libscalapack-pvm1 (= ${binary:Version}), blacs-pvm-dev, pvm-dev, ${shlibs:Depends}, ${misc:Depends}
-Suggests: scalapack-doc
-Description: Scalable Linear Algebra Package - Dev. files for PVM
- ScaLAPACK is the parallel version of LAPACK and is used on Beowulf type
- clusters.
- .
- You can choose between an implementation based on MPI or PVM. This
- package uses PVM.
- .
- There are packages for the shared libraries, for the static libraries and
- the development files (this one) and for test programs.
- .
- Also included: PBLAS, Parallel Basic Linear Algebra Subprograms.
-
-Package: scalapack-pvm-test
-Section: math
-Architecture: any
-Depends: scalapack-test-common, ${shlibs:Depends}, ${misc:Depends}
-Suggests: scalapack-doc
-Description: Scalable Linear Algebra Package - Test files for PVM
- ScaLAPACK is the parallel version of LAPACK and is used on Beowulf type
- clusters.
- .
- You can choose between an implementation based on MPI or PVM. This
- package uses PVM.
- .
- There are packages for the shared libraries, for the static libraries and
- the development files and for test programs (this one).
- .
- Also included: PBLAS, Parallel Basic Linear Algebra Subprograms.
-
-Package: scalapack-test-common
-Architecture: all
-Depends: ${misc:Depends}
-Suggests: scalapack-lam-test | scalapack-mpich-test | scalapack-pvm-test
-Description: Test data for ScaLAPACK testers
- ScaLAPACK is the parallel version of LAPACK and is used on Beowulf type
- clusters.
- .
- You can choose between an implementation based on MPI or PVM. This package
- provides test data for all ScaLAPACK packages (MPICH, LAM and PVM versions).
diff --git a/debian/libscalapack-mpi-dev.dirs b/debian/libscalapack-mpich-dev.dirs
similarity index 100%
copy from debian/libscalapack-mpi-dev.dirs
copy to debian/libscalapack-mpich-dev.dirs
diff --git a/debian/libscalapack-mpich-dev.install b/debian/libscalapack-mpich-dev.install
new file mode 100755
index 0000000..5ef3f29
--- /dev/null
+++ b/debian/libscalapack-mpich-dev.install
@@ -0,0 +1,4 @@
+#! /usr/bin/dh-exec
+libscalapack-mpich.so usr/lib/${DEB_HOST_MULTIARCH}
+# usr/lib/pkgconfig/scalapack.pc
+# usr/lib/cmake/scalapack-2.0.2/scalapack-*.cmake
diff --git a/debian/libscalapack-mpich1.install b/debian/libscalapack-mpich2.install
similarity index 100%
rename from debian/libscalapack-mpich1.install
rename to debian/libscalapack-mpich2.install
diff --git a/debian/libscalapack-mpi-dev.dirs b/debian/libscalapack-openmpi-dev.dirs
similarity index 100%
rename from debian/libscalapack-mpi-dev.dirs
rename to debian/libscalapack-openmpi-dev.dirs
diff --git a/debian/libscalapack-openmpi-dev.install b/debian/libscalapack-openmpi-dev.install
new file mode 100755
index 0000000..e2c19bd
--- /dev/null
+++ b/debian/libscalapack-openmpi-dev.install
@@ -0,0 +1,4 @@
+#! /usr/bin/dh-exec
+libscalapack-openmpi.so usr/lib/${DEB_HOST_MULTIARCH}
+# usr/lib/pkgconfig/scalapack.pc
+# usr/lib/cmake/scalapack-2.0.2/scalapack-*.cmake
diff --git a/debian/libscalapack-openmpi1.install b/debian/libscalapack-openmpi2.install
similarity index 100%
rename from debian/libscalapack-openmpi1.install
rename to debian/libscalapack-openmpi2.install
diff --git a/debian/patches/series b/debian/patches/series
index 2de3038..9f742e6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,29 +1,30 @@
-01_SLmake.inc.patch
-02_GEMR2D.dat.patch
-03_PCBLAST1TIM.dat.patch
-04_PCBLAS1TST.dat.patch
-05_PCBLAS2TIM.dat.patch
-06_PCBLAS2TST.dat.patch
-07_PCBLAS3TIM.dat.patch
-08_PCBLAS3TST.dat.patch
-09_PDBLAS1TIM.dat.patch
-10_PDBLAS1TST.dat.patch
-11_PDBLAS2TIM.dat.patch
-12_PDBLAS2TST.dat.patch
-13_PDBLAS3TIM.dat.patch
-14_PDBLAS3TST.dat.patch
-15_PSBLAS1TIM.dat.patch
-16_PSBLAS1TST.dat.patch
-17_PSBLAS2TIM.dat.patch
-18_PSBLAS2TST.dat.patch
-19_PSBLAS3TIM.dat.patch
-20_PSBLAS3TST.dat.patch
-21_PZBLAS1TIM.dat.patch
-22_PZBLAS1TST.dat.patch
-23_PZBLAS2TIM.dat.patch
-24_PZBLAS2TST.dat.patch
-25_PZBLAS3TIM.dat.patch
-26_PZBLAS3TST.dat.patch
-27_TRMR2D.dat.patch
-28_PBtools.h.patch
-29_clang.diff
+#01_SLmake.inc.patch
+#02_GEMR2D.dat.patch
+#03_PCBLAST1TIM.dat.patch
+#04_PCBLAS1TST.dat.patch
+#05_PCBLAS2TIM.dat.patch
+#06_PCBLAS2TST.dat.patch
+#07_PCBLAS3TIM.dat.patch
+#08_PCBLAS3TST.dat.patch
+#09_PDBLAS1TIM.dat.patch
+#10_PDBLAS1TST.dat.patch
+#11_PDBLAS2TIM.dat.patch
+#12_PDBLAS2TST.dat.patch
+#13_PDBLAS3TIM.dat.patch
+#14_PDBLAS3TST.dat.patch
+#15_PSBLAS1TIM.dat.patch
+#16_PSBLAS1TST.dat.patch
+#17_PSBLAS2TIM.dat.patch
+#18_PSBLAS2TST.dat.patch
+#19_PSBLAS3TIM.dat.patch
+#20_PSBLAS3TST.dat.patch
+#21_PZBLAS1TIM.dat.patch
+#22_PZBLAS1TST.dat.patch
+#23_PZBLAS2TIM.dat.patch
+#24_PZBLAS2TST.dat.patch
+#25_PZBLAS3TIM.dat.patch
+#26_PZBLAS3TST.dat.patch
+#27_TRMR2D.dat.patch
+#28_PBtools.h.patch
+#29_clang.diff
+sharedlibs-soname.patch
diff --git a/debian/patches/sharedlibs-soname.patch b/debian/patches/sharedlibs-soname.patch
new file mode 100644
index 0000000..a6edf5e
--- /dev/null
+++ b/debian/patches/sharedlibs-soname.patch
@@ -0,0 +1,66 @@
+Index: scalapack-2.0.2/CMakeLists.txt
+===================================================================
+--- scalapack-2.0.2.orig/CMakeLists.txt
++++ scalapack-2.0.2/CMakeLists.txt
+@@ -7,6 +7,11 @@ configure_file(
+   COPYONLY
+ )
+ 
++set(SCALAPACK_MAJOR_VERSION 2)
++set(SCALAPACK_MINOR_VERSION 0)
++set(SCALAPACK_PATCH_VERSION 2)
++set(SCALAPACK_VERSION "${SCALAPACK_MAJOR_VERSION}.${SCALAPACK_MINOR_VERSION}.${SCALAPACK_PATCH_VERSION}")
++
+ # Add the CMake directory for custon CMake modules
+ set(CMAKE_MODULE_PATH "${SCALAPACK_SOURCE_DIR}/CMAKE" ${CMAKE_MODULE_PATH})
+ 
+@@ -231,14 +236,32 @@ append_subdir_files(src "SRC")
+ append_subdir_files(src-C "SRC")
+ 
+ if (UNIX)
++   MESSAGE(STATUS "Building only static")
++   if(BUILD_SHARED_LIBS)
++   add_library(scalapack SHARED ${blacs} ${tools} ${tools-C} ${extra_lapack} ${pblas} ${pblas-F} ${ptzblas} ${ptools} ${pbblas} ${redist} ${src} ${src-C})
++   set_target_properties(scalapack PROPERTIES OUTPUT_NAME scalapack-${MPI_FLAVOR} )
++   set_target_properties(scalapack PROPERTIES
++    VERSION ${SCALAPACK_MAJOR_VERSION}.${SCALAPACK_MINOR_VERSION}.${SCALAPACK_PATCH_VERSION}
++    SOVERSION ${SCALAPACK_MAJOR_VERSION}.${SCALAPACK_MINOR_VERSION})
++   else()
+    add_library(scalapack ${blacs} ${tools} ${tools-C} ${extra_lapack} ${pblas} ${pblas-F} ${ptzblas} ${ptools} ${pbblas} ${redist} ${src} ${src-C})
++   endif()
+    target_link_libraries( scalapack ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
+    scalapack_install_library(scalapack)
+ else (UNIX) # Need to separate Fortran and C Code
++   MESSAGE(STATUS "Building shared")
+    OPTION(BUILD_SHARED_LIBS "Build shared libraries" ON )
+-   add_library(scalapack ${blacs} ${tools-C} ${pblas} ${ptools} ${redist} ${src-C})
++   add_library(scalapack SHARED ${blacs} ${tools-C} ${pblas} ${ptools} ${redist} ${src-C})
++   set_target_properties(scalapack PROPERTIES OUTPUT_NAME scalapack-${MPI_FLAVOR})
++   set_target_properties(scalapack PROPERTIES
++    VERSION ${SCALAPACK_MAJOR_VERSION}.${SCALAPACK_MINOR_VERSION}.${SCALAPACK_PATCH_VERSION}
++    SOVERSION ${SCALAPACK_MAJOR_VERSION}.${SCALAPACK_MINOR_VERSION})
+    target_link_libraries( scalapack ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
+-   add_library(scalapack-F ${pblas-F} ${pbblas} ${ptzblas} ${tools} ${src} ${extra_lapack} )
++   add_library(scalapack-F SHARED ${pblas-F} ${pbblas} ${ptzblas} ${tools} ${src} ${extra_lapack} )
++   set_target_properties(scalapack-F PROPERTIES OUTPUT_NAME scalapack-F-${MPI_FLAVOR})
++   set_target_properties(scalapack-F PROPERTIES
++    VERSION ${SCALAPACK_MAJOR_VERSION}.${SCALAPACK_MINOR_VERSION}.${SCALAPACK_PATCH_VERSION}
++    SOVERSION ${SCALAPACK_MAJOR_VERSION}.${SCALAPACK_MINOR_VERSION})
+    target_link_libraries( scalapack-F ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
+    scalapack_install_library(scalapack)
+    scalapack_install_library(scalapack-F)
+@@ -251,10 +274,10 @@ add_subdirectory(TESTING)
+ SET(CPACK_PACKAGE_NAME "ScaLAPACK")
+ SET(CPACK_PACKAGE_VENDOR "University of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd")
+ SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "ScaLAPACK- Linear Algebra Package")
+-set(SCALAPACK_VERSION 2.0.2)
+-set(CPACK_PACKAGE_VERSION_MAJOR 2)
+-set(CPACK_PACKAGE_VERSION_MINOR 0)
+-set(CPACK_PACKAGE_VERSION_PATCH 2)
++#set(SCALAPACK_VERSION 2.0.2)
++set(CPACK_PACKAGE_VERSION_MAJOR ${SCALAPACK_MAJOR_VERSION})
++set(CPACK_PACKAGE_VERSION_MINOR ${SCALAPACK_MINOR_VERSION})
++set(CPACK_PACKAGE_VERSION_PATCH ${SCALAPACK_PATCH_VERSION})
+ set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
+ SET(CPACK_PACKAGE_INSTALL_DIRECTORY "SCALAPACK")
+ IF(WIN32 AND NOT UNIX)
diff --git a/debian/rules b/debian/rules
index 9bd3cf9..841de62 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,505 +1,60 @@
 #! /usr/bin/make -f
-# Made with the aid of debmake, by Christoph Lameter,
-# based on the sample debian/rules file for GNU hello by Ian Jackson.
-# Handmodified by P. Frauenfelder for debhelper support, 5 Sept 1998
 
 
-package=scalapack
+# eventually add -O3 -march=native -mtune=native
+export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
+export DEB_CXXFLAGS_MAINT_APPEND  = -Wall -pedantic
+export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
+export DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
-version:=$(shell dpkg-parsechangelog | grep Version: | cut -d ' ' -f 2 | cut -d '-' -f 1)
-version_major:=$(shell echo $(version) | cut -d '.' -f 1)
+ifneq (,$(wildcard /usr/share/mpi-default-dev/debian_defaults))
+include /usr/share/mpi-default-dev/debian_defaults 
+endif
+DEFAULT_MPI=$(ARCH_DEFAULT_MPI_IMPL)
 
-topdir=$(shell pwd)
+%:
+	dh $@ --buildsystem=cmake  --parallel
 
-DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+#export OMPI_MCA_plm_rsh_agent=/bin/false                #workaround to start MPI-applications in chroot
+export OMPI_MCA_orte_rsh_agent=/bin/false                #workaround to start MPI-applications in chroot
 
-include /usr/share/mpi-default-dev/debian_defaults
-SCALAPACK_MPI=$(ARCH_DEFAULT_MPI_IMPL)
+disable_mpi_archs = armel armhf kfreebsd-amd64 kfreebsd-i386 mips mipsel
+export LD_LIBRARY_PATH :=  $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH):$(LD_LIBRARY_PATH); 
 
-# This list of archs is maintained separately from that of the mpi-defaults
-# package. If there is a mismatch between the two, the package will FTBFS. This
-# is on purpose, to avoid silent breakage. See #740620 for more details.
-OPENMPI_ARCHS=alpha amd64 arm64 armel armhf hppa hurd-i386 i386 kfreebsd-amd64 kfreebsd-i386 mips mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390x sparc64 x32
-MPICH_ARCHS=m68k sh4
+export NUMJOBS=1
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+export NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+endif
 
-build-arch: build
+extra_flags += \
+ -DBUILD_SHARED_LIBS=ON
 
-build-indep: build
-
-build: build-$(SCALAPACK_MPI) build-pvm
-
-build-openmpi: build-stamp-openmpi
-
-build-lam: build-stamp-lam
-
-build-mpich: build-stamp-mpich
-
-build-mpich2: build-stamp-mpich2
-
-build-pvm: build-stamp-pvm
-
-build-stamp-openmpi:
-	dh_testdir
-
-# next is a clean
-	echo *** cleaning object files ***
-	BASEDIR=$(topdir) make clean
-
-# build the shared libraries
-	echo *** building shared libraries for openmpi ***
-	BASEDIR=$(topdir) MPI=openmpi FPIC=-fPIC make lib
-	mkdir -p tmp
-	set -e ;\
-	for i in scalapack ; do \
-	  cd tmp ;\
-	  ar x ../$${i}_openmpi.a ;\
-	  cd .. ;\
-	  gcc -shared -Wl,-soname=lib$$i-openmpi.so.$(version_major) -o \
-	    lib$$i-openmpi.so.$(version) tmp/*.o -lblas -llapack -lblacsCinit-openmpi -lblacs-openmpi $(shell pkg-config mpi-fort --libs) -lgfortran -lm;\
-	  ln -snf lib$$i-openmpi.so.$(version) lib$$i-openmpi.so.$(version_major) ;\
-	  ln -snf lib$$i-openmpi.so.$(version_major) lib$$i-openmpi.so ;\
-	  rm tmp/* ;\
-	done
-	rmdir tmp
-#	for i in $$(find -name "*.f"); do \
-#		if grep '^[^\*].*TOTMEM *= *' $$i | grep -v 64000000 >/dev/null ; then \
-#		cat $$i | sed 's,\(^[^\*].*TOTMEM *= *\)[0-9]*,\164000000,g' >tmp ;\
-#		mv tmp $$i;\
-#		fi;\
-#	done
-
-# the testing binaries
-	echo *** building static testing binaries for openmpi ***
-	BASEDIR=$(topdir) MPI=openmpi BUILD=shared make exe
-	set -e ;\
-	cd TESTING ;\
-	for i in $$(find -name 'x*' -maxdepth 1 ! -name 'x*-lam' ! -name 'x*-mpich' ! -name 'x*-pvm'); do \
-	  mv $$i $$i-openmpi ;\
-	done
-
-# next is a clean
-	echo *** cleaning object files ***
-	BASEDIR=$(topdir) make clean
-
-# build the static libraries
-	echo *** building static libraries for openmpi ***
-	BASEDIR=$(topdir) MPI=openmpi make lib
-
-	touch build-stamp-openmpi
-
-build-stamp-lam:
-	dh_testdir
-
-# next is a clean
-	echo *** cleaning object files ***
-	BASEDIR=$(topdir) make clean
-
-# build the shared libraries
-	echo *** building shared libraries for lam ***
-	BASEDIR=$(topdir) MPI=lam FPIC=-fPIC make lib
-	mkdir -p tmp
-	set -e ;\
-	for i in scalapack ; do \
-	  cd tmp ;\
-	  ar x ../$${i}_lam.a ;\
-	  cd .. ;\
-	  gcc -shared -Wl,-soname=lib$$i-lam.so.$(version_major) -o \
-	    lib$$i-lam.so.$(version) tmp/*.o -lblas -llapack -lblacsCinit-lam -lblacs-lam -llam -lgfortran -lm;\
-	  ln -snf lib$$i-lam.so.$(version) lib$$i-lam.so.$(version_major) ;\
-	  ln -snf lib$$i-lam.so.$(version_major) lib$$i-lam.so ;\
-	  rm tmp/* ;\
-	done
-	rmdir tmp
-#	for i in $$(find -name "*.f"); do \
-#		if grep '^[^\*].*TOTMEM *= *' $$i | grep -v 64000000 >/dev/null ; then \
-#		cat $$i | sed 's,\(^[^\*].*TOTMEM *= *\)[0-9]*,\164000000,g' >tmp ;\
-#		mv tmp $$i;\
-#		fi;\
-#	done
-
-# the testing binaries
-	echo *** building static testing binaries for lam ***
-	BASEDIR=$(topdir) MPI=lam BUILD=shared make exe
-	set -e ;\
-	cd TESTING ;\
-	for i in $$(find -name 'x*' -maxdepth 1 ! -name 'x*-openmpi' ! -name 'x*-mpich' ! -name 'x*-pvm'); do \
-	  mv $$i $$i-lam ;\
-	done
-
-# next is a clean
-	echo *** cleaning object files ***
-	BASEDIR=$(topdir) make clean
-
-# build the static libraries
-	echo *** building static libraries for lam ***
-	BASEDIR=$(topdir) MPI=lam make lib
-
-	touch build-stamp-lam
-
-build-stamp-mpich:
-	dh_testdir
-
-# next is a clean
-	echo *** cleaning object files ***
-	BASEDIR=$(topdir) make clean
-
-# build the shared libraries
-	echo *** building shared libraries for mpich ***
-	BASEDIR=$(topdir) MPI=mpich FPIC=-fPIC make lib
-	mkdir -p tmp
-	set -e ;\
-	for i in scalapack ; do \
-	  cd tmp ;\
-	  ar x ../$${i}_mpich.a ;\
-	  cd .. ;\
-	  gcc -shared -Wl,-soname=lib$$i-mpich.so.$(version_major) -o \
-	    lib$$i-mpich.so.$(version) tmp/*.o -lblas -llapack -lblacsCinit-mpich -lblacs-mpich -L /usr/lib/mpich/lib/shared -lmpich -lgfortran -lm;\
-	  ln -snf lib$$i-mpich.so.$(version) lib$$i-mpich.so.$(version_major) ;\
-	  ln -snf lib$$i-mpich.so.$(version_major) lib$$i-mpich.so ;\
-	  rm tmp/* ;\
-	done
-	rmdir tmp
-
-# the testing binaries
-	echo *** building static testing binaries for mpich ***
-	BASEDIR=$(topdir) MPI=mpich BUILD=shared make exe
-	set -e ;\
-	cd TESTING ;\
-	for i in $$(find -name 'x*'  -maxdepth 1 ! -name 'x*-openmpi' ! -name 'x*-lam' ! -name 'x*-pvm'); do \
-	  mv $$i $$i-mpich ;\
-	done
-
-# next is a clean
-	echo *** cleaning object files ***
-	BASEDIR=$(topdir) make clean
-
-# build the static libraries
-	echo *** building static libraries for mpich ***
-	BASEDIR=$(topdir) MPI=mpich make lib
-
-	touch build-stamp-mpich
-
-build-stamp-mpich2:
-	dh_testdir
-
-# next is a clean
-	echo *** cleaning object files ***
-	BASEDIR=$(topdir) make clean
-
-# build the shared libraries
-	echo *** building shared libraries for mpich2 ***
-	BASEDIR=$(topdir) MPI=mpich2 FPIC=-fPIC make lib
-	mkdir -p tmp
-	set -e ;\
-	for i in scalapack ; do \
-	  cd tmp ;\
-	  ar x ../$${i}_mpich2.a ;\
-	  cd .. ;\
-	  gcc -shared -Wl,-soname=lib$$i-mpich2.so.$(version_major) -o \
-	    lib$$i-mpich2.so.$(version) tmp/*.o -lblas -llapack -lblacsCinit-mpich2 -lblacs-mpich2 -lmpich -lmpl -lgfortran -lm;\
-	  ln -snf lib$$i-mpich2.so.$(version) lib$$i-mpich2.so.$(version_major) ;\
-	  ln -snf lib$$i-mpich2.so.$(version_major) lib$$i-mpich2.so ;\
-	  rm tmp/* ;\
-	done
-	rmdir tmp
-#	for i in $$(find -name "*.f"); do \
-#		if grep '^[^\*].*TOTMEM *= *' $$i | grep -v 64000000 >/dev/null ; then \
-#		cat $$i | sed 's,\(^[^\*].*TOTMEM *= *\)[0-9]*,\164000000,g' >tmp ;\
-#		mv tmp $$i;\
-#		fi;\
-#	done
-
-# the testing binaries
-	echo *** building static testing binaries for mpich2 ***
-	BASEDIR=$(topdir) MPI=mpich2 BUILD=shared make exe
-	set -e ;\
-	cd TESTING ;\
-	for i in $$(find -name 'x*' -maxdepth 1 ! -name 'x*-openmpi' ! -name 'x*-mpich*' ! -name 'x*-pvm'); do \
-	  mv $$i $$i-mpich2 ;\
-	done
-
-# next is a clean
-	echo *** cleaning object files ***
-	BASEDIR=$(topdir) make clean
-
-# build the static libraries
-	echo *** building static libraries for mpich2 ***
-	BASEDIR=$(topdir) MPI=mpich2 make lib
-
-	touch build-stamp-mpich2
-
-build-stamp-pvm:
-	dh_testdir
-
-# next is a clean
-	echo *** cleaning object files ***
-	BASEDIR=$(topdir) make clean
-
-# build the shared libraries
-	echo *** building shared libraries for pvm ***
-	BASEDIR=$(topdir) MPI=pvm FPIC=-fPIC make lib
-	mkdir -p tmp
-	set -e ;\
-	for i in scalapack ; do \
-	  cd tmp ;\
-	  ar x ../$${i}_pvm.a ;\
-	  cd .. ;\
-	  gcc -shared -Wl,-soname=lib$$i-pvm.so.$(version_major) -o \
-	    lib$$i-pvm.so.$(version) tmp/*.o -lblas -llapack -lblacs-pvm -lpvm3 -lgfortran -lm;\
-	  ln -snf lib$$i-pvm.so.$(version) lib$$i-pvm.so.$(version_major) ;\
-	  ln -snf lib$$i-pvm.so.$(version_major) lib$$i-pvm.so ;\
-	  rm tmp/* ;\
-	done
-	rmdir tmp
-
-# the testing binaries
-	echo *** building static testing binaries for pvm ***
-	BASEDIR=$(topdir) MPI=pvm BUILD=shared make exe
-	set -e ;\
-	cd TESTING ;\
-	for i in $$(find -name 'x*'  -maxdepth 1 ! -name 'x*-openmpi' ! -name 'x*-lam' ! -name 'x*-mpich*'); do \
-	  mv $$i $$i-pvm ;\
-	done
-
-# next is a clean
-	echo *** cleaning object files ***
-	BASEDIR=$(topdir) make clean
-
-# build the static libraries
-	echo *** building static libraries for pvm ***
-	BASEDIR=$(topdir) MPI=pvm make lib
-
-	touch build-stamp-pvm
-
-clean:
-	dh_testdir
-	dh_testroot
-	rm -f build-stamp-* install-stamp-* install-dirs-stamp
-	BASEDIR=$(topdir) make clean
-	rm -f *.a
-	rm -f *so*
-	rm -f TESTING/x*
-	rm -fr tmp
-	rm -f PBLAS/TIMING/PB_Cabort.c PBLAS/TIMING/PB_Cwarn.c PBLAS/TESTING/PB_Cabort.c PBLAS/TESTING/PB_Cwarn.c
-#	for i in $$(find -name "*.f"); do \
-#		if grep '^[^\*].*TOTMEM *= *' $$i | grep 64000000 >/dev/null ; then\
-#		cat $$i | sed -e 's/\(^[^\*].*TOTMEM *= *\)[0-9]*,/\12000000,/g' -e 's/\(^[^\*].*TOTMEM *= *\)[0-9]*\( *)\)/\13000000\2/g'>tmp ;\
-#		mv tmp $$i;\
-#		fi;\
-#	done
-	dh_clean
-
-	{ \
-	  echo "# This file is autogenerated. DO NOT EDIT!" ; \
-	  echo "#" ; \
-	  echo "# Modifications should be made to debian/control.in instead." ; \
-	  echo "# This file is regenerated automatically in the clean target." ; \
-	  echo ; \
-	  sed "s/@OPENMPI_ARCHS@/$(OPENMPI_ARCHS)/g;s/@MPICH_ARCHS@/$(MPICH_ARCHS)/g;" debian/control.in ; } \
-	> debian/control
-
-install: install-dirs install-$(SCALAPACK_MPI) install-pvm
-
-install-dirs: install-dirs-stamp
-
-install-dirs-stamp:
-	dh_testdir
-	dh_testroot
-	dh_prep
-	dh_installdirs -v
-
-	touch install-dirs-stamp
-
-install-openmpi: install-stamp-openmpi
-
-install-lam: install-stamp-lam
-
-install-mpich: install-stamp-mpich
-
-install-mpich2: install-stamp-mpich2
-
-install-pvm: install-stamp-pvm
-
-install-stamp-openmpi: build-stamp-openmpi
-	dh_testdir
-	dh_testroot
-
-	# The shared library is installed via debian/*.install, to avoid
-	# creating an empty package if default MPI implementation changes on
-	# the arch
-	dh_install
-
-	set -e ;\
-	for i in scalapack ; do \
-	  cp -a lib$$i-openmpi.so \
-	    `pwd`/debian/libscalapack-mpi-dev/usr/lib/$(DEB_HOST_MULTIARCH)/ ;\
-	done
-
-	install TESTING/x*-openmpi \
-	  `pwd`/debian/scalapack-mpi-test/usr/lib/scalapack
-
-	set -e ;\
-	for i in scalapack ; do \
-	  install $${i}_openmpi.a \
-	    `pwd`/debian/libscalapack-mpi-dev/usr/lib/$(DEB_HOST_MULTIARCH)/lib$$i-openmpi.a ;\
-	done
-
-	touch install-stamp-openmpi
-
-install-stamp-lam: build-stamp-lam
-	dh_testdir
-	dh_testroot
-
-	set -e ;\
-	for i in scalapack ; do \
-	  cp -a lib$$i-lam.so.* \
-	    `pwd`/debian/libscalapack-mpi1/usr/lib/$(DEB_HOST_MULTIARCH)/ ;\
-	  cp -a lib$$i-lam.so \
-	    `pwd`/debian/libscalapack-mpi-dev/usr/lib/$(DEB_HOST_MULTIARCH)/ ;\
-	done
-
-	install TESTING/x*-lam \
-	  `pwd`/debian/scalapack-mpi-test/usr/lib/scalapack
-
-	set -e ;\
-	for i in scalapack ; do \
-	  install $${i}_lam.a \
-	    `pwd`/debian/libscalapack-mpi-dev/usr/lib/$(DEB_HOST_MULTIARCH)/lib$$i-lam.a ;\
-	done
-
-	touch install-stamp-lam
-
-install-stamp-mpich: build-stamp-mpich
-	dh_testdir
-	dh_testroot
-
-	# The shared library is installed via debian/*.install, to avoid
-	# creating an empty package if default MPI implementation changes on
-	# the arch
-	dh_install
-
-	set -e ;\
-	for i in scalapack ; do \
-	  cp -a lib$$i-mpich.so \
-	    `pwd`/debian/libscalapack-mpi-dev/usr/lib/$(DEB_HOST_MULTIARCH)/ ;\
-	done
-
-	install TESTING/x*-mpich \
-	  `pwd`/debian/scalapack-mpi-test/usr/lib/scalapack
-
-	set -e ;\
-	for i in scalapack ; do \
-	  install $${i}_mpich.a \
-	    `pwd`/debian/libscalapack-mpi-dev/usr/lib/$(DEB_HOST_MULTIARCH)/lib$$i-mpich.a ;\
-	done
-
-	touch install-stamp-mpich
-
-install-stamp-mpich2: build-stamp-mpich2
-	dh_testdir
-	dh_testroot
-
-	set -e ;\
-	for i in scalapack ; do \
-	  cp -a lib$$i-mpich2.so.* \
-	    `pwd`/debian/libscalapack-mpi1/usr/lib/$(DEB_HOST_MULTIARCH)/ ;\
-	  cp -a lib$$i-mpich2.so \
-	    `pwd`/debian/libscalapack-mpi-dev/usr/lib/$(DEB_HOST_MULTIARCH)/ ;\
-	done
-
-	install TESTING/x*-mpich2 \
-	  `pwd`/debian/scalapack-mpi-test/usr/lib/scalapack
-
-	set -e ;\
-	for i in scalapack ; do \
-	  install $${i}_mpich2.a \
-	    `pwd`/debian/libscalapack-mpi-dev/usr/lib/$(DEB_HOST_MULTIARCH)/lib$$i-mpich2.a ;\
-	done
-
-	touch install-stamp-mpich2
-
-install-stamp-pvm: build-stamp-pvm
-	dh_testdir
-	dh_testroot
-
-	set -e ;\
-	for i in scalapack ; do \
-	  cp -a lib$$i-pvm.so.* \
-	    `pwd`/debian/libscalapack-pvm1/usr/lib/$(DEB_HOST_MULTIARCH)/ ;\
-	  cp -a lib$$i-pvm.so \
-	    `pwd`/debian/libscalapack-pvm-dev/usr/lib/$(DEB_HOST_MULTIARCH)/ ;\
+override_dh_auto_configure:
+	for flavor in openmpi mpich; do \
+          echo "Configure for libscalapack-$$flavor" ; \
+          dh_auto_configure --builddirectory=build-$$flavor -- $(extra_flags) -DMPI_C_COMPILER=mpicc.$$flavor -DMPI_Fortran_COMPILER=mpif90.$$flavor -DMPI_FLAVOR=$$flavor ; \
 	done
 
-	install TESTING/x*-pvm \
-	  `pwd`/debian/scalapack-pvm-test/usr/lib/scalapack
-
-	set -e ;\
-	for i in scalapack ; do \
-	  install $${i}_pvm.a \
-	    `pwd`/debian/libscalapack-pvm-dev/usr/lib/$(DEB_HOST_MULTIARCH)/lib$$i-pvm.a ;\
+override_dh_auto_build:
+	for flavor in openmpi mpich; do \
+	  echo "Building libscalapack-$$flavor" ; \
+	  dh_auto_build -O--parallel --builddirectory=build-$$flavor ; \
 	done
 
-	touch install-stamp-pvm
-
-binary-arch: build install
-	dh_testdir
-	dh_testroot
-	dh_installdocs README
-	dh_installexamples
-	dh_installchangelogs
-	dh_link
-	dh_compress
-	dh_fixperms
-	dh_strip
-	dh_makeshlibs -V
-	dh_installdeb
-	dh_shlibdeps
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
-
-install-indep: install-stamp-indep
-
-install-stamp-indep:
-	dh_testdir -i
-	dh_testroot -i
-	dh_installdirs -i
-
-	set -e ;\
-	for i in $$(find TESTING -name '*.dat') ; do \
-	  install -m 644 $$i \
-	    `pwd`/debian/scalapack-test-common/usr/share/scalapack ;\
-	done
-	set -e ;\
-	for i in $$(find REDIST/TESTING -name '*.dat') ; do \
-	  install -m 644 $$i \
-	    `pwd`/debian/scalapack-test-common/usr/share/scalapack ;\
-	done
-	set -e ;\
-	for i in $$(find PBLAS -name '*.dat') ; do \
-	  install -m 644 $$i \
-	    `pwd`/debian/scalapack-test-common/usr/share/scalapack ;\
+override_dh_auto_install:
+	echo "scalapack-mpi-dev=libscalapack-$(DEFAULT_MPI)-dev" > debian/libscalapack-mpi-dev.substvars
+	for flavor in openmpi mpich; do \
+	  echo "Installing scalapack-$$flavor" ; \
+	  dh_auto_install -O--parallel --builddirectory=build-$$flavor ; \
 	done
+	dh_install --list-missing
 
-	touch install-stamp-indep
-
-binary-indep: install-indep
-	dh_testdir -i
-	dh_testroot -i
-	dh_installdocs -i README
-	dh_installchangelogs -i
-	dh_link -i
-	dh_compress -i
-	dh_strip -i
-	dh_fixperms -i
-	dh_installdeb -i
-	dh_gencontrol -i
-	dh_md5sums -i
-	dh_builddeb -i
-
-source diff:
-	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
-
-binary: binary-arch binary-indep
+# add --max-parallel=1 to force test in sequential mode
+# MPICH testsuite disabled as some tests fail -- why???
+override_dh_auto_test:
+	MPIEXEC="mpiexec --allow-run-as-root --oversubscribe -np " dh_auto_test --builddirectory=build-openmpi
+	# for flavor in openmpi mpich; do \
+	#   echo "Running tests for libscalapack-$$flavor" ; \
+	#   MPIEXEC="mpiexec.$$flavor --allow-run-as-root --oversubscribe -np " dh_auto_test --builddirectory=build-$$flavor ; \
+	# done
 
-.PHONY: binary binary-indep binary-arch clean build build-arch build-indep

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



More information about the debian-science-commits mailing list