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
|
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1
#
# see FEATURE AREAS in dpkg-buildflags(1)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
#
# see ENVIRONMENT in dpkg-buildflags(1)
# package maintainers to append CFLAGS
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
# package maintainers to append LDFLAGS
#export DEB_LDFLAGS_MAINT_APPEND =
# Workaround of https://github.com/zxing-cpp/zxing-cpp/issues/900
# See https://bugs.debian.org/1095196
# Should be removed once zxing-cpp (>= 2.3.1) is packaged
#export DEB_CXXFLAGS_MAINT_APPEND = -DNDEBUG
# no longer needed since patches/828.patch merged
# Try to export buildflags. No guarantee to be useful yet
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk
include /usr/share/dpkg/buildflags.mk
%:
dh $@ --with python3
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
TEST_FLAG := ON
else
TEST_FLAG := OFF
endif
# PYTHON_EXECUTABLE: force selection of default python version
#
# UNIT_TESTS: should only be used in debug builds, disable it
# following upstream recommendation.
#
# CMAKE_CXX_STANDARD: default to 20 (omitted).
# WARNING: changing this flag will break ABI!
#
override_dh_auto_configure:
dh_auto_configure -- \
-DZXING_BLACKBOX_TESTS=$(TEST_FLAG) \
-DZXING_UNIT_TESTS=OFF \
-DZXING_PYTHON_MODULE=ON \
-DZXING_C_API=ON \
-DZXING_USE_BUNDLED_ZINT=ON \
-DZXING_DEPENDENCIES=LOCAL \
-DPYTHON_EXECUTABLE:FILEPATH=$(shell command -v $$(py3versions -d))
override_dh_auto_test:
# Exclude tests that needs samples directory
dh_auto_test -- \
ARGS\+=-E \
ARGS\+=ReaderTest\\\|ZXingCTest \
$(NULL)
|