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
include /usr/share/dpkg/architecture.mk
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
export DH_VERBOSE = 1
export DEB_LDFLAGS_MAINT_APPEND=-lavformat -lm
# Local (first) is needed for the bindings to find libmediascan
# System (second) is needed because otherwise it only builds on amd64
export INCLUDE=$(CURDIR)/include:/usr/include/${DEB_HOST_MULTIARCH}
PERLVER := $(shell perl -MConfig -e 'print $$Config{version}')
export PERL_VENDORARCH := $(shell perl -I/usr/lib/$(DEB_HOST_MULTIARCH)/perl/cross-config-$(PERLVER) -MConfig -e 'print $$Config{vendorarch}')
%:
dh $@
c-configure-stamp:
dh_auto_configure
touch $@
c-build-stamp: c-configure-stamp
dh_auto_build
touch $@
c-test-stamp: c-build-stamp
dh_auto_test
touch $@
perl-configure-stamp: c-build-stamp
dh_auto_configure --sourcedir=$(CURDIR)/bindings/perl -- verbose \
--with-lms-includes=$(CURDIR)/include \
--with-lms-libs=$(CURDIR)/src/.libs
touch $@
perl-build-stamp: perl-configure-stamp
dh_auto_build --sourcedir=$(CURDIR)/bindings/perl
touch $@
perl-test-stamp: perl-build-stamp
LD_LIBRARY_PATH=$(CURDIR)/src/.libs dh_auto_test --sourcedir=$(CURDIR)/bindings/perl
touch $@
override_dh_auto_clean:
dh_auto_clean
dh_auto_clean --sourcedir=$(CURDIR)/bindings/perl
override_dh_auto_configure: c-configure-stamp
override_dh_auto_build: c-build-stamp
override_dh_auto_test: c-test-stamp perl-test-stamp
override_dh_auto_install: c-build-stamp perl-build-stamp
chrpath --delete $(CURDIR)/bindings/perl/blib/arch/auto/Media/Scan/Scan.so
dh_install
|