File: rules

package info (click to toggle)
comidi-clojure 0.3.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 180 kB
  • sloc: xml: 95; makefile: 24; sh: 1
file content (34 lines) | stat: -rwxr-xr-x 996 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/make -f

include /usr/share/javahelper/java-vars.mk

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

PRODUCED_JAR=comidi.jar
export CLASSPATH=/usr/share/java/clojure.jar:/usr/share/java/clj-time.jar:/usr/share/java/bidi.jar:/usr/share/java/compojure.jar:/usr/share/java/prismatic-schema.jar:/usr/share/java/kitchensink.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 --verbose clojure -cp $(CURDIR)/$(PRODUCED_JAR):$(CLASSPATH))