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 76 77 78 79
|
#!/usr/bin/make -f
# DH_VERBOSE := 1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
include /usr/share/dpkg/default.mk
mandir=$(CURDIR)/debian/$(DEB_SOURCE)/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_,,$@)
# restore the old naming to avoid name space conflict with serial build
if [ -x build.omp/iqtree2 ] ; then mv build.omp/iqtree2 build.omp/iqtree2-omp ; fi
dh_auto_install_%:
if [ "$(subst dh_auto_install_,,$@)" != "omp" ] ; then dh_auto_install -Bbuild.$(subst dh_auto_install_,,$@); fi
override_dh_install:
dh_install
find debian -name iqtree2-mpi -exec chrpath --delete \{\} \;
find debian -name iqtree2-omp -exec chrpath --delete \{\} \;
dh_auto_clean_%:
dh_auto_clean -Bbuild.$(subst dh_auto_clean_,,$@)
override_dh_installexamples:
# somehow the example config is installed in /usr by cmake
find debian/$(DEB_SOURCE) -name example.cf -delete
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="$(DEB_VERSION_UPSTREAM)" $(CURDIR)/debian/$(DEB_SOURCE)/usr/bin/iqtree2 > $(mandir)/iqtree2.1
help2man --no-info --no-discard-stderr --help-option="-h" \
--name='efficient phylogenetic software by maximum likelihood (multiprocessor version)' \
--version-string="$(DEB_VERSION_UPSTREAM)" $(CURDIR)/debian/$(DEB_SOURCE)/usr/bin/iqtree2-omp > $(mandir)/iqtree2-omp.1
help2man --no-info --no-discard-stderr --help-option="-h" \
--name='efficient phylogenetic software by maximum likelihood (multiprocessor version)' \
--version-string="$(DEB_VERSION_UPSTREAM)" $(CURDIR)/debian/$(DEB_SOURCE)/usr/bin/iqtree2-mpi > $(mandir)/iqtree2-mpi.1
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
# 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/iqtree2-omp -s example.phy -redo' >> example.short
time sh example.short
rm example.short
endif
endif
|