File: rules

package info (click to toggle)
java-imaging-utilities 0.14.2%2B3-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 2,280 kB
  • ctags: 3,725
  • sloc: java: 31,190; sh: 238; makefile: 53; xml: 30
file content (78 lines) | stat: -rwxr-xr-x 2,349 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/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

build: build-stamp

build-stamp:
	dh_testdir
	ant -DVERSION=$(VERSION) -Dbasedir=. -f debian/build.xml jar doc
	cd doc/manual                            ; \
	pdflatex java-imaging-utilities-manual   ; \
	pdflatex java-imaging-utilities-manual
	touch $@

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp
	find . -name \*.jar -exec rm -f {} \;
	find . -name \*.class -exec rm -f {} \;
	rm -f doc/manual/*.aux doc/manual/*.log doc/manual/*.out doc/manual/*.pdf doc/manual/*.toc
	rm -rf api
	dh_clean 

install: build
	dh_testdir
	dh_testroot
	dh_clean -k 
	dh_installdirs

# Build architecture-dependent files here.
binary-arch:

# Build architecture-independent files here.
binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installdirs -i
	
	# libjiu-java-doc depends on libjiu-java so we can link in /usr/share/doc
	dh_link -p libjiu-java-doc usr/share/doc/libjiu-java usr/share/doc/libjiu-java-doc
	dh_installchangelogs -plibjiu-java doc/ChangeLog
	dh_installdocs
	rm -f debian/libjiu-java-doc/usr/share/doc/libjiu-java/copyright
	dh_install
	dh_link -p libjiu-java usr/share/java/net.sourceforge.jiu-$(VERSION).jar usr/share/java/net.sourceforge.jiu.jar
	dh_installexamples
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch

# 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)


.PHONY: build clean binary-indep binary-arch binary install get-orig-source get-latest-source