Package list java-classpath-clojure / eaab7d7b-069f-4f88-aa38-88a5173dd633/main debian / rules
eaab7d7b-069f-4f88-aa38-88a5173dd633/main

Tree @eaab7d7b-069f-4f88-aa38-88a5173dd633/main (Download .tar.gz)

rules @eaab7d7b-069f-4f88-aa38-88a5173dd633/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

get-orig-source:
	uscan --download-version $(DEB_VERSION_UPSTREAM) --force-download --rename

%.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>" >> $@