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 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE = 1
# Hardening options.
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
export DEB_CXXFLAGS_MAINT_APPEND = -Wall -pedantic
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
# Set the build directory explicitly.
DEB_HOST_GNU_TYPE := $(shell dpkg-architecture --query DEB_HOST_GNU_TYPE)
BUILDDIR = $(CURDIR)/obj-$(DEB_HOST_GNU_TYPE)
BUILD_OPTIONS = \
-DBUILD_COMMANDLINE=ON \
-DBUILD_CONVERTER=ON \
-DBUILD_EXAMPLES=OFF \
-DBUILD_PYTHON_WRAPPER=ON \
-DBUILD_TUTORIALS=OFF \
-DCMAKE_SKIP_RPATH=ON \
-DWITH_BOOST=ON \
-DWITH_HDF5=ON \
-DWITH_OPENMP=ON \
-DWITH_VIGRA=OFF
# Build tests subject to nocheck.
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
BUILD_OPTIONS += -DBUILD_TESTING=ON
else
BUILD_OPTIONS += -DBUILD_TESTING=OFF
endif
%:
dh $@ --parallel --builddirectory=$(BUILDDIR) --with python2
override_dh_auto_configure-arch:
dh_auto_configure -- $(BUILD_OPTIONS) \
-DBUILD_DOCS=OFF \
-DBUILD_PYTHON_DOCS=OFF
override_dh_auto_configure-indep:
dh_auto_configure -- $(BUILD_OPTIONS) \
-DBUILD_DOCS=ON \
-DBUILD_PYTHON_DOCS=ON
override_dh_auto_test:
dh_auto_test
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
make --directory=$(BUILDDIR) test-python-wrapper
endif
override_dh_installdocs-indep:
dh_installdocs --indep
dh_doxygen --package=libopengm-doc
dh_sphinxdoc --package=python-opengm-doc
override_dh_installexamples:
dh_installexamples --exclude=CMakeLists.txt
override_dh_python2:
dh_python2
dh_numpy
override_dh_compress:
dh_compress --exclude=examples
|