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 41 42 43 44 45 46 47
|
#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
BUILDDIR = obj-$(DEB_HOST_MULTIARCH)
CONFIGURE_ARGS = \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DLIB_INSTALL_DIR:STRING="lib/$(DEB_HOST_MULTIARCH)"
LICENSE_TMPFILE := $(shell mktemp "/tmp/license-check.tmp.XXXXXX")
%:
dh $@
override_dh_auto_build:
# dynamically linked
dh_auto_build -B $(BUILDDIR)
# statically linked
dh_auto_build -B $(BUILDDIR)-static
override_dh_auto_configure:
# dynamically linked
dh_auto_configure -B $(BUILDDIR) \
-- $(CONFIGURE_ARGS) \
-DBUILD_STATIC_LIBS=OFF \
-DBUILD_TESTING=ON
# statically linked
dh_auto_configure -B $(BUILDDIR)-static \
-- $(CONFIGURE_ARGS) \
-DBUILD_STATIC_LIBS=ON \
-DBUILD_TESTING=OFF
override_dh_auto_install:
dh_auto_install -O--buildsystem=cmake -B $(BUILDDIR)
find $(CURDIR)/debian/tmp/ -type d -name .cmake | xargs -r rm -rfv
execute_before_dh_install:
# put the static libs together with the rest of the stuff
cp -v $(BUILDDIR)-static/src/*.a debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/
-$(RM) -r $(BUILDDIR)-static
check_license_update:
@decopy --no-progress -X debian --output $(LICENSE_TMPFILE)
@diff -urN $(CURDIR)/debian/copyright.tmpl $(LICENSE_TMPFILE)
|