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
|
#!/usr/bin/make -f
DH_VERBOSE := 1
include /usr/share/dpkg/default.mk
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export CPPFLAGS=$(shell dpkg-buildflags --get CPPFLAGS)
export HTS_LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS)
export GIT_VERSION=$(DEB_VERSION)
%:
dh $@ --buildsystem cmake
override_dh_clean:
dh_clean
find . -name "*.o" -delete
rm -f README.html
override_dh_auto_clean:
dh_auto_clean || true
override_dh_auto_configure:
dh_auto_configure -- -DOPENMP=ON
override_dh_auto_build:
dh_auto_build
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
markdown README.md > README.html
endif
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
export LD_LIBRARY_PATH=$(CURDIR)/obj-${DEB_HOST_GNU_TYPE}/:$$LD_LIBRARY_PATH && cd test && $(MAKE)
endif
override_dh_install:
dh_install
find debian -name filevercmp.h -delete
cp -a filevercmp/filevercmp.h debian/libvcflib-dev/usr/include/vcflib/
mkdir -p debian/libvcflib-dev/usr/include/intervaltree
mv debian/libvcflib-dev/usr/include/vcflib/IntervalTree.h debian/libvcflib-dev/usr/include/intervaltree
# install pkg-config file
mkdir -p $(CURDIR)/debian/libvcflib-dev/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig
mv libvcflib.pc $(CURDIR)/debian/libvcflib-dev/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig
rm -rf debian/*/usr/lib/vcflib/bin/*.R
for pl in `grep -Rl '#!/usr/bin/env' debian/*/usr/*` ; do \
sed -i '1s?^#!/usr/bin/env[[:space:]]\+perl?#!/usr/bin/perl?' $${pl} ; \
done
override_dh_fixperms:
dh_fixperms
chmod -x debian/*/usr/lib/R/site-library/*/*.R
|