1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
ifneq (,$(findstring $(DEB_HOST_ARCH), i386))
export DEB_CFLAGS_MAINT_APPEND = -ffloat-store
export DEB_CXXFLAGS_MAINT_APPEND = -ffloat-store
endif
DEBUG_PACKAGE = $(shell awk '/^Package/ && /-dbg *$$/ { print $$2 }' debian/control)
%:
VERBOSE=1 dh $@ --parallel --builddirectory=build
.PHONY: override_dh_strip override_dh_auto_configure override_dh_install
override_dh_auto_configure:
mkdir -p build
(cd build && cmake .. -DCMAKE_CXX_FLAGS="" -DCMAKE_CXX_FLAGS_RELEASE="$(CPPFLAGS) $(CXXFLAGS)" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=ON -DGTEST_DIR=/usr/src/gtest -DHTML_DOCS=off -DCMAKE_LIBRARY_ARCHITECTURE="$(DEB_HOST_MULTIARCH)")
override_dh_auto_build-arch:
dh_auto_build --builddirectory=build -- itpp
dh_auto_build --builddirectory=build -- itpp_gtests
(cd build && gtests/itpp_gtests);
override_dh_auto_build-indep:
(cd build && cmake .. -DHTML_DOCS=on)
override_dh_auto_test-indep:
override_dh_auto_install:
dh_auto_install --builddirectory=build
mkdir -p debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/
mv debian/tmp/usr/lib/libitpp.so* debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/
mkdir -p debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig
mv debian/tmp/usr/lib/pkgconfig/* debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/
dh_install
override_dh_strip:
dh_strip --dbg-package=$(DEBUG_PACKAGE)
|