File: rules

package info (click to toggle)
ring-clojure 1.8.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 680 kB
  • sloc: makefile: 40; sh: 39; javascript: 1
file content (48 lines) | stat: -rwxr-xr-x 1,208 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

export LEIN_HOME=$(CURDIR)/.lein
export LEIN_OFFLINE=true
SUB_PROJECTS=ring-core ring-servlet ring-jetty-adapter

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

override_dh_auto_configure:
	cp -rs /usr/share/maven-repo debian

override_dh_auto_build:
	$(foreach sub,$(SUB_PROJECTS), \
		set -e; \
		cd $(CURDIR)/$(sub); \
		lein pom ../debian/$(sub).pom.xml; \
		lein jar; \
		cd target && ln -sf $(sub)-$(DEB_VERSION_UPSTREAM).jar $(sub).jar; \
		cd $(CURDIR); \
		mkdir -p debian/maven-repo/ring/$(sub)/debian; \
		cp -s $(CURDIR)/$(sub)/target/$(sub).jar \
			debian/maven-repo/ring/$(sub)/debian/$(sub)-debian.jar; \
		cp -s $(CURDIR)/debian/$(sub).pom.xml \
			debian/maven-repo/ring/$(sub)/debian/$(sub)-debian.pom; \
	)

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	$(foreach sub,$(SUB_PROJECTS), \
		set -e; \
		cd $(CURDIR)/$(sub); \
		lein test; \
	)
endif

override_dh_clean:
	rm -f .lein-failures
	rm -Rf .lein debian/maven-repo
	for sub in $(SUB_PROJECTS) ; do \
		rm -f .lein-failures; \
		rm -f debian/$$sub.pom.xml; \
		rm -Rf $$sub/target; \
	done
	dh_clean