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
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
CPPFLAGS:= $(shell dpkg-buildflags --get CPPFLAGS)
CFLAGS:= $(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS)
CXXFLAGS:= $(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS)
LDFLAGS:= $(shell dpkg-buildflags --get LDFLAGS)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
PREFIX:= /usr
ifeq ($(origin CC),default)
CC := $(DEB_HOST_GNU_TYPE)-gcc
endif
export CFLAGS
export CPPFLAGS
export LDFLAGS
export PREFIX
disable_test=0
# BTS: #755170
# sparc: out of memory
ifneq (,$(findstring $(DEB_HOST_ARCH),sparc))
disable_test=1
endif
ifneq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
disable_test=1
endif
%:
dh $@
override_dh_auto_build:
dh_auto_build -- CC=$(CC)
override_dh_auto_install:
dh_auto_install -- CC=$(CC)
override_dh_install:
make install DESTDIR=$$(pwd)/debian/tmp LIBDIR=$(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH) CC=$(CC)
dh_install
override_dh_auto_test:
ifeq "$(disable_test)" "0"
make test
endif
override_dh_strip:
dh_strip -a --dbg-package=liblz4-1-dbg
|