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
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DEBPKGNAME := $(shell dpkg-parsechangelog | awk '/^Source:/ {print $$2}')
sampledir:=$(CURDIR)/debian/$(DEBPKGNAME)-examples/usr/share/doc/$(DEBPKGNAME)/examples
%:
dh $@ --with autoreconf
ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU)
ifeq (amd64,$(ARCH))
DEB_CONFIGURE_EXTRA_FLAGS := --enable-threads --enable-sse
else
DEB_CONFIGURE_EXTRA_FLAGS := --enable-threads
endif
override_dh_autoreconf:
AUTOHEADER=true dh_autoreconf
override_dh_auto_configure:
dh_auto_configure -- $(DEB_CONFIGURE_EXTRA_FLAGS)
override_dh_auto_test:
make check
override_dh_auto_clean:
dh_auto_clean
rm -f testsuite/esltmp*
rm -f easel/testsuite/esltmp*
rm -f tutorial/MADE1.hmm.h3?
override_dh_compress:
dh_compress -Xtutorial/
override_dh_installexamples:
dh_installexamples
mkdir -p $(sampledir)/src/impl;
find src/ -maxdepth 1 -name "*_utest" -exec cp \{\} $(sampledir)/src/ \;
find src/impl_sse -name "*_utest" -exec cp \{\} $(sampledir)/src/impl \;
cp src/itest_brute $(sampledir)/src;
cp src/hmmpress.itest.pl $(sampledir)/src;
cp -aR testsuite $(sampledir)/;
cp -aR easel $(sampledir)/;
cp -aR tutorial $(sampledir)/;
find $(sampledir) -name 'Makefile' | xargs sed -i "s^$(CURDIR)^.^g"
find $(sampledir) -name "esltmp*" -delete;
override_dh_fixperms:
dh_fixperms
find debian -name .dropbox.attr -delete
find debian -name "*.fa" -executable -exec chmod -x \{\} \;
|