| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
include /usr/share/dpkg/default.mk |
| 4 |
|
| 5 |
build3vers := $(shell py3versions -sv) |
| 6 |
|
| 7 |
export DEB_BUILD_MAINT_OPTIONS=hardening=+all |
| 8 |
|
| 9 |
export DH_OPTIONS |
| 10 |
export PKG_CONFIG_LIBDIR=${CURDIR} |
| 11 |
export PKG_CONFIG_ALLOW_SYSTEM_LIBS=true |
| 12 |
export PKG_CONFIG_SYSROOT_DIR=${CURDIR}/debian/tmp/ |
| 13 |
export PKG_CONFIG_PATH=$(shell pkg-config --variable pc_path pkg-config) |
| 14 |
export PERL_MM_OPT=INSTALLDIRS=vendor |
| 15 |
export PYBUILD_BUILD_ARGS=build_ext -L${CURDIR}/.libs |
| 16 |
|
| 17 |
export DEB_LDFLAGS_MAINT_APPEND = -lpthread |
| 18 |
export DEB_CXXFLAGS_MAINT_APPEND = -Wno-nonnull -Wno-unused-but-set-variable |
| 19 |
export PYBUILD_NAME = dna_jellyfish |
| 20 |
|
| 21 |
%: |
| 22 |
dh $@ |
| 23 |
|
| 24 |
#override_dh_installexamples: |
| 25 |
# dh_installexamples |
| 26 |
# sed '/SRCDIR=/d' debian/jellyfish-examples/usr/share/doc/jellyfish-examples/examples/compat.sh* |
| 27 |
# sed '/BUILDDIR=/d' debian/jellyfish-examples/usr/share/doc/jellyfish-examples/examples/compat.sh* |
| 28 |
# rm -f debian/jellyfish-examples/usr/share/doc/jellyfish-examples/examples/swig* |
| 29 |
|
| 30 |
override_dh_update_autotools_config: |
| 31 |
# use python configuration from autoconf-archive |
| 32 |
mv m4/m4-ax_python_devel.m4 /tmp |
| 33 |
dh_update_autotools_config |
| 34 |
|
| 35 |
override_dh_auto_install: |
| 36 |
chrpath --delete bin/.libs/* |
| 37 |
dh_auto_install -- install-data |
| 38 |
dh_auto_install --sourcedirectory=swig/python --buildsystem=pybuild |
| 39 |
dh_auto_install --sourcedirectory=swig/perl5 |
| 40 |
ls -l debian/tmp/usr/lib/*/perl5/*/auto/jellyfish/jellyfish.so |
| 41 |
if [ ! -e debian/tmp/usr/lib/*/perl5/*/auto/jellyfish/jellyfish.so ] ; then sleep 1; fi |
| 42 |
chmod +w debian/tmp/usr/lib/*/perl5/*/auto/jellyfish/jellyfish.so |
| 43 |
chrpath --delete debian/tmp/usr/lib/*/perl5/*/auto/jellyfish/jellyfish.so |
| 44 |
dh_install |
| 45 |
d-shlibmove --commit \ |
| 46 |
--multiarch \ |
| 47 |
--devunversioned \ |
| 48 |
--movedev "debian/tmp/usr/include/$(DEB_SOURCE)*/$(DEB_SOURCE)/*.hpp" usr/include/$(DEB_SOURCE) \ |
| 49 |
--movedev "debian/tmp/usr/include/$(DEB_SOURCE)*/$(DEB_SOURCE)/*.h" usr/include/$(DEB_SOURCE) \ |
| 50 |
--movedev config.h usr/include/$(DEB_SOURCE) \ |
| 51 |
debian/tmp/usr/lib/*/lib$(DEB_SOURCE)-*.so |
| 52 |
sed -i "/dependency_libs/ s/'.*'/''/" ./debian/libjellyfish-2.0-dev/usr/lib/${DEB_HOST_MULTIARCH}/*.la |
| 53 |
chrpath --delete debian/*/usr/lib/python*/dist-packages/_dna_jellyfish*.so |
| 54 |
|
| 55 |
override_dh_auto_configure: |
| 56 |
dh_auto_configure -- --enable-swig --enable-perl-binding --enable-htslib --enable-python-binding PYTHON=/usr/bin/python3 |
| 57 |
dh_auto_configure --sourcedirectory=swig/perl5 |
| 58 |
dh_auto_configure --sourcedirectory=swig/python --buildsystem=pybuild |
| 59 |
mv /tmp/m4-ax_python_devel.m4 m4 |
| 60 |
|
| 61 |
execute_after_dh_clean: |
| 62 |
if [ -d debian/tmp_save_tests ] ; then \ |
| 63 |
mv debian/tmp_save_tests/* tests ; \ |
| 64 |
rmdir debian/tmp_save_tests ; \ |
| 65 |
fi |
| 66 |
|
| 67 |
override_dh_auto_build: |
| 68 |
mkdir -p debian/tmp_save_tests |
| 69 |
cp -a tests/* debian/tmp_save_tests |
| 70 |
dh_auto_build --no-parallel -- all bin/generate_sequence bin/test_all bin/fastq2sam |
| 71 |
dh_auto_install -- install-data |
| 72 |
dh_auto_build --sourcedirectory=swig/perl5 |
| 73 |
dh_auto_build --sourcedirectory=swig/python --buildsystem=pybuild |
| 74 |
# cd doc ; RUBYLIB=$PWD PATH=$PATH:../bin make clean all ; cd .. |
| 75 |
# broken |
| 76 |
|
| 77 |
# jellyfish contains a *really* big test which should *not* run on autobuilders |
| 78 |
# if you have a *really* large machine you can try to activate this test by |
| 79 |
# uncommenting the following. |
| 80 |
#override_dh_auto_test: |
| 81 |
# BIG=1 dh_auto_test |
| 82 |
# false |
| 83 |
override_dh_auto_test: |
| 84 |
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) |
| 85 |
ifeq ($(DEB_HOST_ARCH_BITS),32) |
| 86 |
echo "Test data are to big for 32bit architectures thus no testing is done" |
| 87 |
else |
| 88 |
if ! dh_auto_test \ |
| 89 |
; then echo "E: tests failed, ./test-suite.log follows:" \ |
| 90 |
; cat ./test-suite.log \ |
| 91 |
; echo "E: end of ./test-suite.log after test failure." \ |
| 92 |
; exit 1 \ |
| 93 |
; fi |
| 94 |
endif |
| 95 |
endif |
| 96 |
|
| 97 |
override_dh_missing: |
| 98 |
# Python files are just installed |
| 99 |
rm -rf debian/tmp/usr/lib/python3/dist-packages |
| 100 |
# Necessary Perl files are just installed |
| 101 |
rm -rf debian/tmp/usr/lib/perl/5.* |
| 102 |
dh_missing |
| 103 |
|
| 104 |
execute_after_dh_install: |
| 105 |
# Fix PACKAGE_NAME defined in config.h colliding with potential reverse |
| 106 |
# dependencies autotools invocations, per lintian warning. |
| 107 |
rm -vf debian/libjellyfish-2.0-dev/usr/include/jellyfish/config.h |