File: rules

package info (click to toggle)
jlibeps 0.1%2B2-2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 176 kB
  • ctags: 161
  • sloc: java: 1,004; sh: 237; xml: 71; makefile: 26
file content (44 lines) | stat: -rwxr-xr-x 1,479 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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1

# Create versioned jar file; strip off the debian source revision and package revision
VERSION=$(shell dpkg-parsechangelog | sed -n 's/Version: \([0-9.]*\).*/\1/p')

# If the user has not explicitly set JAVA_HOME, export sensible value
# to make sure that the correct compiler is used by ant.
JAVA_HOME ?= /usr/lib/jvm/java-gcj
export JAVA_HOME

PREFIX=debian/libjlibeps-java

%:
	dh $@

override_dh_auto_clean:
	find . -name \*.jar -exec rm -f {} \;
	find . -name \*.class -exec rm -f {} \;
	rm -rf out bin api

override_dh_auto_build:
	mkdir out bin
	ant -Dbasedir=. -f debian/build.xml compile
	ant -Dbasedir=. -f debian/build.xml jar doc

override_dh_install:
	cp out/jlibeps.jar $(PREFIX)/usr/share/java/net.sourceforge.jlibeps-$(VERSION).jar

override_dh_link:
	dh_link usr/share/java/net.sourceforge.jlibeps-$(VERSION).jar usr/share/java/net.sourceforge.jlibeps.jar

# Be explicit given that there is plenty of confusion about what this target means
get-orig-source: get-latest-source

get-latest-source:
	cd $(dir $_).. && \
	uscan=$$(uscan --report --dehs --upstream-version 0) && \
	uver=$$(echo "$$uscan" | sed -n 's,<upstream-version>\(.*\)</.*>,\1,p') && \
	uurl=$$(echo "$$uscan" | sed -n 's,<upstream-url>\(.*\)</.*>,\1,p') && \
	echo debian/repackage --upstream-version "$${uver}" "$${uurl}" $(CURDIR) &&\
	sh debian/repackage --upstream-version "$${uver}" "$${uurl}" $(CURDIR)