diff --git a/debian/rules.em b/debian/rules.em index 276329d..e56e78d 100755 --- a/debian/rules.em +++ b/debian/rules.em @@ -41,8 +41,14 @@ override_dh_auto_build: # In case we're installing to a non-standard location, look for a setup.sh # in the install tree that was dropped by catkin, and source it. It will # set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. + # + # j-rivero: inject DESTDIR since the bazel Cmake wrapper in Drake will run + # the install target when executing make. That target will install + # Drake generated code in this step. Injecting DESTDIR since the Drake + # CMake wrapper is sensible to transform it into an installation prefix. + export DESTDIR=$(CURDIR)/debian/@(Package)/ if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi && \ - dh_auto_build + DESTDIR=$(CURDIR)/debian/@(Package)/ dh_auto_build override_dh_auto_test: # In case we're installing to a non-standard location, look for a setup.sh @@ -59,6 +65,9 @@ override_dh_shlibdeps: if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi && \ dh_shlibdeps -l$(CURDIR)/debian/@(Package)/@(InstallationPrefix)/lib/ +override_dh_prep: + dh_prep -Xdebian/@(Package) $@@ + override_dh_auto_install: # In case we're installing to a non-standard location, look for a setup.sh # in the install tree that was dropped by catkin, and source it. It will