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
|
#!/usr/bin/make -f
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 =
# Introduce standard debhelper variables
DPKG_EXPORT_BUILDFLAGS = 1
DPKG_EXPORT_BUILDTOOLS = 1
include /usr/share/dpkg/default.mk
# Use correct PKG_CONFIG in configure.ac
include /usr/share/dpkg/buildtools.mk
# Let pybuild know the python binary package name
export PYBUILD_NAME = zbar
LDFLAGS_LIB_SEARCHPATH = $(strip $(shell find $(CURDIR)/zbar -name '*.so' -printf "-L%h "))
LDFLAGS_BINDINGS = $(strip $(LDFLAGS) $(LDFLAGS_LIB_SEARCHPATH))
# Explicitly set supported Qt version
export QT_SELECT := 5
# Properly set configure flags
CONFIGURE_FLAGS = --without-java --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) --with-gtk=gtk3 --with-python=python3 --with-qt5
# We enable libv4l support only on Linux platforms.
ifeq (,$(findstring linux,$(DEB_HOST_ARCH_OS)))
CONFIGURE_FLAGS += --disable-video
endif
%:
dh $@ --with gir
override_dh_auto_configure:
dh_auto_configure -- $(CONFIGURE_FLAGS)
execute_after_dh_clean:
# Also clean up perl-related files
[ ! -f $(CURDIR)/perl/Makefile ] || $(MAKE) -C perl realclean
override_dh_auto_install: build-perl
dh_auto_install
build-perl:
dh_auto_configure --sourcedirectory=perl -- INC="-I$(CURDIR)/include" LIBS="$(LDFLAGS_LIB_SEARCHPATH) -lzbar"
dh_auto_build --sourcedirectory=perl -- OTHERLDFLAGS="$(LDFLAGS_LIB_SEARCHPATH)" LD_RUN_PATH=''
dh_auto_install --sourcedirectory=perl
.PHONY: build-perl
|