#!/usr/bin/make -f # DH_VERBOSE := 1 export DEB_BUILD_MAINT_OPTIONS=hardening=+all include /usr/share/dpkg/default.mk OS := $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS) CPU := $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU) MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) # since build-results are not ending up in the proper dir its saver to use "*" instead of "$(CPU)" SODIR := $(DEB_SOURCE)/$(MULTIARCH)/$(DEB_SOURCE)/$(OS)/gcc/* build2vers := $(shell pyversions -sv) build3vers := $(shell py3versions -sv) %: dh $@ --with python2,python3,javahelper,jh_maven_repo_helper override_dh_auto_clean: if [ -e ngs-sdk/Makefile.config.$(OS).$(CPU) ] ; then \ # dh_auto_clean --sourcedirectory=$(DEB_SOURCE) ; \ dh_auto_clean ; \ fi rm -rf ngs-java/$(MULTIARCH) rm -rf ngs-bam/$(MULTIARCH) rm -f ngs-bam/Makefile.config rm -f ngs-bam/Makefile.config.install.linux.x86_64.prl rm -f ngs-bam/Makefile.config.linux.x86_64 rm -f ngs-bam/reconfigure rm -rf $(DEB_SOURCE)/$(MULTIARCH) rm -rf ngs-python/build override_dh_auto_configure: # # that's no standard configure script lacking support of default options \ ./configure --build=$(MULTIARCH) --prefix=/usr -- --source=1.7 override_dh_auto_build: #dh_auto_build --sourcedirectory=$(DEB_SOURCE) echo "DEBPKGNAME: $DEBPKGNAME" dh_auto_build --sourcedirectory=$(DEB_SOURCE) # Remove ngs-bam generation, expects ngs-sdk and cannot find a way # to specify it #cd ngs-bam && LD_LIBRARY_PATH=../$(SODIR)/rel/lib ./configure --build=$(MULTIARCH) --prefix=/usr --with-ngs-sdk-prefix=../ngs-sdk #dh_auto_build --sourcedirectory=ngs-bam dh_auto_build --sourcedirectory=ngs-java -- JAVAC="javac -source 1.7 -target 1.7" markdown_py -f README.html README.md override_dh_auto_test: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) make -C $(DEB_SOURCE)/test # Tests of Java binding disabled because need external lib ncbi-vdb, # not available in Debian at this time #CLASSPATH=../$(MULTIARCH)/ngs-java/jar/ngs-java.jar LD_LIBRARY_PATH=$(SODIR)/rel/lib:$(LD_LIBRARY_PATH) make -C ngs-java/examples #CLASSPATH=../$(MULTIARCH)/ngs-java/jar/ngs-java.jar LD_LIBRARY_PATH=../../$(SODIR)/rel/lib:$(LD_LIBRARY_PATH) make -C ngs-java/examples run_all endif override_dh_auto_install: d-shlibmove --commit \ --multiarch \ --devunversioned \ --exclude-a \ --exclude-la \ --movedev "$(SODIR)/rel/lib/*.a*" usr/lib/$(MULTIARCH) \ --movedev "$(SODIR)/rel/ilib/*.a" usr/lib/$(MULTIARCH) \ --movedev ngs-sdk/ngs usr/include \ $(SODIR)/rel/lib/libngs-sdk.so override_dh_install: dh_install -ppython3-ngs set -e && for i in $(build3vers); do \ cd ngs-python ; \ python$$i ./setup.py install --install-layout=deb --root ../debian/python3-ngs; \ cd .. ; \ done dh_install -ppython-ngs set -e && for i in $(build2vers); do \ cd ngs-python ; \ python$$i ./setup.py install --install-layout=deb --root ../debian/python-ngs; \ cd .. ; \ done find debian -name "*.pyc" -delete find debian -type d -name __pycache__ | xargs rm -rf # require network, not automatically run # use it when the pom file must be re-downloaded from maven repo BASE_URL:=https://repo.maven.apache.org/maven2/gov/nih/nlm/ncbi/ngs-java WGET=wget --no-clobber get-poms: $(RM) debian/ngs-java.pom debian/ngs-java.pom.asc # extract upstream version $(WGET) -O debian/ngs-java.pom $(BASE_URL)/$(DEB_VERSION_UPSTREAM)/ngs-java-$(DEB_VERSION_UPSTREAM).pom && \ $(WGET) -O debian/ngs-java.pom.asc $(BASE_URL)/$(DEB_VERSION_UPSTREAM)/ngs-java-$(DEB_VERSION_UPSTREAM).pom.asc gpg --trust-model=always --status-fd 1 --no-default-keyring --keyring debian/sra-tools.gpg --verify debian/ngs-java.pom.asc