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
|
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
pkgdata:=microbiomeutil-data
sampledir:=$(CURDIR)/debian/$(pkgdata)/usr/share/doc/$(pkgdata)/examples
%:
dh $@
override_dh_auto_test:
ifneq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
echo 'skip testing due to DEB_BUILD_OPTIONS="$(DEB_BUILD_OPTIONS)"'
else
## Run test suite only on powerfull architectures (amd64) at build time
#ifneq (,$(filter $(DEB_HOST_ARCH),amd64 kfreebsd-amd64))
dh_auto_test
#else
# echo "Do not run test suite when building on architecture $(DEB_HOST_ARCH)"
#endif
endif
override_dh_auto_build :
dh_auto_build
#Pre-make indexes for ChimeraSlayer, otherwise it tries to write them
#to the non-writeable dir on first run and blows up
formatdb -p F -i RESOURCES/rRNA16S.gold.fasta 2>/dev/null
cdbfasta -C RESOURCES/rRNA16S.gold.NAST_ALIGNED.fasta
override_dh_auto_clean:
dh_auto_clean
rm -f RESOURCES/rRNA16S.gold.fasta.n* RESOURCES/*.cidx
rm -f formatdb.log
override_dh_install:
dh_install -XMakefile -Xsample_data -XLICENSE -XNAST-iEr.c
override_dh_installexamples:
dh_installexamples
for mod in ChimeraSlayer NAST-iEr WigeoN ; do \
mkdir -p $(sampledir)/$${mod} ; \
cp -a $${mod}/sample_data/* $(sampledir)/$${mod} ; \
sed -i -e "s?../$${mod}?$${mod}?" \
-e "s?^.*\(/util/show_malign_no_gap.pl\)?/usr/lib/NAST-iEr\1?" \
-e "s?^.*\(/run_NAST-iEr.pl\)?/usr/lib/NAST-iEr\1?" \
-e "s?^.*\(ChimeraSlayer.pl\)?/usr/lib/ChimeraSlayer/\1?" \
-e "s?^.*\(/run_WigeoN.pl\)?/usr/lib/WigeoN\1?" \
$(sampledir)/$${mod}/runMe.sh ; \
done
sed -i '1i #!/bin/sh' $(sampledir)/WigeoN/runMe.sh
override_dh_fixperms :
dh_fixperms
find debian -type f -name '*.pm' -print0 | xargs -0r chmod a-x
find debian -type f -name 'genus_counter.pl' -print0 | xargs -0r chmod a+x
get-orig-source:
mkdir -p ../tarballs
uscan --verbose --force-download --repack-compression xz --destdir ../tarballs
|