debian swirl logo

Back to the packages list seqan

#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
export DH_VERBOSE= 1

# Droping -fstack-protector flag helps **drastically** reducing memory consumption when building the package!!!!
export CXXFLAGS:= $(shell dpkg-buildflags --get CXXFLAGS | sed 's/-fstack-protector *//')

DEB_HOST_ARCH       ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)

%:
		dh $@

override_dh_auto_build:
		dh_auto_build
		cd obj-$(DEB_BUILD_GNU_TYPE); make docs

override_dh_install:
		dh_install
	# /usr/bin/join is part of coreutils package: Avoid name conflict by renaming it to seqan-join
	# This solution is withdrawn in favour of just providing a set of binaries according to upstream
	# in /usr/bin (via symlink) while others go to /usr/lib/seqan/bin (see README.Debian)
	# mv $(CURDIR)/debian/seqan-apps/usr/bin/join $(CURDIR)/debian/seqan-apps/usr/bin/seqan-join
	#
	# Formerly binaries were installed into usr/lib/seqan/bin/
	# and only some of them were made available in /usr/bin via dh_link
	# Since there is no obvious reason for this neither is there any
	# documentation that explains the motivation this is commented here.
	#for APP in `find $(CURDIR)/obj*/apps -mindepth 1 -maxdepth 1 -executable -type f` ; do \
	#  cp -a $$APP $(CURDIR)/debian/seqan-apps/usr/lib/seqan/bin/ ; done
	# ------------------------------------------------------------------
	# Formerly readmes were named README.app.  It seems more consistent
	# to keep upstream documentation layout which in addition contains
	# some example files.  So the old code is commented here.
	#for APP in `find apps -name README` ; do \
	#  app=`echo $$APP | sed 's?.*apps/\(.\+\)/README?\1?'` ; \
	#  echo $$app ; \
	#  cp -a $$APP $(CURDIR)/debian/seqan-apps/usr/share/doc/seqan-apps/README.$$app ; \
	#done
	# ------------------------------------------------------------------
	# Delete additional LICENSE files
		find $(CURDIR)/debian/seqan-apps -type f -name LICENSE -delete
		if [ -d $(CURDIR)/debian/seqan-dev ] ; then \
		    find $(CURDIR)/debian/seqan-dev  -type f -name LICENSE -delete ; \
	    # Delete *.pyc files that somehow end up in seqan-dev documentation \
		    find $(CURDIR)/debian/seqan-dev -type f -name "*.pyc" -delete ; \
		fi

override_dh_auto_clean:
		dh_auto_clean
		find . -type f -name "*.pyc" -delete
		if [ -d orig ] ; then \
		  for header in `find orig -name "*generated_forwards.h"` ; do \
		    mv $${header} `echo $$header | sed 's?orig/??'` ; \
		  done ; \
		fi
		rm -rf orig

override_dh_link:
		dh_link
	# we generate only those manpages where binaries are linked to /usr/bin
        # since dh_link is executed after dh_installmanpages this is done here
		$(CURDIR)/debian/generate_manpages

override_dh_auto_test:
# Run test suite only on powerfull architectures (amd64) at build time
ifneq (,$(filter $(DEB_HOST_ARCH),amd64 kfreebsd-amd64))
		dh_auto_test
else
		echo "Do not run test suite when building on architecture $(DEB_HOST_ARCH)"
endif

get-orig-source:
		uscan --verbose --force-download

Builds:

seqan-apps
c++ library for the analysis of biological sequences
seqan-dev
c++ library for the analysis of biological sequences (development)