#!/usr/bin/make -f #DH_VERBOSE = 1 export LC_ALL=C.UTF-8 include /usr/share/dpkg/default.mk export PYBUILD_NAME = pbalign BUILDDIR = $(CURDIR)/debian/python-pbalign BINDIR=$(BUILDDIR)/usr/bin HELP2MAN = help2man --no-info --version-string $(DEB_VERSION_UPSTREAM) MANDIR = $(CURDIR)/debian/$(DEB_SOURCE)/usr/share/man/man1 %: dh $@ --with=python2 --buildsystem=pybuild override_dh_auto_build: dh_auto_build $(MAKE) doc # The tests cannot be run, mostly because the referenced data files # (which are large) are not provided in the source distribution #override_dh_auto_test: # export PYTHONPATH=$(CURDIR); \ # cd tests/unit && python -m unittest discover override_dh_install: dh_install # Remove .py suffix from scripts (we'll make symlinks to replace them) for script in extractUnmappedSubreads \ loadChemistry \ createChemistryHeader \ maskAlignedReads; \ do \ mv $(BINDIR)/$$script.py $(BINDIR)/$$script; \ # mv $(MANDIR)/$$script.py.1 $(MANDIR)/$$script.1; \ done # Place executables in the pbalign package mkdir -p $(CURDIR)/debian/$(DEB_SOURCE)/usr/bin mv $(BINDIR)/* $(CURDIR)/debian/$(DEB_SOURCE)/usr/bin no_override_dh_installmanpages: SHELL=bash no_override_dh_installmanpages: # Create manpages - this is deactivated in favour of debian/createmanpages script which is executed before creating the package mkdir -p $(MANDIR) declare -A description; \ description=( \ [pbalign]="Mapping PacBio sequences to references" \ [maskAlignedReads.py]="Mask aligned reads in regions file" \ [createChemistryHeader.py]="Create a SAM header with PacBio sequencing chemistry information" \ [loadChemistry.py]="Load PacBio sequencing chemistry information" \ [extractUnmappedSubreads.py]="Extract unmapped subreads from a fasta file" \ ); \ set -x \ export PYTHONPATH=$(BUILDDIR)/usr/lib/python2.7/dist-packages; \ for executable in $(BUILDDIR)/usr/bin/*; \ do \ $(HELP2MAN) --name="$${description[`basename $$executable`]}" \ $$executable > $(MANDIR)/`basename $$executable.1`; \ done override_dh_auto_clean: dh_auto_clean rm -rf doc/_build/ rm -f doc/pbalign.alignservice.rst doc/pbalign.rst doc/pbalign.tasks.rst doc/pbalign.tools.rst doc/pbalign.utils.rst rm -rf pbalign.egg-info