File: rules

package info (click to toggle)
zbar 0.22-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 4,068 kB
  • sloc: ansic: 28,570; objc: 5,724; cpp: 3,329; python: 970; java: 818; sh: 749; xml: 707; perl: 491; makefile: 151
file content (64 lines) | stat: -rwxr-xr-x 1,747 bytes parent folder | download
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
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
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 = -Wl,--as-needed

# Introduce standard debhelper variables
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk

PERL ?= /usr/bin/perl

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)

# We enable libv4l support only on Linux platforms.
ifeq (,$(findstring linux,$(DEB_HOST_ARCH_OS)))
    CONFIGURE_FLAGS += --disable-video
endif



%:
	dh $@ --with python2

override_dh_auto_configure:
	dh_auto_configure -- $(CONFIGURE_FLAGS)

override_dh_missing:
	dh_missing --list-missing

override_dh_strip:
	dh_strip --dbgsym-migration='zbar-dbg (<< 0.21~)'

override_dh_clean:
	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