#!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 include /usr/share/dpkg/default.mk export LC_ALL=C.UTF-8 JAVA_HOME=/usr/lib/jvm/default-java JSON_SIMPLE_VERSION = $(shell dpkg -l libjson-simple-java | grep '^ii' | awk '{print $$3}') JSON_SIMPLE_3 = $(shell dpkg --compare-versions '$(JSON_SIMPLE_VERSION)' '>' '3.1.1-1~' && echo yes || echo no) ifeq (yes,$(JSON_SIMPLE_3)) JSON_SIMPLE_PACKAGE = com.github.cliftonlabs.json_simple else JSON_SIMPLE_PACKAGE = org.json.simple endif %: dh $@ --with javahelper override_dh_auto_configure: # Creating the directories for forester and jcolorbrewer, with symlinks. mkdir -p biojava-forester/src/main/java/ cp -a forester/org biojava-forester/src/main/java/ mkdir -p biojava-jcolorbrewer/src/main/java/ cp -a jcolorbrewer/org biojava-jcolorbrewer/src/main/java/ # Putting the pom.xml files of forester and jcolorbrewer into their dirs. sed 's/\(VERSION_PACKAGE\)/\1$(DEB_VERSION_UPSTREAM)/; s/VERSION_PACKAGE\(.*\)+dfsg[0-9]*/\1/' debian/poms/pomForester.xml > biojava-forester/pom.xml sed 's/\(VERSION_PACKAGE\)/\1$(DEB_VERSION_UPSTREAM)/; s/VERSION_PACKAGE\(.*\)+dfsg[0-9]*/\1/' debian/poms/pomJcolorbrewer.xml > biojava-jcolorbrewer/pom.xml dh_auto_configure override_dh_auto_build: # Insert the correct JSON_SIMPLE_PACKAGE in the code. find . -type f -name \*.java -exec grep -q 'import @JSON_SIMPLE_PACKAGE@' {} \; \ -exec sed -i.json-simple \ -e 's,@JSON_SIMPLE_PACKAGE@,$(JSON_SIMPLE_PACKAGE),' \ {} \; -print dh_auto_build override_dh_installdocs: dh_installdocs # Deleting calls to urchinTracker to enhance privacy. for F in $$(find . -name "*.html"); do \ sed -i 's/^