File: rules

package info (click to toggle)
clj-time-clojure 0.14.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 264 kB
  • sloc: xml: 92; makefile: 33
file content (48 lines) | stat: -rwxr-xr-x 1,440 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/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:/usr/share/java/joda-time.jar
TEST_CLASSPATH=/usr/share/java/java.jdbc.jar

PRODUCED_JAR=clj-time.jar

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

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

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

override_jh_classpath:
	jh_classpath $(PRODUCED_JAR)

# Sorting the filenames according to the C locale is sufficient to get a
# successful run as of 0.14.0 but further updates might need to encode a
# specific sequence instead (#917743):
override_dh_auto_test:
	(cd test && find . -name '*.clj' | LC_ALL=C sort | \
		xargs --verbose clojure -cp $(CURDIR)/$(PRODUCED_JAR):$(CLASSPATH):$(TEST_CLASSPATH))

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