[petsc4py] 03/05: update debian build scripts

Drew Parsons dparsons at moszumanska.debian.org
Sat Oct 31 08:37:24 UTC 2015


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

dparsons pushed a commit to branch master
in repository petsc4py.

commit 7ca186067d8f1d95d32d3eedea7c2c8a504e8d17
Author: Drew parsons <dparsons at debian.org>
Date:   Sat Oct 31 14:02:44 2015 +0800

    update debian build scripts
---
 debian/compat                |  2 +-
 debian/control               |  5 +++-
 debian/doc-base              | 16 +++++++++++++
 debian/docs                  |  5 +++-
 debian/examples              |  1 +
 debian/info                  |  1 +
 debian/manpages              |  1 +
 debian/patches/openmpi.patch | 24 -------------------
 debian/patches/series        |  1 -
 debian/rules                 | 57 +++++++++++++++++++++++++++++++-------------
 debian/source/format         |  2 +-
 11 files changed, 70 insertions(+), 45 deletions(-)

diff --git a/debian/compat b/debian/compat
index 7ed6ff8..ec63514 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-5
+9
diff --git a/debian/control b/debian/control
index e0e3c1a..a953872 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,10 @@ Priority: extra
 Maintainer: Debian Science Maintainers <debian-science-maintainers at lists.alioth.debian.org>
 Uploaders: Drew Parsons <dparsons at debian.org>
 Standards-Version: 3.9.6
-Build-Depends: cdbs (>=0.4.41), debhelper (>= 5), python-support (>= 0.7.5), python-all-dev (>=2.3.5-11), python-numpy (>= 1:1.4.1-4~), petsc-dev (>= 3.6), chrpath (>= 0.13-2), quilt (>= 0.46-4), libhdf5-openmpi-dev
+Build-Depends: debhelper (>= 9), dh-python, python-all-dev (>=2.3.5-11), python-numpy (>= 1:1.4.1-4~),
+ petsc-dev (>= 3.6),
+ mpi-default-dev, libhdf5-openmpi-dev
+X-Python-Version: >= 2.6
 Homepage: https://bitbucket.org/petsc/petsc4py
 Vcs-Git: git://anonscm.debian.org/debian-science/packages/petsc4py.git
 Vcs-Browser: http://anonscm.debian.org/cgit/debian-science/packages/petsc4py.git/
diff --git a/debian/doc-base b/debian/doc-base
new file mode 100644
index 0000000..76b808b
--- /dev/null
+++ b/debian/doc-base
@@ -0,0 +1,16 @@
+Document: petsc4py
+Title: Debian petsc4py Manual
+Author: Lisandro Dalcin
+Abstract: API and other documentation for petsc4py
+Section: Science/Mathematics
+
+Format: PDF
+Files: /usr/share/doc/python-petsc4py/petsc4py.pdf
+
+Format: Info
+Index: /usr/share/info/petsc4py.info.gz
+Files: /usr/share/info/petsc4py.info.gz
+
+Format: HTML
+Index: /usr/share/doc/python-petsc4py/index.html
+Files: /usr/share/doc/python-petsc4py/*.html /usr/share/doc/python-petsc4py/apiref/*.html /usr/share/doc/python-petsc4py/usrman/*.html
diff --git a/debian/docs b/debian/docs
index 71dfd5b..05ff434 100644
--- a/debian/docs
+++ b/debian/docs
@@ -1 +1,4 @@
-README.txt
+docs/petsc4py.pdf
+docs/*.html
+docs/apiref
+docs/usrman
diff --git a/debian/examples b/debian/examples
new file mode 100644
index 0000000..1549b67
--- /dev/null
+++ b/debian/examples
@@ -0,0 +1 @@
+demo
diff --git a/debian/info b/debian/info
new file mode 100644
index 0000000..a618ed0
--- /dev/null
+++ b/debian/info
@@ -0,0 +1 @@
+docs/petsc4py.info
diff --git a/debian/manpages b/debian/manpages
new file mode 100644
index 0000000..fa5b9de
--- /dev/null
+++ b/debian/manpages
@@ -0,0 +1 @@
+docs/petsc4py.1
diff --git a/debian/patches/openmpi.patch b/debian/patches/openmpi.patch
deleted file mode 100644
index e4c1367..0000000
--- a/debian/patches/openmpi.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From d77d7c016608895ae04ffc14655b0f52d03b5368 Mon Sep 17 00:00:00 2001
-From: SVN-Git Migration <python-modules-team at lists.alioth.debian.org>
-Date: Thu, 8 Oct 2015 10:11:51 -0700
-Subject: openmpi
-
-Add mpi include directory to perform build
-
-Patch-Name: openmpi.patch
----
- setup.py | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/setup.py b/setup.py
-index 25ecb3c..4ff9599 100755
---- a/setup.py
-+++ b/setup.py
-@@ -72,6 +72,7 @@ def get_ext_modules(Extension):
-                                ],
-                       include_dirs=['src/include',
-                                     'src/source',
-+                                    '/usr/include/mpi',
-                                     ] + numpy_includes,
-                       depends=depends)]
- 
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 4ae50cf..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1 +0,0 @@
-openmpi.patch
diff --git a/debian/rules b/debian/rules
index e621a79..df8a732 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,25 +1,50 @@
 #!/usr/bin/make -f
-# -*- makefile -*-
+# See debhelper(7) (uncomment to enable)
+# output every command that modifies files on the build system.
+#export DH_VERBOSE = 1
 
-DEB_PYTHON_SYSTEM=pysupport
+export PYBUILD_NAME = petsc4py
 
-DEB_INSTALL_EXAMPLES_python-petsc4py := demo
+# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/default.mk
 
-# Export environment variables to avoid FTBFS when looking for PETSC_DIR and
-# PETSC_ARCH. Eventually replace the two lines below with a proper solution.
-export PETSC_DIR=/usr/lib/petsc
-export PETSC_ARCH=linux-gnu-c-opt
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
-include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/class/python-distutils.mk
-include /usr/share/cdbs/1/rules/patchsys-quilt.mk
+PETSC_VERSION=3.6.2$(PETSC_EXT)
+PETSC_DIR=/usr/lib/petscdir/$(PETSC_VERSION)/$(DEB_HOST_MULTIARCH)-real
 
-python-build-stamp-%:
-	cd $(DEB_SRCDIR) && PETSC_DIR=/usr/lib/petsc PETSC_ARCH=linux-gnu-c-opt python$* $(DEB_PYTHON_SETUP_CMD) build $(DEB_PYTHON_BUILD_ARGS)
-	chrpath -d build/lib.*-$*/petsc4py/lib/linux-gnu-c-opt/PETSc.so
+# see FEATURE AREAS in dpkg-buildflags(1)
+#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
-python-install-%:
-	cd $(DEB_SRCDIR) && PETSC_DIR=/usr/lib/petsc PETSC_ARCH=linux-gnu-c-opt python$* $(DEB_PYTHON_SETUP_CMD) install --root=$(DEB_DESTDIR) $(DEB_PYTHON_INSTALL_ARGS_ALL)
+# see ENVIRONMENT in dpkg-buildflags(1)
+# package maintainers to append CFLAGS
+#export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
+# package maintainers to append LDFLAGS
+#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
 
-binary-install/python-petsc4py::
+
+# main packaging script based on dh7 syntax
+%:
+	dh $@ --with python2
+
+override_dh_clean:
+	dh_clean
+	rm -rf .eggs
+
+override_dh_auto_build:
+	PETSC_DIR=$(PETSC_DIR)  dh_auto_build
+	# petsc4py embeds the deep PETSC_DIR path as RPATH in its library.
+	# Swap it out for a standard path, or else dh_shlibsdep gets confused
+	chrpath -d build/lib.*-*/petsc4py/lib/PETSc.so
+
+override_dh_auto_install:
+	PETSC_DIR=$(PETSC_DIR)  dh_auto_install
+
+override_dh_python2:
+	dh_python2
 	dh_numpy
+
+override_dh_compress:
+	dh_compress -Xpdf
+
diff --git a/debian/source/format b/debian/source/format
index d3827e7..163aaf8 100644
--- a/debian/source/format
+++ b/debian/source/format
@@ -1 +1 @@
-1.0
+3.0 (quilt)

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



More information about the debian-science-commits mailing list