[emos] 02/04: Now install into debian/tmp and use dh install files from there

Alastair McKinstry mckinstry at moszumanska.debian.org
Mon Oct 26 10:38:44 UTC 2015


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

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

commit b2e10bb004708b1022b8b940750f8d01042c4126
Author: Alastair McKinstry <mckinstry at debian.org>
Date:   Sat Oct 24 05:31:47 2015 +0100

    Now install into debian/tmp and use dh install files from there
---
 debian/libemos-dev.install.in    |  2 +-
 debian/libemos0d.install.in      |  1 +
 debian/patches/cmake_fixes.patch | 94 ++++++++++++++++++++++++++++++++++++++++
 debian/patches/series            |  1 +
 debian/rules                     | 15 +++----
 5 files changed, 103 insertions(+), 10 deletions(-)

diff --git a/debian/libemos-dev.install.in b/debian/libemos-dev.install.in
index 0f14753..bad3bdd 100644
--- a/debian/libemos-dev.install.in
+++ b/debian/libemos-dev.install.in
@@ -1,6 +1,6 @@
 pbio/*.h		usr/include/pbio
 gribex/*.h		usr/include/gribex
 interpolation/*.h	usr/include/interpolation
-obj-*/lib/*.a		usr/lib/@ARCH@
+usr/lib/*.a		usr/lib/@ARCH@
 debian/tmp/share/libemos/cmake/*	usr/lib/@ARCH@/cmake/libemos
 # usr/lib/*/pkgconfig
diff --git a/debian/libemos0d.install.in b/debian/libemos0d.install.in
new file mode 100644
index 0000000..f2090d2
--- /dev/null
+++ b/debian/libemos0d.install.in
@@ -0,0 +1 @@
+/usr/lib/*.0d	usr/lib/@ARCH@
diff --git a/debian/patches/cmake_fixes.patch b/debian/patches/cmake_fixes.patch
new file mode 100644
index 0000000..a71daa4
--- /dev/null
+++ b/debian/patches/cmake_fixes.patch
@@ -0,0 +1,94 @@
+Description: <short summary of the patch>
+ TODO: Put a short summary on the line above and replace this paragraph
+ with a longer explanation of this change. Complete the meta-information
+ with other relevant fields (see below for details). To make it easier, the
+ information below has been extracted from the changelog. Adjust it or drop
+ it.
+ .
+ emoslib (2:4.1.1-2) UNRELEASED; urgency=medium
+ .
+   * Change /usr/lib/*/cmake/Emos -> /usr/lib/*/cmake/libemos
+   * libemos-dev now depends on libemos-bin as cmake configs assume binaries
+     are available.
+Author: Alastair McKinstry <mckinstry at debian.org>
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: https://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: <YYYY-MM-DD>
+
+Index: emoslib-4.1.1/cmake/project-config.cmake.in
+===================================================================
+--- emoslib-4.1.1.orig/cmake/project-config.cmake.in
++++ emoslib-4.1.1/cmake/project-config.cmake.in
+@@ -18,7 +18,7 @@
+ get_filename_component(@PNAME at _CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+ 
+ set( @PNAME at _SELF_INCLUDE_DIRS "@CONF_INCLUDE_DIRS@" )
+-set( @PNAME at _SELF_DEFINITIONS  "@CONF_DEFINITIONS@" )
++set( @PNAME at _SELF_DEFINITIONS  '@CONF_DEFINITIONS@' )
+ set( @PNAME at _SELF_LIBRARIES    "@CONF_LIBRARIES@" )
+ 
+ set( @PNAME at _TPLS              "@CONF_TPLS@" )
+@@ -61,13 +61,7 @@ endif()
+ # insert definitions for IMPORTED targets
+ 
+ if( NOT @PROJECT_NAME at _BINARY_DIR )
+-
+-  if( @PNAME at _IS_BUILD_DIR_EXPORT )
+-		include( "@TOP_PROJECT_TARGETS_FILE@" OPTIONAL )
+-	else()
+-		include( "${@PNAME at _CMAKE_DIR}/@CMAKE_PROJECT_NAME at -targets.cmake" )
+-	endif()
+-
++	include( "${@PNAME at _CMAKE_DIR}/@CMAKE_PROJECT_NAME at -targets.cmake" )
+ endif()
+ 
+ # here goes the imports of the TPL's
+@@ -82,9 +76,5 @@ mark_as_advanced( @PNAME at _IMPORT_FILE )
+ # set @PROJECT_NAME at _BASE_DIR for final installations or build directories
+ 
+ if( NOT @PROJECT_NAME@ )
+-	if( @PNAME at _IS_BUILD_DIR_EXPORT )
+-		set( @PROJECT_NAME at _BASE_DIR @CMAKE_BINARY_DIR@ )
+-	else()
+-		set( @PROJECT_NAME at _BASE_DIR @CMAKE_INSTALL_PREFIX@ )
+-	endif()
++	set( @PROJECT_NAME at _BASE_DIR @CMAKE_INSTALL_PREFIX@ )
+ endif()
+Index: emoslib-4.1.1/cmake/ecbuild_add_executable.cmake
+===================================================================
+--- emoslib-4.1.1.orig/cmake/ecbuild_add_executable.cmake
++++ emoslib-4.1.1/cmake/ecbuild_add_executable.cmake
+@@ -164,7 +164,7 @@ macro( ecbuild_add_executable )
+ 
+       # set build location
+ 
+-      set_property( TARGET ${_PAR_TARGET} PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin )
++      set_property( TARGET ${_PAR_TARGET} PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/usr/bin )
+ 
+       # export location of target to other projects -- must be exactly after setting the build location (see previous command)
+ 
+Index: emoslib-4.1.1/cmake/ecbuild_add_library.cmake
+===================================================================
+--- emoslib-4.1.1.orig/cmake/ecbuild_add_library.cmake
++++ emoslib-4.1.1/cmake/ecbuild_add_library.cmake
+@@ -266,8 +266,8 @@ function( ecbuild_add_library_impl )
+ 
+       # set build location
+ 
+-      set_property( TARGET ${_PAR_TARGET} PROPERTY LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib )
+-      set_property( TARGET ${_PAR_TARGET} PROPERTY ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib )
++      set_property( TARGET ${_PAR_TARGET} PROPERTY LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${INSTALL_LIBDIR} )
++      set_property( TARGET ${_PAR_TARGET} PROPERTY ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${INSTALL_LIBDIR} )
+ 
+       # export location of target to other projects -- must be exactly after setting the build location (see previous 2 commands)
+ 
diff --git a/debian/patches/series b/debian/patches/series
index d5db404..929bafe 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@ little_endian.patch
 wvqlid2.patch
 shared.patch
 build_fixes.patch
+cmake_fixes.patch
diff --git a/debian/rules b/debian/rules
index 7438986..165cd0f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,11 +6,11 @@
 %:
 	dh $@ --buildsystem=cmake
 
-DESTDIR:=$(shell pwd)/debian/tmp
+DESTDIR:=$(shell pwd)/debian/tmp/usr
 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 ARCH:=$(shell dpkg --print-architecture)
-SHLIB_DIR:= debian/libemos0d/usr/lib/${DEB_HOST_MULTIARCH}
-AUTOGENERATED:= libemos-dev.install libemos-dev.links
+AUTOGENERATED:= libemos-dev.install libemos-dev.links libemos0d.install
+LIBDIR:=/usr/lib/${DEB_HOST_MULTIARCH}
 
 MCMODEL_FLAGS:=''
 BUILD_FLAGS:=''
@@ -45,12 +45,14 @@ override_dh_auto_clean:
 
 override_dh_auto_configure:
 	dh_auto_configure -- \
+		-DCMAKE_INSTALL_PREFIX=${DESTDIR} \
 		-DCMAKE_BUILD_TYPE=Release \
 		-DBUILD_SHARED_LIBS=ON \
 		-DDISABLE_OS_CHECK=ON \
 		-DMCMODEL_FLAGS=${MCMODEL_FLAGS} \
 		-DBUILD_FLAGS=${BUILD_FLAGS} \
-		-DPIC=${FPIC} \
+		-DFPIC=${FPIC} \
+		-DINSTALL_LIBDIR=${LIBDIR} \
 		-DBUFR_TABLES_PATH=/usr/share/emos/bufrtables
 	for f in ${AUTOGENERATED} ; do \
 		sed -e 's%@ARCH@%${DEB_HOST_MULTIARCH}%g' < debian/$$f.in  > debian/$$f ; \
@@ -59,9 +61,4 @@ override_dh_auto_configure:
 override_dh_auto_install:
 	cd obj-* && cmake -DCMAKE_INSTALL_PREFIX=${DESTDIR} -P cmake_install.cmake
 	cd ${DESTDIR}/share/libemos/tables/bufrtables && sh -x ./links.sh
-	# Need to rename file, 
-	mkdir -p ${SHLIB_DIR}
-	cp obj-*/lib/libemos.so		${SHLIB_DIR}/libemos.so.0d
-	cp obj-*/lib/libemosR64.so	${SHLIB_DIR}/libemosR64.so.0d
-	chrpath -d ${SHLIB_DIR}/libemos*.so.0d 
 	dh_auto_install

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



More information about the debian-science-commits mailing list