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
|
#!/usr/bin/make -f
# DH_VERBOSE := 1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
pkg := $(shell dpkg-parsechangelog | sed -n 's/^Source: //p')
version=$(shell dpkg-parsechangelog -ldebian/changelog | grep Version: | cut -f2 -d' ' | cut -f1 -d- )
mandir=$(CURDIR)/debian/$(pkg)/usr/share/man/man1/
%:
dh $@
VARIANTS = omp serial mpi
override_dh_auto_configure: $(foreach variant,$(VARIANTS),dh_auto_configure_$(variant))
override_dh_auto_build: $(foreach variant,$(VARIANTS),dh_auto_build_$(variant))
override_dh_auto_install: $(foreach variant,$(VARIANTS),dh_auto_install_$(variant))
override_dh_auto_clean: $(foreach variant,$(VARIANTS),dh_auto_clean_$(variant))
dh_auto_configure_mpi:
dh_auto_configure -Bbuild.mpi -- -DIQTREE_FLAGS="mpi"
dh_auto_configure_omp:
dh_auto_configure -Bbuild.omp -- -DIQTREE_FLAGS="omp"
dh_auto_configure_serial:
dh_auto_configure -Bbuild.serial -- -DIQTREE_FLAGS=""
dh_auto_build_%:
dh_auto_build -Bbuild.$(subst dh_auto_build_,,$@)
dh_auto_install_%:
dh_auto_install -Bbuild.$(subst dh_auto_install_,,$@)
dh_auto_clean_%:
dh_auto_clean -Bbuild.$(subst dh_auto_clean_,,$@)
override_dh_installexamples:
dh_installexamples
# remove example files in unusual dir
rm -f debian/*/usr/models.nex
rm -f debian/*/usr/example.[np][eh][xy]
override_dh_installman:
mkdir -p $(mandir)
help2man --no-info --no-discard-stderr --help-option="-h" \
--name='efficient phylogenetic software by maximum likelihood' \
--version-string="$(version)" $(CURDIR)/debian/$(pkg)/usr/bin/iqtree > $(mandir)/iqtree.1
help2man --no-info --no-discard-stderr --help-option="-h" \
--name='efficient phylogenetic software by maximum likelihood (multiprocessor version)' \
--version-string="$(version)" $(CURDIR)/debian/$(pkg)/usr/bin/iqtree-omp > $(mandir)/iqtree-omp.1
help2man --no-info --no-discard-stderr --help-option="-h" \
--name='efficient phylogenetic software by maximum likelihood (multiprocessor version)' \
--version-string="$(version)" $(CURDIR)/debian/$(pkg)/usr/bin/iqtree-mpi > $(mandir)/iqtree-mpi.1
override_dh_auto_test:
# use only the first example for build time test to save time on autobuilders
# if [ "`find $(CURDIR) -name iqtree -type f -executable`" = "" ] ; then \
# iqtreeomp=`find $(CURDIR) -name iqtree-omp -type f -executable` ; \
# ln -s iqtree-omp `dirname $$iqtreeomp`/iqtree ; \
# fi
ifneq ($(shell nproc), 1)
sed '/ myprefix/,$$d' debian/Documents_source/example.sh > example.short
echo 'time $(CURDIR)/build.omp/iqtree-omp -s example.phy -omp 2 -redo' >> example.short
time sh example.short
rm example.short
endif
|