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
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
%:
dh $@ --no-parallel
pkg=velvet
override_dh_auto_clean:
# If tarball was not pre-cleaned this will do it.
dh_auto_clean
rm -rf zlib
rm -rf third-party
rm -rf debian.upstream
rm -f *.pdf
find -name '._*' -delete
rm -rf contrib/MetaVelvet*
rm -rf contrib/VelvetOptimiser*
build_long_versions :
touch zlib
#Make _long version
dh_auto_build -- LONGSEQUENCES=Y OPENMP=Y velveth velvetg OPENMP=1 CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
mv velveth velveth_long ; mv velvetg velvetg_long
#Make _63 kmer version
dh_auto_build -- MAXKMERLENGTH=63 velveth velvetg OPENMP=1 CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
mv velveth velveth_63 ; mv velvetg velvetg_63
#And also one with both options
dh_auto_build -- MAXKMERLENGTH=63 LONGSEQUENCES=Y OPENMP=Y velveth velvetg OPENMP=1 CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
mv velveth velveth_63_long ; mv velvetg velvetg_63_long
#Make _127 kmer version
dh_auto_build -- MAXKMERLENGTH=127 velveth velvetg OPENMP=1 CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
mv velveth velveth_127 ; mv velvetg velvetg_127
#And also one with both options
dh_auto_build -- MAXKMERLENGTH=127 LONGSEQUENCES=Y OPENMP=Y velveth velvetg OPENMP=1 CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
mv velveth velveth_127_long ; mv velvetg velvetg_127_long
override_dh_auto_build: build_long_versions
touch zlib # prevents the zlib in the ‘third-party’ folder to be built.
dh_auto_build -- OPENMP=1 CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
dh_auto_build -- color OPENMP=1 CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
override_mh_install:
# mkdir -p debian/$(pkg)/usr/share/man/man1/
# help2man --no-info --name="simple hashing program" \
# ./velveth > debian/$(pkg)/usr/share/man/man1/velveth.1
# help2man --no-info --name="simple hashing program (colorspace version)" \
# ./velveth_de > debian/$(pkg)/usr/share/man/man1/velveth_de.1
# help2man --no-info --version-option=" " \
# --name="de Bruijn graph construction, error removal and repeat resolution" \
# ./velvetg > debian/$(pkg)/usr/share/man/man1/velvetg.1
# help2man --no-info --version-option=" " \
# --name="de Bruijn graph construction, error removal and repeat resolution (colorspace version)" \
# ./velvetg_de > debian/$(pkg)/usr/share/man/man1/velvetg_de.1
dh_install
# remove extra copies of GPL
find $(CURDIR)/debian -type f -name 'LICENSE*' -delete
#MetaVelvet should be scrubbed, and VelvetOptimiser is now separate. Note that these
#will not have been installed if this was a binarry-only build.
[ ! -e debian/velvet-example/usr ] || \
cp debian/VelvetOptimiser.README debian/velvet-example/usr/share/doc/velvet/contrib/
override_dh_installexamples-indep:
dh_installexamples -i
xz -6 debian/velvet-example/usr/share/doc/velvet/examples/*
sed -i 's?=\.\./velvet?=/usr/bin/velvet?' debian/velvet-tests/usr/share/doc/velvet/tests/run-tests.functions
#Prevent compression of user manual and sample code
override_dh_compress:
dh_compress -X.pdf -X.c -X.pl -X.h -X.xz
override_dh_pysupport :
#Not needed, Python scripts are just for examples
|