|
1 | 1 | #!/usr/bin/make -f |
2 | | -# You must remove unused comment lines for the released package. |
3 | | -#export DH_VERBOSE = 1 |
4 | | -#export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
5 | | -#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic |
6 | | -#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed |
| 2 | +# -*- makefile -*- |
| 3 | +# Sample debian/rules that uses debhelper. |
| 4 | +# This file was originally written by Joey Hess and Craig Small. |
| 5 | +# As a special exception, when this file is copied by dh-make into a |
| 6 | +# dh-make output file, you may use that output file without restriction. |
| 7 | +# This special exception was added by Craig Small in version 0.37 of dh-make. |
7 | 8 |
|
8 | | -%: |
9 | | - dh $@ |
| 9 | +# Uncomment this to turn on verbose mode. |
| 10 | +export DH_VERBOSE=1 |
| 11 | +# TODO: remove the LDFLAGS override. It's here to avoid esoteric problems |
| 12 | +# of this sort: |
| 13 | +# https://code.ros.org/trac/ros/ticket/2977 |
| 14 | +# https://code.ros.org/trac/ros/ticket/3842 |
| 15 | +export LDFLAGS= |
| 16 | +export PKG_CONFIG_PATH=/opt/ros/melodic/lib/pkgconfig |
| 17 | +# Explicitly enable -DNDEBUG, see: |
| 18 | +# https://github.com/ros-infrastructure/bloom/issues/327 |
| 19 | +export DEB_CXXFLAGS_MAINT_APPEND=-DNDEBUG |
10 | 20 |
|
| 21 | +%: |
| 22 | + dh $@ -v --buildsystem=cmake |
11 | 23 |
|
12 | 24 | override_dh_auto_configure: |
13 | | - @echo "Running dh_auto_configure" |
14 | | - dh_auto_configure |
| 25 | + # In case we're installing to a non-standard location, look for a setup.sh |
| 26 | + # in the install tree that was dropped by catkin, and source it. It will |
| 27 | + # set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. |
| 28 | + if [ -f "/opt/ros/melodic/setup.sh" ]; then . "/opt/ros/melodic/setup.sh"; fi && \ |
| 29 | + dh_auto_configure -- \ |
| 30 | + -DCATKIN_BUILD_BINARY_PACKAGE="1" \ |
| 31 | + -DCMAKE_INSTALL_PREFIX="/opt/ros/melodic" \ |
| 32 | + -DCMAKE_PREFIX_PATH="/opt/ros/melodic" |
15 | 33 |
|
16 | 34 | override_dh_auto_build: |
17 | | - @echo "Running the build" |
| 35 | + # In case we're installing to a non-standard location, look for a setup.sh |
| 36 | + # in the install tree that was dropped by catkin, and source it. It will |
| 37 | + # set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. |
| 38 | + if [ -f "/opt/ros/melodic/setup.sh" ]; then . "/opt/ros/melodic/setup.sh"; fi && \ |
18 | 39 | dh_auto_build |
19 | | - @echo "Done running the build" |
| 40 | + |
| 41 | +override_dh_auto_test: |
| 42 | + # In case we're installing to a non-standard location, look for a setup.sh |
| 43 | + # in the install tree that was dropped by catkin, and source it. It will |
| 44 | + # set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. |
| 45 | + echo -- Running tests. Even if one of them fails the build is not canceled. |
| 46 | + if [ -f "/opt/ros/melodic/setup.sh" ]; then . "/opt/ros/melodic/setup.sh"; fi && \ |
| 47 | + dh_auto_test || true |
| 48 | + |
| 49 | +override_dh_shlibdeps: |
| 50 | + # In case we're installing to a non-standard location, look for a setup.sh |
| 51 | + # in the install tree that was dropped by catkin, and source it. It will |
| 52 | + # set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. |
| 53 | + if [ -f "/opt/ros/melodic/setup.sh" ]; then . "/opt/ros/melodic/setup.sh"; fi && \ |
| 54 | + dh_shlibdeps -l$(CURDIR)/debian/ros-melodic-dji-osdk-ros//opt/ros/melodic/lib/ |
| 55 | + |
| 56 | +override_dh_auto_install: |
| 57 | + # In case we're installing to a non-standard location, look for a setup.sh |
| 58 | + # in the install tree that was dropped by catkin, and source it. It will |
| 59 | + # set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. |
| 60 | + if [ -f "/opt/ros/melodic/setup.sh" ]; then . "/opt/ros/melodic/setup.sh"; fi && \ |
| 61 | + dh_auto_install |
| 62 | + |
20 | 63 |
|
21 | 64 | override_dh_builddeb: |
22 | 65 | dh_builddeb --destdir=. |
|
0 commit comments