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
|
#!/usr/bin/make -f
#DH_VERBOSE = 1
include /usr/share/dpkg/default.mk
export HDF5_INC = /usr/include/hdf5/serial
export HDF5_LIB = /usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/serial
export GTEST_INC = /usr/include
export GTEST_SRCDIR = /usr/src/gtest
export DEB_CFLAGS_MAINT_APPEND=-O3
export DEB_CXXFLAGS_MAINT_APPEND=-O3
export LDLIBS += -lpbbam
# Needed for patch hdf5-1.10.1-support.patch
HDF5_VERSION := $(shell grep 'HDF5 Version' $(HDF5_LIB)/libhdf5.settings | awk '{print $$3}')
ifeq (yes,$(shell dpkg --compare-versions $(HDF5_VERSION) '>=' 1.10.1 && echo yes))
export DEB_CPPFLAGS_MAINT_APPEND=-DHAVE_HDF5_1_10_1
endif
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
%:
dh $@
override_dh_auto_configure:
./configure.py PREFIX=/usr/
override_dh_auto_build:
dh_auto_build -- PREFIX_INC=..
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
# Ignore the return code because some tests
# require data that is not available in the source distribution.
-$(MAKE) -k gtest
endif
override_dh_auto_install:
mkdir -p debian/libpbdata-dev/usr/include/pbseq
cp -r pbdata debian/libpbdata-dev/usr/include/pbseq/
mkdir -p debian/libpbihdf-dev/usr/include/pbseq/
cp -r hdf debian/libpbihdf-dev/usr/include/pbseq/
mkdir -p debian/libblasr-dev/usr/include/pbseq/
cp -r alignment debian/libblasr-dev/usr/include/pbseq/
find -L debian/*/usr/include/ -type f -regextype posix-egrep -not -regex '.*(hpp|h)$$' -delete
# defines.mk and build.mk files are symlinks and don't
# get removed by the previous command
find debian/*/usr/include/ -name "*.mk" -delete
dh_auto_install
override_dh_auto_clean:
dh_auto_clean
find -name defines.mk -delete
$(RM) pbdata/libconfig.h
|