File: rules

package info (click to toggle)
libpixie-java 20030705-4
  • links: PTS
  • area: contrib
  • in suites: sarge
  • size: 472 kB
  • ctags: 6
  • sloc: makefile: 85
file content (89 lines) | stat: -rwxr-xr-x 1,860 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
79
80
81
82
83
84
85
86
87
88
89
#!/usr/bin/make -f

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

# Build 
JAVA_HOME_DIRS=/usr/lib/j2sdk1.4-sun /usr/lib/j2sdk1.4-ibm /usr/lib/j2sdk1.4-blackdown
export JAVA_HOME ?= $(shell for j in $(JAVA_HOME_DIRS); do [ -d "$$j" ] && echo $$j && exit 0; done)

export LIBRARY=pixie
export VERSION=$(shell ls pixie-*.tar.gz | sed 's/pixie-\(.*\).tar.gz/\1/' )
export SRCDIR=$(LIBRARY)-$(VERSION)
export CURDIR=$(shell pwd)


configure: configure-stamp
configure-stamp:
	dh_testdir
	# Add here commands to configure the package.
	mkdir $(SRCDIR)
	tar xvzf pixie-$(VERSION).tar.gz
	sh ./debian_patch $(SRCDIR)/ant/build.xml
	touch configure-stamp


build: configure build-stamp
build-stamp:
	dh_testdir
	# Use debian jar to use debian jars
	# Ant compile
	cd $(SRCDIR)/ant; ant compile
	touch build-stamp

javadoc: 
	echo $(SRCDIR)/javadoc > debian/libpixie-java.docs
	echo $(SRCDIR)/README >> debian/libpixie-java.docs
	-rm -rf $(SRCDIR)/javadoc
	# Ant
	cd $(SRCDIR)/ant; ant javadoc

clean:
	dh_testdir
	dh_testroot
	-rm -f build-stamp
	-rm -f configure-stamp
	-rm -rf $(SRCDIR)
	dh_clean

install: build javadoc
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs
	#
	# Package 
	#
	install -m 644 $(SRCDIR)/$(LIBRARY)-$(VERSION).jar \
	debian/tmp/usr/share/java/$(LIBRARY)-$(VERSION).jar
	ln -s $(LIBRARY)-$(VERSION).jar debian/tmp/usr/share/java/$(LIBRARY).jar

# Build architecture-independent files here.
binary-indep: build install
	dh_testdir
	dh_testroot
#	dh_installdebconf
	dh_installdocs
	dh_installexamples
#	dh_installmenu
#	dh_installemacsen
#	dh_installpam
#	dh_installinit
#	dh_installcron
#	dh_installman
#	dh_installinfo
#	dh_undocumented
	dh_installchangelogs
	dh_link
	dh_compress
	dh_fixperms
	dh_installdeb
#	dh_perl
	dh_gencontrol
	dh_md5sums
	dh_builddeb


binary: binary-indep 

.PHONY: binary binary-indep clean