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 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
|
#!/usr/bin/make -f
include /usr/share/dpkg/default.mk
build3vers := $(shell py3versions -sv)
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
export DH_OPTIONS
export PKG_CONFIG_LIBDIR=${CURDIR}
export PKG_CONFIG_ALLOW_SYSTEM_LIBS=true
export PKG_CONFIG_SYSROOT_DIR=${CURDIR}/debian/tmp/
export PKG_CONFIG_PATH=$(shell pkg-config --variable pc_path pkg-config)
export PERL_MM_OPT=INSTALLDIRS=vendor
export PYBUILD_BUILD_ARGS=build_ext -L${CURDIR}/.libs
export DEB_LDFLAGS_MAINT_APPEND = -lpthread
export DEB_CXXFLAGS_MAINT_APPEND = -Wno-nonnull
export PYBUILD_NAME = dna_jellyfish
%:
dh $@ --with python3
#override_dh_installexamples:
# dh_installexamples
# sed '/SRCDIR=/d' debian/jellyfish-examples/usr/share/doc/jellyfish-examples/examples/compat.sh*
# sed '/BUILDDIR=/d' debian/jellyfish-examples/usr/share/doc/jellyfish-examples/examples/compat.sh*
# rm -f debian/jellyfish-examples/usr/share/doc/jellyfish-examples/examples/swig*
override_dh_update_autotools_config:
# use python configuration from autoconf-archive
mv m4/m4-ax_python_devel.m4 /tmp
dh_update_autotools_config
override_dh_auto_install:
chrpath --delete bin/.libs/*
dh_auto_install -- install-data
dh_auto_install --sourcedirectory=swig/python --buildsystem=pybuild
dh_auto_install --sourcedirectory=swig/perl5
ls -l debian/tmp/usr/lib/*/perl5/*/auto/jellyfish/jellyfish.so
if [ ! -e debian/tmp/usr/lib/*/perl5/*/auto/jellyfish/jellyfish.so ] ; then sleep 1; fi
chmod +w debian/tmp/usr/lib/*/perl5/*/auto/jellyfish/jellyfish.so
chrpath --delete debian/tmp/usr/lib/*/perl5/*/auto/jellyfish/jellyfish.so
dh_install
d-shlibmove --commit \
--multiarch \
--devunversioned \
--movedev "debian/tmp/usr/include/$(DEB_SOURCE)*/$(DEB_SOURCE)/*.hpp" usr/include/$(DEB_SOURCE) \
--movedev "debian/tmp/usr/include/$(DEB_SOURCE)*/$(DEB_SOURCE)/*.h" usr/include/$(DEB_SOURCE) \
--movedev config.h usr/include/$(DEB_SOURCE) \
debian/tmp/usr/lib/*/lib$(DEB_SOURCE)-*.so
sed -i "/dependency_libs/ s/'.*'/''/" ./debian/libjellyfish-2.0-dev/usr/lib/${DEB_HOST_MULTIARCH}/*.la
chrpath --delete debian/*/usr/lib/python*/dist-packages/_dna_jellyfish*.so
override_dh_auto_configure:
dh_auto_configure -- --enable-swig --enable-perl-binding --enable-htslib --enable-python-binding PYTHON=/usr/bin/python3
dh_auto_configure --sourcedirectory=swig/perl5
dh_auto_configure --sourcedirectory=swig/python --buildsystem=pybuild
mv /tmp/m4-ax_python_devel.m4 m4
override_dh_clean:
dh_clean
if [ -d debian/tmp_save_tests ] ; then \
mv debian/tmp_save_tests/* tests ; \
rmdir debian/tmp_save_tests ; \
fi
rm -f tests/compat.sh
rm -f swig/python/jellyfish* # swig/python/dna_jellyfish.py
rm -f swig/perl5/blib/arch/auto/jellyfish/jellyfish.so
rm -f swig/perl5/blib/bin/.exists
rm -f swig/perl5/blib/lib/.exists
rm -f swig/perl5/blib/lib/auto/jellyfish/.exists
rm -f swig/perl5/blib/man1/.exists
rm -f swig/perl5/blib/man3/.exists
rm -f swig/perl5/blib/script/.exists
rm -f swig/perl5/jellyfish.bs
rm -f swig/perl5/pm_to_blib
rm -rf swig/perl5/MYMETA.json swig/perl5/MYMETA.yml swig/perl5/Makefile swig/perl5/blib/
override_dh_auto_build:
mkdir -p debian/tmp_save_tests
cp -a tests/* debian/tmp_save_tests
dh_auto_build --no-parallel -- all bin/generate_sequence bin/test_all bin/fastq2sam
dh_auto_install -- install-data
dh_auto_build --sourcedirectory=swig/perl5
dh_auto_build --sourcedirectory=swig/python --buildsystem=pybuild
# cd doc ; RUBYLIB=$PWD PATH=$PATH:../bin make clean all ; cd ..
# broken
# jellyfish contains a *really* big test which should *not* run on autobuilders
# if you have a *really* large machine you can try to activate this test by
# uncommenting the following.
#override_dh_auto_test:
# BIG=1 dh_auto_test
# false
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
ifeq ($(DEB_HOST_ARCH_BITS),32)
echo "Test data are to big for 32bit architectures thus no testing is done"
else
dh_auto_test
endif
endif
override_dh_missing:
# Python files are just installed
rm -rf debian/tmp/usr/lib/python3/dist-packages
# Necessary Perl files are just installed
rm -rf debian/tmp/usr/lib/perl/5.*
dh_missing
|