| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 5 |
ifeq ($(DEB_HOST_ARCH),i386) |
| 6 |
export DEB_CFLAGS_MAINT_APPEND = -msse2 |
| 7 |
endif |
| 8 |
|
| 9 |
include /usr/share/dpkg/default.mk |
| 10 |
pkgdata:=infernal |
| 11 |
sampledir:=$(CURDIR)/debian/$(DEB_SOURCE)/usr/share/doc/$(DEB_SOURCE)/examples |
| 12 |
sampledir_lib:=$(CURDIR)/debian/$(DEB_SOURCE)/usr/lib/$(DEB_TARGET_MULTIARCH)/$(DEB_SOURCE)/examples |
| 13 |
export DATE=$(shell date --date=@$(SOURCE_DATE_EPOCH) '+%d %B %Y') |
| 14 |
|
| 15 |
%: |
| 16 |
dh $@ |
| 17 |
|
| 18 |
override_dh_auto_clean: |
| 19 |
if [ -r Makefile ]; then $(MAKE) distclean; fi |
| 20 |
-cd documentation/userguide && if [ -r Makefile ]; then make distclean; fi |
| 21 |
-cd easel/documentation && if [ -r Makefile ]; then make distclean; fi |
| 22 |
dh_clean *.1 */*.log *.log */Makefile Makefile documentation/manpages/*.1 |
| 23 |
rm -f testsuite/i49.tbl |
| 24 |
|
| 25 |
override_dh_compress: |
| 26 |
dh_compress -X.pdf |
| 27 |
|
| 28 |
override_dh_auto_configure-arch: |
| 29 |
dh_auto_configure -a |
| 30 |
|
| 31 |
override_dh_auto_build-arch: |
| 32 |
dh_auto_build -a -- V=1 |
| 33 |
|
| 34 |
override_dh_auto_build-indep_see_debian_README.source: |
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
cd documentation/userguide ; \ |
| 39 |
sed -e 's/@INFERNAL_VERSION@/$(DEB_VERSION_UPSTREAM)/' -e 's/@INFERNAL_DATE@/$(DATE)/' titlepage.tex.in > titlepage.tex ; \ |
| 40 |
echo " LATEX Userguide.pdf (see latex.log for output)" ; \ |
| 41 |
echo "%% This chapter automatically generated. Do not edit." > manpages.tex ; \ |
| 42 |
echo "\section{Manual pages}" >> manpages.tex ; \ |
| 43 |
for file in ../manpages/*.man ; do\ |
| 44 |
rman -f LaTeX2e $$file 2>/dev/null | /usr/share/doc/hmmer/examples/easel/devkit/rmanprocess.pl >> manpages.tex ;\ |
| 45 |
done ; \ |
| 46 |
pdflatex main > latex.log 2>&1 ; \ |
| 47 |
bibtex main >> latex.log 2>&1 ; \ |
| 48 |
pdflatex main >> latex.log 2>&1 ; \ |
| 49 |
pdflatex main >> latex.log 2>&1 ; \ |
| 50 |
mv main.pdf Userguide.pdf |
| 51 |
|
| 52 |
override_dh_auto_install-arch: |
| 53 |
$(MAKE) install $(DEB_BUILD_OPTION_PARALLEL:%=-j %) AM_UPDATE_INFO_DIR=no V=1 prefix=$(CURDIR)/debian/tmp |
| 54 |
|
| 55 |
override_dh_auto_configure-indep: |
| 56 |
override_dh_auto_build-indep: |
| 57 |
override_dh_auto_install-indep: |
| 58 |
echo "Nothing to do for architecture all binary packages" |
| 59 |
|
| 60 |
override_dh_install-arch: |
| 61 |
dh_install -a |
| 62 |
for bin in `ls $(CURDIR)/debian/infernal/usr/lib/infernal` ; do \ |
| 63 |
if [ $$bin != cmalign ] ; then \ |
| 64 |
ln -s cmalign $(CURDIR)/debian/infernal/usr/bin/$$bin ; \ |
| 65 |
fi ; \ |
| 66 |
done |
| 67 |
|
| 68 |
override_dh_installexamples-arch: |
| 69 |
dh_installexamples -a |
| 70 |
mkdir -p $(sampledir) |
| 71 |
mkdir -p $(sampledir_lib)/src/ |
| 72 |
mkdir -p $(sampledir_lib)/easel/miniapps/ |
| 73 |
find ./src -name "*test" -exec cp \{\} $(sampledir_lib)/src/ \; |
| 74 |
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) |
| 75 |
cp ./src/itest_brute $(sampledir_lib)/src/ |
| 76 |
endif |
| 77 |
find ./easel/miniapps/ -maxdepth 1 -type f -name "esl-*" ! -name "*itest*" -executable -exec cp -t $(sampledir_lib)/easel/miniapps/ {} + |
| 78 |
cd $(sampledir) && ln -s ../../../../lib/$(DEB_TARGET_MULTIARCH)/$(DEB_SOURCE)/examples/easel ./easel \ |
| 79 |
&& ln -s ../../../../lib/$(DEB_TARGET_MULTIARCH)/$(DEB_SOURCE)/examples/src ./src |
| 80 |
cp -aR testsuite $(sampledir)/ |
| 81 |
rm -f $(sampledir)/testsuite/*.tbl |
| 82 |
cp ./easel/devkit/sqc $(sampledir)/ |