* Long description removed
[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-arch build-indep
12 build-arch: build-stamp
13 build-indep: build-stamp
14
15 build-stamp:
16         dh_testdir
17         sed s/@VERSION@/$(VERSION)/ make-jpkg > make-jpkg.out
18         touch $@
19
20 clean:
21         dh_testdir
22         dh_testroot
23         rm -f build-stamp SUPPORTED make-jpkg.out debian/semantic.cache
24         dh_clean
25
26 install: build
27         dh_testdir
28         dh_testroot
29         dh_clean -k
30         dh_installdirs
31         dh_installdebconf
32         install -m 755 make-jpkg.out $(B)/usr/bin/make-jpkg
33         cp lib/*.sh $(B)/usr/share/java-package/
34         find $(B) -type d -name .svn | xargs -r rm -r
35
36 # Generate SUPPORTED
37         echo "java-package currently supports the following binary packages:" > SUPPORTED
38         echo >> SUPPORTED
39         echo "(This list is automatically generated, do not edit)" >> SUPPORTED
40         echo >> SUPPORTED
41         grep -h "SUPPORTED$$" $(wildcard $(CURDIR)/lib/*-*.sh) | sed 's/"//g;s/).*//' >> SUPPORTED
42
43         dh_install
44
45 binary: binary-indep
46
47 binary-arch:
48
49 binary-indep: build install
50         dh_testdir
51         dh_testroot
52         dh_installchangelogs 
53         dh_installdocs
54         dh_installman make-jpkg.1
55         dh_link
56 #       dh_strip
57         dh_compress 
58         dh_fixperms
59         dh_makeshlibs
60         dh_installdeb
61         dh_shlibdeps
62         dh_gencontrol
63         dh_md5sums
64         dh_builddeb
65
66 .PHONY: build clean binary-indep binary install