[odb-api] 11/19: Fix and install cmake files

Alastair McKinstry mckinstry at moszumanska.debian.org
Fri Sep 1 13:18:57 UTC 2017


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

mckinstry pushed a commit to branch debian/master
in repository odb-api.

commit e3d7a3deaa52a2f72a02e73b6b30d6de36effe50
Author: Alastair McKinstry <mckinstry at debian.org>
Date:   Thu Aug 31 14:36:59 2017 +0100

    Fix and install cmake files
---
 debian/libodb-api-dev.install.in |  1 +
 debian/rules                     | 23 ++++++++++++++++++-----
 2 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/debian/libodb-api-dev.install.in b/debian/libodb-api-dev.install.in
index 185b2b6..17e02a1 100644
--- a/debian/libodb-api-dev.install.in
+++ b/debian/libodb-api-dev.install.in
@@ -1,3 +1,4 @@
 usr/include/*	/usr/include
 usr/lib/pkgconfig/* /usr/include/@ARCH@/pkgconfig
 usr/share/eckit/cmake/*	/usr/lib/@ARCH@/cmake/eckit
+usr/share/odb_api/cmake/*	/usr/lib/@ARCH@/cmake/odb_api
diff --git a/debian/rules b/debian/rules
index c3fa3e7..ab0bfad 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,6 +10,9 @@ DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 AUTOGENERATED:= libodb-api-0d.install libodb-api-dev.install libodb-api-dev.links
 LIBDIR:=/usr/lib/${DEB_HOST_MULTIARCH}
 
+CMAKE_DIR_ECKIT:=debian/tmp/usr/share/eckit/cmake
+CMAKE_DIR_ODBAPI:=debian/tmp/share/odb_api/cmake
+
 CMAKE_CFLAGS:= \
 		-DCMAKE_BUILD_TYPE=Release \
 		-DBUILD_SHARED_LIBS=ON \
@@ -34,8 +37,18 @@ override_dh_auto_test:
 	@echo "Skipping tests; need to disable downloads"
 	# dh_auto_test ||  @echo "Ignoring test failures" 
 
-override_dh_fixperms:
-	dh_fixperms
-	chrpath -d debian/libodb-api-bin/usr/bin/odb2netcdf.x
-	chrpath -d debian/libodb-api-0d/usr/lib/*/*.so.0d
-
+override_dh_auto_install:
+	cd obj-* && $(MAKE) install
+	for d in debian/tmp/bin/* ; do \
+		( chrpath -d $$d || echo "Ignoring non-ELF file errors") ; done
+	chrpath -d debian/tmp/lib/*.0d
+	dh_auto_install	
+	# Fix broken paths 
+	cat ${CMAKE_DIR_ECKIT}/eckit-targets-release.cmake | \
+		sed -e 's%$${_IMPORT_PREFIX}/bin%/usr/bin%' | \
+		sed -e 	's%$${_IMPORT_PREFIX}/lib%$(LIBDIR)%' > ${CMAKE_DIR_ECKIT}/tmp
+	mv ${CMAKE_DIR_ECKIT}/tmp ${CMAKE_DIR_ECKIT}/eckit-targets-release.cmake
+	cat ${CMAKE_DIR_ODBAPI}/odb_api-targets-release.cmake | \
+		sed -e 's%$${_IMPORT_PREFIX}/bin%/usr/bin%' | \
+		sed -e 	's%$${_IMPORT_PREFIX}/lib%$(LIBDIR)%' > ${CMAKE_DIR_ODBAPI}/tmp
+	mv ${CMAKE_DIR_ODBAPI}/tmp ${CMAKE_DIR_ODBAPI}/odb_api-targets-release.cmake

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



More information about the debian-science-commits mailing list