[Debian-astro-commits] [gyoto] 221/221: debian: support multi-arch, build python*-gyoto

Thibaut Jean-Claude Paumard thibaut at moszumanska.debian.org
Fri May 22 20:52:48 UTC 2015


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

thibaut pushed a commit to branch master
in repository gyoto.

commit de260fe1e51553715c346a2de5dbdf5a9e09754a
Author: Thibaut Paumard <paumard at users.sourceforge.net>
Date:   Fri May 22 22:50:29 2015 +0200

    debian: support multi-arch, build python*-gyoto
---
 debian/compat                  |  2 +-
 debian/control                 | 36 +++++++++++++++--
 debian/install_for_all_pythons | 11 ++++++
 debian/libgyoto2-dev.install   |  4 +-
 debian/libgyoto2-dev.links     |  3 +-
 debian/libgyoto2.install       |  4 +-
 debian/libgyoto2.links         |  3 +-
 debian/rules                   | 87 +++++++++++++++++-------------------------
 8 files changed, 89 insertions(+), 61 deletions(-)

diff --git a/debian/compat b/debian/compat
index 7f8f011..ec63514 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-7
+9
diff --git a/debian/control b/debian/control
index 5b063cd..32661c5 100644
--- a/debian/control
+++ b/debian/control
@@ -3,13 +3,18 @@ Section: science
 Priority: extra
 Maintainer: Debian Astronomy Maintainers <debian-astro-maintainers at lists.alioth.debian.org>
 Uploaders: Thibaut Paumard <thibaut at debian.org>
-Build-Depends: debhelper (>= 7.0.50~), yorick-dev, yorick-yutils,
+Build-Depends: debhelper (>= 9~), yorick-dev, yorick-yutils,
 	       libxerces-c-dev, libcfitsio-dev, libudunits2-dev,
-	       libboost-dev (>= 1.53.1), autotools-dev
-Build-Depends-Indep: doxygen, doxygen-latex,
+	       libboost-dev (>= 1.53.1), autotools-dev,
+	       mpi-default-dev, dh-python, python-all (>= 2.6.6-3~),
+	       python-setuptools, python3-all, python3-setuptools,
+	       swig3.0, python-numpy, python3-numpy, doxygen, dh-exec (>=0.3)
+Build-Depends-Indep: doxygen-latex,
                texlive-bibtex-extra, texlive-latex-base,
                texlive-lang-french, tipa
 Standards-Version: 3.9.6
+X-Python-Version: >= 2.6
+X-Python3-Version: >= 3.2
 Vcs-Git: git://anonscm.debian.org/debian-astro/packages/gyoto.git
 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=debian-astro/packages/gyoto.git
 Homepage: http://gyoto.obspm.fr
@@ -33,6 +38,7 @@ Description: General relativistic ray-tracing
 Package: libgyoto2
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}
+Pre-Depends: ${misc:Pre-Depends}
 Description: General relativistic geodesic integration and ray-tracing
  Gyoto aims at providing a framework for computing orbits and
  ray-traced images in General relativity. It consists in a shared
@@ -82,6 +88,30 @@ Description: General relativistic geodesic integration for the Yorick language
  exposing the Gyoto facilities. It allows using Gyoto interactively
  from the yorick prompt or running complex Gyoto scripts.
 
+Package: python-gyoto
+Architecture: any
+Section: python
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}
+Description: General relativistic geodesic integration for the Python 2 language
+ Gyoto aims at providing a framework for computing orbits and
+ ray-traced images in General relativity.
+ .
+ This package provides an extension for the Python 2 programing language
+ exposing the Gyoto facilities. It allows using Gyoto interactively
+ from the python prompt or running complex Gyoto scripts.
+
+Package: python3-gyoto
+Architecture: any
+Section: python
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${python3:Depends}
+Description: General relativistic geodesic integration for the Python 3 language
+ Gyoto aims at providing a framework for computing orbits and
+ ray-traced images in General relativity.
+ .
+ This package provides an extension for the Python 3 programing language
+ exposing the Gyoto facilities. It allows using Gyoto interactively
+ from the python3 prompt or running complex Gyoto scripts.
+
 Package: gyoto-doc
 Architecture: all
 Section: doc
diff --git a/debian/install_for_all_pythons b/debian/install_for_all_pythons
new file mode 100644
index 0000000..47137ec
--- /dev/null
+++ b/debian/install_for_all_pythons
@@ -0,0 +1,11 @@
+#!/bin/sh
+set -e
+cd python
+for pytag in "" 3 ; do
+ for python in `py${pytag}versions -s`; do
+  for component in "" _std ; do
+   $python setup${component}.py install --install-layout=deb --prefix=../debian/python${pytag}-gyoto/usr ;
+  done ;
+ done ;
+done
+exit 0
\ No newline at end of file
diff --git a/debian/libgyoto2-dev.install b/debian/libgyoto2-dev.install
index 5211e9a..82b42dd 100644
--- a/debian/libgyoto2-dev.install
+++ b/debian/libgyoto2-dev.install
@@ -1,3 +1,3 @@
 usr/include
-usr/lib/*.a
-usr/lib/gyoto/*/*.a
+usr/lib/*/*.a
+usr/lib/*/gyoto/*/*.a
diff --git a/debian/libgyoto2-dev.links b/debian/libgyoto2-dev.links
old mode 100644
new mode 100755
index 773532f..5d6e3e3
--- a/debian/libgyoto2-dev.links
+++ b/debian/libgyoto2-dev.links
@@ -1 +1,2 @@
-usr/lib/libgyoto.so.2 usr/lib/libgyoto.so
+#! /usr/bin/dh-exec
+usr/lib/${DEB_HOST_MULTIARCH}/libgyoto.so.2 usr/lib/${DEB_HOST_MULTIARCH}/libgyoto.so
diff --git a/debian/libgyoto2.install b/debian/libgyoto2.install
index b02be91..535fca9 100644
--- a/debian/libgyoto2.install
+++ b/debian/libgyoto2.install
@@ -1,2 +1,2 @@
-usr/lib/libgyoto.so.?.?.?
-usr/lib/gyoto/*/libgyoto*.so*
+usr/lib/*/libgyoto.so.?.?.?
+usr/lib/*/gyoto/*/libgyoto*.so*
diff --git a/debian/libgyoto2.links b/debian/libgyoto2.links
old mode 100644
new mode 100755
index ebde9ea..1f8bc3f
--- a/debian/libgyoto2.links
+++ b/debian/libgyoto2.links
@@ -1 +1,2 @@
-usr/lib/libgyoto.so.2.1.0 usr/lib/libgyoto.so.2
+#! /usr/bin/dh-exec
+usr/lib/${DEB_HOST_MULTIARCH}/libgyoto.so.2.1.0 usr/lib/${DEB_HOST_MULTIARCH}/libgyoto.so.2
diff --git a/debian/rules b/debian/rules
index e06e829..64ed88d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -15,83 +15,68 @@ DPKG_EXPORT_BUILDFLAGS = 1
 unexport HOME_LORENE
 
 configure_flags = --with-yorick=/usr/bin/yorick --with-udunits --with-xerces \
-	--without-lorene --prefix=/usr --enable-static --enable-shared \
-	--with-boost --enable-c++11
+	--without-lorene --enable-static --enable-shared \
+	--with-boost --enable-c++11 --enable-release \
+	--with-mpi --without-virtualenv --enable-doc
 
-install-arch: build-stamp
+%:
+	dh $@ --with python2,python3,autotools-dev
+
+override_dh_auto_install-arch:
 	dh_auto_install
 	dh_install -a -N yorick-gyoto
 	dh_installyorick --no-make-install -pyorick-gyoto
 	dh_makeshlibs -a
-	dh install-arch
-
-install-indep: doc-stamp
-	dh_testdir -i
-	dh_testroot -i
-	dh_prep -i
-	dh_installdirs -i
-	dh_install -i
-	dh_installdocs -i
-	dh_installchangelogs -i
-	dh_installexamples -i
-	dh_lintian -i
-	dh_link -i
-	dh_compress -i
-	dh_fixperms -i
-
-build: build-arch build-indep
-build-arch: build-stamp
-build-indep: doc-stamp
-
-override_dh_auto_build:
+	sh debian/install_for_all_pythons
+	dh_numpy
+	dh_numpy3
 
-build-stamp: configure-stamp
-	dh_testdir -a
-	make COPT_DEFAULT="" \
+override_dh_auto_build-arch: configure-stamp
+	$(MAKE) COPT_DEFAULT="" \
 	     Y_CFLAGS="$(CFLAGS) $(CPPFLAGS)" \
 	     Y_LDFLAGS="$(LDFLAGS)" \
 	     lib bin yorick
-ifeq (,$(filter nocheck, $(DEB_BUILD_OPTIONS)))
-ifeq (,$(filter $(DEB_HOST_ARCH), kfreebsd-i386 kfreebsd-amd64 mips))
-# skip the test suite on kfreebsd-any as gyoto package not beeing built
-# skip on mips as lucatelli2 fails on it (but the binary works on other boxes)
-	LC_ALL=C.UTF-8 make check
-endif
-endif
-	touch build-stamp
+	set -e; \
+	for python in `pyversions -s` `py3versions -s`; do \
+	 make -C python PYTHON=$$python ; \
+	done
 
-doc-stamp: configure-stamp
-	dh_testdir -i
-	make doc
-	touch doc-stamp
+install-indep: doc-stamp
+	dh_installdocs -i
+	dh_install -i
 
-binary: binary-indep binary-arch
+build-indep: doc-stamp
 
-binary-indep: install-indep
-	dh $@
+doc-stamp: configure-stamp
+	$(MAKE) doc
 
-binary-arch: install-arch
-	dh $@
+override_dh_auto_configure: configure-stamp
 
 configure-stamp:
 	dh_autotools-dev_updateconfig
-	./configure $(configure_flags) --enable-doc
+	dh_auto_configure -- $(configure_flags)
 	touch configure-stamp
 
 clean: configure-stamp
-	dh_testdir
+	make -C python clean
 	make distclean
+	dh_auto_clean
 	dh_autotools-dev_restoreconfig
-	dh_clean doc-stamp build-stamp configure-stamp
+	dh_clean doc-stamp build-stamp configure-stamp doc/doxygen_sqlite3.db
+
+override_dh_auto_test-indep:
+
+override_dh_auto_test-arch:
+ifeq (,$(filter $(DEB_HOST_ARCH), kfreebsd-i386 kfreebsd-amd64 mips))
+# skip the test suite on kfreebsd-any as gyoto package not beeing built
+# skip on mips as lucatelli2 fails on it (but the binary works on other boxes)
+	LC_ALL=C.UTF-8 make check
+endif
 
-override_dh_auto_test:
 
 override_dh_strip:
 	dh_strip --dbg-package=gyoto-dbg
 
-%:
-	dh $@ 
-
 # maintainer-only rule
 git-clean: clean
 	debuild clean

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



More information about the Debian-astro-commits mailing list