Permalink
Browse files

provide Debian install-indep

  • Loading branch information...
jlblancoc committed Dec 2, 2017
1 parent 2a52461 commit 832f416fcda30e79f0e118607b9033564099f555
View
@@ -101,7 +101,10 @@ if (${CMAKE_GENERATOR} MATCHES ".*Makefiles")
endif()
endif()
include(cmakemodules/script_select_app_to_build.cmake REQUIRED) # Build (or not) some apps:
SET(IS_DEBIAN_DBG_PKG 0)
IF (CMAKE_MRPT_USE_DEB_POSTFIXS AND CMAKE_BUILD_TYPE STREQUAL "Debug")
SET(IS_DEBIAN_DBG_PKG 1)
ENDIF ()
# ----------------------------------------------------------------------------
# CHECK FOR SYSTEM LIBRARIES, OPTIONS, ETC..
@@ -669,6 +672,9 @@ CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/parse-files/mrpt_paths_config.h.in" "${MRPT_
# Documentation targets (must be AFTER "apps" because it uses the aux program "mrpt-perfdata2html")
add_subdirectory(doc)
# install targets of "share/*" files
add_subdirectory(share)
# UNIT TESTS:
# ----------------------------------------------------------------------------
SET( BUILD_TESTING ON CACHE BOOL "Build MRPT tests")
@@ -710,11 +716,6 @@ add_definitions(-DMRPT_OPENCV_SRC_DIR="${MRPT_OPENCV_SRC_DIR}")
SET(MRPT_DIR ${MRPT_BINARY_DIR})
include(cmakemodules/DefineExamples.cmake REQUIRED)
SET(IS_DEBIAN_DBG_PKG 0)
IF (CMAKE_MRPT_USE_DEB_POSTFIXS AND CMAKE_BUILD_TYPE STREQUAL "Debug")
SET(IS_DEBIAN_DBG_PKG 1)
ENDIF ()
# Build list of files to install, packages, etc.
include(cmakemodules/script_install_commands.cmake REQUIRED)
@@ -22,8 +22,6 @@ ENDIF(WIN32)
# Docs, examples and the rest of files:
IF(WIN32)
INSTALL(DIRECTORY "${MRPT_SOURCE_DIR}/doc" DESTINATION ./ )
IF (PACKAGE_INCLUDES_SOURCES)
INSTALL(DIRECTORY "${MRPT_SOURCE_DIR}/cmakemodules" DESTINATION ./ )
INSTALL(DIRECTORY "${MRPT_SOURCE_DIR}/otherlibs" DESTINATION ./ )
@@ -35,10 +33,6 @@ IF(WIN32)
ENDIF (PACKAGE_INCLUDES_SOURCES)
INSTALL(DIRECTORY "${MRPT_SOURCE_DIR}/parse-files" DESTINATION ./ )
INSTALL(DIRECTORY "${MRPT_SOURCE_DIR}/share"
DESTINATION ./
PATTERN ".gitignore" EXCLUDE
)
# Smart determination of the dependencies DLLs so they are also copied when installing:
# ---------------------------------------------------------------------------------------
@@ -58,12 +52,12 @@ IF(WIN32)
ENDFOREACH(F)
ENDIF (EXISTS "${OpenCV_DIR}/bin/Release")
# Intel TBB dlls
if(CMAKE_MRPT_HAS_TBB)
string(REGEX REPLACE "/lib" "/bin" TBB_DLL_DIR "${TBB_LIB_DIR}")
install(PROGRAMS "${TBB_DLL_DIR}/tbb.dll" DESTINATION bin COMPONENT main)
install(PROGRAMS "${TBB_DLL_DIR}/tbb_debug.dll" DESTINATION bin COMPONENT main)
endif(CMAKE_MRPT_HAS_TBB)
# Intel TBB dlls
if(CMAKE_MRPT_HAS_TBB)
string(REGEX REPLACE "/lib" "/bin" TBB_DLL_DIR "${TBB_LIB_DIR}")
install(PROGRAMS "${TBB_DLL_DIR}/tbb.dll" DESTINATION bin COMPONENT main)
install(PROGRAMS "${TBB_DLL_DIR}/tbb_debug.dll" DESTINATION bin COMPONENT main)
endif(CMAKE_MRPT_HAS_TBB)
# ffmpeg:
IF (EXISTS "${FFMPEG_WIN32_ROOT_DIR}/bin")
@@ -96,26 +90,7 @@ IF(WIN32)
ENDFOREACH(F)
ELSE(WIN32)
IF (NOT IS_DEBIAN_DBG_PKG)
INSTALL(DIRECTORY "${MRPT_SOURCE_DIR}/doc/html" DESTINATION ${mrpt_doc_INSTALL_PREFIX}share/doc/mrpt-doc/ )
INSTALL(DIRECTORY "${MRPT_SOURCE_DIR}/samples" DESTINATION ${mrpt_doc_INSTALL_PREFIX}share/doc/mrpt-doc/ )
IF(EXISTS "${MRPT_SOURCE_DIR}/doc/mrpt-book.ps.gz")
INSTALL(FILES "${MRPT_SOURCE_DIR}/doc/mrpt-book.ps.gz" DESTINATION ${mrpt_doc_INSTALL_PREFIX}share/doc/mrpt-doc/ )
ENDIF(EXISTS "${MRPT_SOURCE_DIR}/doc/mrpt-book.ps.gz")
IF(EXISTS "${MRPT_SOURCE_DIR}/doc/pbmap-guide/pbmap-guide.ps.gz")
INSTALL(FILES "${MRPT_SOURCE_DIR}/doc/pbmap-guide/pbmap-guide.ps.gz" DESTINATION ${mrpt_doc_INSTALL_PREFIX}share/doc/mrpt-doc/ )
ENDIF(EXISTS "${MRPT_SOURCE_DIR}/doc/pbmap-guide/pbmap-guide.ps.gz")
# applications config files
INSTALL(DIRECTORY "${MRPT_SOURCE_DIR}/share/applications" DESTINATION ${mrpt_apps_INSTALL_PREFIX}share)
INSTALL(DIRECTORY "${MRPT_SOURCE_DIR}/share/mrpt" DESTINATION ${mrpt_common_INSTALL_PREFIX}share)
INSTALL(DIRECTORY "${MRPT_SOURCE_DIR}/share/pixmaps" DESTINATION ${mrpt_apps_INSTALL_PREFIX}share)
INSTALL(DIRECTORY "${MRPT_SOURCE_DIR}/share/metainfo" DESTINATION ${mrpt_apps_INSTALL_PREFIX}share)
# Mime types go to the mrpt-core package
INSTALL(DIRECTORY "${MRPT_SOURCE_DIR}/share/mime" DESTINATION ${mrpt_apps_INSTALL_PREFIX}share )
ENDIF(NOT IS_DEBIAN_DBG_PKG)
# Linux: handled in share/CMakeLists.txt
ENDIF(WIN32)
# The headers of all the MRPT libs:

This file was deleted.

Oops, something went wrong.
View
@@ -123,3 +123,21 @@ IF(LATEXMK_PROGRAM)
ENDIF()
ENDIF()
# Install:
IF(WIN32)
INSTALL(DIRECTORY "${MRPT_SOURCE_DIR}/doc" DESTINATION ./ )
ELSE()
IF (NOT IS_DEBIAN_DBG_PKG)
INSTALL(DIRECTORY "${MRPT_SOURCE_DIR}/doc/html" DESTINATION ${mrpt_doc_INSTALL_PREFIX}share/doc/mrpt-doc/ )
INSTALL(DIRECTORY "${MRPT_SOURCE_DIR}/samples" DESTINATION ${mrpt_doc_INSTALL_PREFIX}share/doc/mrpt-doc/ )
IF(EXISTS "${MRPT_SOURCE_DIR}/doc/mrpt-book.ps.gz")
INSTALL(FILES "${MRPT_SOURCE_DIR}/doc/mrpt-book.ps.gz" DESTINATION ${mrpt_doc_INSTALL_PREFIX}share/doc/mrpt-doc/ )
ENDIF()
IF(EXISTS "${MRPT_SOURCE_DIR}/doc/pbmap-guide/pbmap-guide.ps.gz")
INSTALL(FILES "${MRPT_SOURCE_DIR}/doc/pbmap-guide/pbmap-guide.ps.gz" DESTINATION ${mrpt_doc_INSTALL_PREFIX}share/doc/mrpt-doc/ )
ENDIF()
ENDIF()
ENDIF()
@@ -4,7 +4,7 @@ mrpt (1:1.5.5-1) unstable; urgency=medium
* Fix SIGBUS in armhf (Closes: #880388).
* debian/copyright: Updated to machine-readable format.
* debian/rules: disable generating Doxygen caller graphs in doc pkg.
* debian/rules: override build-indep target.
* debian/rules: provide build-indep, test-indep, and install-indep targets.
-- José Luis Blanco Claraco <joseluisblancoc@gmail.com> Fri, 01 Dec 2017 07:13:14 +0100
View
@@ -73,14 +73,19 @@ override_dh_auto_test-arch:
echo "[override_dh_auto_test-arch]"
dh_auto_build -O--buildsystem=cmake -- $(MRPT_TEST_TARGET) -j1
override_dh_install:
override_dh_install-indep:
echo "[override_dh_install-indep]"
$(MAKE) -C obj-$(DEB_HOST_GNU_TYPE)/doc install
$(MAKE) -C obj-$(DEB_HOST_GNU_TYPE)/share install
# Fix Doxygen's embedded JQuery lib:
rm $(CURDIR)/debian/mrpt-doc/usr/share/doc/mrpt-doc/html/jquery.js || true
ln -s /usr/share/javascript/jquery/jquery.js $(CURDIR)/debian/mrpt-doc/usr/share/doc/mrpt-doc/html/jquery.js || true
override_dh_install-arch:
echo "[override_dh_install-arch]"
# Install:
dh_auto_build -O--buildsystem=cmake -- install
# Move all the ".so" files to the proper place: the -dev package:
mkdir -p $(CURDIR)/debian/libmrpt-dev/usr/lib/$(DEB_HOST_MULTIARCH)
find $(CURDIR)/debian/ -name "*.so" | grep -v 'libmrpt-dev' | xargs -I FIL mv -f FIL $(CURDIR)/debian/libmrpt-dev/usr/lib/$(DEB_HOST_MULTIARCH)
# Fix Doxygen's embedded JQuery lib:
rm $(CURDIR)/debian/mrpt-doc/usr/share/doc/mrpt-doc/html/jquery.js || true
ln -s /usr/share/javascript/jquery/jquery.js $(CURDIR)/debian/mrpt-doc/usr/share/doc/mrpt-doc/html/jquery.js || true
View
@@ -0,0 +1,20 @@
project(mrpt_share_dir)
# install targets:
IF(WIN32)
INSTALL(DIRECTORY "${MRPT_SOURCE_DIR}/share"
DESTINATION ./
PATTERN ".gitignore" EXCLUDE
)
ELSE()
IF (NOT IS_DEBIAN_DBG_PKG)
# mrpt-common pkg:
INSTALL(DIRECTORY "${MRPT_SOURCE_DIR}/share/mrpt" DESTINATION ${mrpt_common_INSTALL_PREFIX}share)
# mrpt-apps pkg:
INSTALL(DIRECTORY "${MRPT_SOURCE_DIR}/share/applications" DESTINATION ${mrpt_apps_INSTALL_PREFIX}share)
INSTALL(DIRECTORY "${MRPT_SOURCE_DIR}/share/pixmaps" DESTINATION ${mrpt_apps_INSTALL_PREFIX}share)
INSTALL(DIRECTORY "${MRPT_SOURCE_DIR}/share/metainfo" DESTINATION ${mrpt_apps_INSTALL_PREFIX}share)
INSTALL(DIRECTORY "${MRPT_SOURCE_DIR}/share/mime" DESTINATION ${mrpt_apps_INSTALL_PREFIX}share )
ENDIF()
ENDIF()

0 comments on commit 832f416

Please sign in to comment.