Package list java-classpath-clojure / ad80be78-87d2-4ff2-b089-fd9ca97760c1/main debian / rules
ad80be78-87d2-4ff2-b089-fd9ca97760c1/main

Tree @ad80be78-87d2-4ff2-b089-fd9ca97760c1/main (Download .tar.gz)

rules @ad80be78-87d2-4ff2-b089-fd9ca97760c1/mainraw · history · blame

#!/usr/bin/make -f

include /usr/share/javahelper/java-vars.mk
include /usr/share/dpkg/pkg-info.mk

MDWN_DOCS = $(patsubst %.md,%.html,$(wildcard $(CURDIR)/*.md))

export CLASSPATH=/usr/share/java/clojure.jar

PRODUCED_JAR=java.classpath.jar

%:
	dh $@ --with javahelper --with maven_repo_helper

override_jh_build: $(MDWN_DOCS)
	jar cf $(PRODUCED_JAR) -C src/main/clojure .
	mkdir -p $(CURDIR)/doc/html && mv $^ $(CURDIR)/doc/html

override_jh_clean:
	jh_clean
	rm -f $(CURDIR)/$(PRODUCED_JAR)
	rm -rf $(CURDIR)/doc

%.html:%.md
	@echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"' \
		'"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' > $@
	@echo "<html>" >> $@
	@echo "<head>" >> $@
	@echo "<title>$(shell head -n 1 $< | sed 's/^#*\s*//')</title>" >> $@
	@echo "</head>" >> $@
	@echo "<body>" >> $@
	markdown $< >> $@
	@echo "</body>" >> $@
	@echo "</html>" >> $@