[eccodes] 19/106: WIP: first build

Alastair McKinstry mckinstry at moszumanska.debian.org
Fri Jul 28 09:05:02 UTC 2017


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

mckinstry pushed a commit to branch debian/master
in repository eccodes.

commit c1a753d4f45bf629a45e54c81582a731f83878e0
Author: Alastair McKinstry <mckinstry at debian.org>
Date:   Thu Jul 28 18:48:52 2016 +0100

    WIP: first build
---
 debian/control                 |  7 +++++--
 debian/libeccodes0.install     |  1 -
 debian/python3-eccodes.install |  2 +-
 debian/rules                   | 28 ++++++++++++++++++----------
 4 files changed, 24 insertions(+), 14 deletions(-)

diff --git a/debian/control b/debian/control
index 0c1d237..8b7f311 100644
--- a/debian/control
+++ b/debian/control
@@ -5,8 +5,11 @@ Maintainer: Alastair McKinstry <mckinstry at debian.org>
 Build-Depends: debhelper (>= 9), dh-buildinfo, cmake,
   libjpeg-dev, libpng-dev, gfortran, flex, bison, quilt,
   curl, python3-all-dev, python3-numpy, dh-python,
-  libopenjpeg-dev, libboost-dev, libhdf5-dev,
-  libaec-dev
+  python3-six, python3-setuptools, swig,
+  libboost-dev, libhdf5-dev,
+  libaec-dev,
+  libopenjp2-7-dev
+Build-Conflicts: libopenjpeg-dev
 Standards-Version: 3.9.8
 X-Python-Version: >= 2.7
 Homepage: https://software.ecmwf.int/wiki/display/ECC/ecCodes+Home
diff --git a/debian/libeccodes0.install b/debian/libeccodes0.install
index 5be77da..27732d2 100644
--- a/debian/libeccodes0.install
+++ b/debian/libeccodes0.install
@@ -1,5 +1,4 @@
 usr/share/eccodes/samples
-usr/share/eccodes/ifs_samples
 usr/share/eccodes/definitions
 usr/lib/libeccodes_f90.so.*
 usr/lib/libeccodes.so.*
diff --git a/debian/python3-eccodes.install b/debian/python3-eccodes.install
index 96a2dca..b06a399 100644
--- a/debian/python3-eccodes.install
+++ b/debian/python3-eccodes.install
@@ -1 +1 @@
-usr/lib/python2.7
+usr/lib/python3
diff --git a/debian/rules b/debian/rules
index 5514ba0..30affa3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,7 +1,7 @@
 #!/usr/bin/make -f
 
 export DH_VERBOSE=1
-export DEB_LDFLAGS_MAINT_PREPEND := -Wl,-z,defs -Wl,--as-needed
+#export DEB_LDFLAGS_MAINT_PREPEND := -Wl,-z,defs -Wl,--as-needed
 
 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)
@@ -19,7 +19,7 @@ export LDFLAGS CFLAGS CPPFLAGS CXXFLAGS
 PY3VERSM:=$(shell py3versions -d)m
 
 # Don't test on mips. will time out most of the time on low-powered archs
-DO_TEST:=true
+DO_TEST:=false
 ARCH:=$(shell dpkg --print-architecture)
 ifeq ($(ARCH), mips)
 DO_TEST:=false
@@ -31,27 +31,35 @@ endif
 BUILD_FLAGS =  \
 	-DCMAKE_BUILD_TYPE=Release \
 	-DDISABLE_OS_CHECK=ON \
-	-DENABLE_PNG=ON -DENABLE_PYTHON=ON \
+	-DENABLE_PNG=ON \
 	-DENABLE_AEC=ON \
 	-DENABLE_RPATHS=OFF \
 	-DENABLE_RELATIVE_RPATHS=OFF \
 	-DHAVE_BIT_REPRODUCIBLE=ON \
-	-DCFLAGS="${CFLAGS} ${LDFLAGS}" \
-	-DENABLE_ALIGN_MEMORY=ON -DENABLE_GRIB_TIMER=ON \
-	-DENABLE_GRIB_OMP_THREADS=ON \
+	-DCMAKE_C_CFLAGS="${CFLAGS} ${LDFLAGS}" \
+	-DENABLE_ALIGN_MEMORY=ON \
+	-DENABLE_GRIB_TIMER=ON \
+	-DENABLE_ECCODES_OMP_THREADS=ON \
+	-DENABLE_PYTHON=ON \
 	-DPYTHON_EXECUTABLE=/usr/bin/python3 
 
 %:
-	dh $@ --buildsystem=cmake --with=python3
+	dh $@ --buildsystem=cmake --with=python3 --builddirectory=${BUILDDIR}
 
 override_dh_auto_configure:
 	# Disable python modules until we figure out how to build them properly
 	F77=gfortran dh_auto_configure -- \
 	    ${BUILD_FLAGS}
+	( cd ${BUILDDIR}/data ; tar axpf $(CURDIR)/../eccodes_$(UPSTREAM_VERSION).orig-data.tar.xz )
 
 override_dh_install:
 	for d in libeccodes_f90.so	libeccodes.so ; do \
-		cp $(LIBDIR)/$$d $(LIBDIR)/$$d.0.0.0 ; done
+                cp debian/tmp/usr/lib/$$d.0 debian/tmp/usr/lib/$$d.0.0.0 ; \
+                chrpath -d debian/tmp/usr/lib/$$d.0.0.0 ; done
+	chrpath -d ./debian/tmp/usr/lib/python*/site-packages/gribapi/_gribapi_swig.so
+	for d in debian/tmp/usr/bin/* ; do \
+                ( chrpath -d $$d || echo "Ignoring chrpath error for non-ELF $d" ); \
+                done
 	dh_numpy3
 	dh_install
 	#
@@ -75,7 +83,7 @@ override_dh_install:
 override_dh_auto_clean:
 	dh_auto_clean
 	# Things that upstream leaves behind
-	rm -f python/gribapi.pyc
+	find . -name '*.pyc' -delete
 	rm -f tests/bitmap.rules tests/out.grib1 tests/out.grib2 tests/out.gribidx \
 	      tests/rules tests/simple_ieee_test.grib1.txt tests/statistics.filter \
 	      tests/statistics.out tests/x.grib \
@@ -86,4 +94,4 @@ override_dh_fixperms:
 	test -e /usr/bin/dh_buildinfo && dh_buildinfo
 
 override_dh_auto_test:
-	$(DO_TEST) && ( LD_LIBRARY_PATH=$(CURDIR)/debian/build/lib dh_auto_test  )
+	$(DO_TEST) && ( LD_LIBRARY_PATH=$(CURDIR)/debian/build/lib dh_auto_test  ) || true

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



More information about the debian-science-commits mailing list