]> git.sven.stormbind.net Git - sven/java-package.git/blob - debian/rules
Initial rework of (svn) java-package 0.42
[sven/java-package.git] / debian / rules
1 #!/usr/bin/make -f
2 # debian/rules for java-package
3
4 # Uncomment this to turn on verbose mode.
5 #export DH_VERBOSE=1
6
7 # Extract source package version number from changelog
8 VERSION := $(shell head -n 1 $(CURDIR)/debian/changelog | sed 's/.*(//;s/).*//')
9 B := $(CURDIR)/debian/java-package
10
11 build: build-stamp 
12
13 build-stamp:
14         dh_testdir
15         # Add here commands to compile the indep part of the package.
16         sed s/@VERSION@/$(VERSION)/ make-jpkg > make-jpkg.out
17         touch $@
18
19 clean:
20         dh_testdir
21         dh_testroot
22         rm -f build-stamp SUPPORTED make-jpkg.out debian/semantic.cache
23         dh_clean
24
25 install: build
26         dh_testdir
27         dh_testroot
28         dh_clean -k
29         dh_installdirs
30
31         install -m 755 make-jpkg.out $(B)/usr/bin/make-jpkg
32         cp lib/*.sh lib/*-common $(B)/usr/share/java-package/
33         for dir in $(wildcard oracle-j2*); do \
34                 cp -a $$dir $(B)/usr/share/java-package/; \
35         done
36         find $(B) -type d -name .svn | xargs -r rm -r
37
38 # Generate SUPPORTED
39         echo "java-package currently supports the following binary packages:" > SUPPORTED
40         echo >> SUPPORTED
41         echo "(This list is automatically generated, do not edit)" >> SUPPORTED
42         echo >> SUPPORTED
43         grep -h "SUPPORTED$$" $(wildcard $(CURDIR)/lib/*-*.sh) | sed 's/"//g;s/).*//' >> SUPPORTED
44
45         dh_install
46
47 binary: binary-indep
48
49 binary-arch:
50
51 binary-indep: build install
52         dh_testdir
53         dh_testroot
54         dh_installchangelogs 
55         dh_installdocs
56         dh_installman make-jpkg.1
57         dh_link
58 #       dh_strip
59         dh_compress 
60         dh_fixperms
61         dh_makeshlibs
62         dh_installdeb
63         dh_shlibdeps
64         dh_gencontrol
65         dh_md5sums
66         dh_builddeb
67
68 .PHONY: build clean binary-indep binary install