#!/usr/bin/make -f include /usr/share/javahelper/java-vars.mk MDWN_DOCS = $(patsubst %.md,%.html,$(wildcard $(CURDIR)/*.md)) PRODUCED_JAR=fast-zip-visit.jar export CLASSPATH=/usr/share/java/clojure.jar:/usr/share/java/fast-zip.jar %: dh $@ --with javahelper --with jh_maven_repo_helper override_jh_build: $(MDWN_DOCS) jar cf $(PRODUCED_JAR) -C src . mkdir -p $(CURDIR)/doc/html && mv $(CURDIR)/*.html $(CURDIR)/doc/html override_jh_classpath: jh_classpath $(PRODUCED_JAR) override_jh_clean: jh_clean rm -f $(CURDIR)/$(PRODUCED_JAR) rm -rf $(CURDIR)/doc/html %.html:%.md cat debian/header.html > $@ sed -i'' -e 's#@TITLE@#$(shell head -n 1 $< | sed 's/^#*\s*//')#g' $@ markdown $< >> $@ cat debian/footer.html >> $@ override_dh_auto_test: dh_auto_test (cd test && find . -name "*.clj" | \ xargs clojure -cp $(CURDIR)/$(PRODUCED_JAR):$(CLASSPATH))