~ubuntu-branches/ubuntu/karmic/java-common/karmic

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2008-03-05 18:59:48 UTC
  • Revision ID: james.westby@ubuntu.com-20080305185948-g6zpx9n69bk5uzif
Tags: 0.28ubuntu1
* Merge with Debian; remaining changes:
  - JVM launcher scripts, currently unused.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
2
 
# MAde with the aid of dh_make, by Craig Small
 
2
# Made with the aid of dh_make, by Craig Small
3
3
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
4
4
# Some lines taken from debmake, by Cristoph Lameter.
5
5
 
6
6
# Uncomment this to turn on verbose mode.
7
7
#export DH_VERBOSE=1
8
8
 
 
9
, = ,
 
10
S = $(EMPTY) $(EMPTY)
 
11
mk_cslist = $(subst $(S),$(,)$(S),$(foreach v,$(1),$(v)-$(2)))
 
12
vafilt = $(subst $(2)=,,$(filter $(2)=%,$(1)))
 
13
jrel = $(subst java-common-0.,,$(notdir $(CURDIR)))
 
14
 
 
15
DPKG_VARS := $(shell dpkg-architecture)
 
16
DEB_HOST_ARCH ?= $(call vafilt,$(DPKG_VARS),DEB_HOST_ARCH)
 
17
 
 
18
p_jre           = java-gcj-compat
 
19
p_jhl           = java-gcj-compat-headless
 
20
p_jdk           = java-gcj-compat-dev
 
21
jdk_build_dep   =
 
22
v_jre           = $(S)(>= 1.0.77-4)
 
23
v_jdk           = $(v_jre)
 
24
provides        = java java2 java5
 
25
dversion        = 1.5-$(jrel)
 
26
jvmdir          = java-gcj
 
27
 
 
28
#ifneq (,$(filter $(DEB_HOST_ARCH), alpha hppa))
 
29
#  p_jre                =
 
30
#  p_headless   =
 
31
#  p_jdk                =
 
32
#endif
 
33
 
 
34
jre_provides    = $(call mk_cslist,$(provides),runtime)
 
35
jhl_provides    = $(call mk_cslist,$(provides),runtime-headless)
 
36
jdk_provides    = $(call mk_cslist,$(provides),sdk)
 
37
 
9
38
build: build-stamp
10
39
build-stamp:
11
40
        dh_testdir
17
46
        dh_testdir
18
47
        dh_testroot
19
48
        rm -f build-stamp install-stamp
20
 
 
21
 
        # Add here commands to clean up after the build process.
22
49
        $(MAKE) clean
23
50
 
24
51
        dh_clean
30
57
        dh_clean -k
31
58
        dh_installdirs
32
59
 
33
 
        # Add here commands to install the package into debian/tmp.
34
 
        # Create the doc directory.
35
60
        dh_installdocs -i
36
 
        # Install docs into the doc directory.
37
61
        $(MAKE) install DESTDIR=$(CURDIR)/debian/java-common
38
62
 
39
63
        dpsch-backupclean
41
65
        touch install-stamp
42
66
 
43
67
binary-arch:
 
68
ifneq (,$(p_jre))
 
69
        dh_testdir -s
 
70
        dh_testroot -s
 
71
###     dh_installdocs -s
 
72
        dh_installchangelogs -s
 
73
        dh_link -pdefault-jre-headless \
 
74
                usr/lib/jvm/$(jvmdir) usr/lib/jvm/default-java
 
75
        dh_compress -s
 
76
        dh_fixperms -s
 
77
        dh_installdeb -s
 
78
        dh_gencontrol -s -- \
 
79
                -v$(dversion) \
 
80
                '-Vjre=$(p_jre)' \
 
81
                '-Vjhl=$(p_jhl)' \
 
82
                '-Vjdk=$(p_jdk)' \
 
83
                '-Vjdk:builddep=$(jdk_builddep)' \
 
84
                '-Vjre:arch=$(DEB_HOST_ARCH)' \
 
85
                '-Vjre:version=$(v_jre)' \
 
86
                '-Vjdk:version=$(v_jdk)' \
 
87
                '-Vjre:provides=$(jre_provides)' \
 
88
                '-Vjhl:provides=$(jhl_provides)' \
 
89
                '-Vjdk:provides=$(jdk_provides)' \
 
90
 
 
91
        dh_md5sums -s
 
92
        dh_builddeb -s
 
93
endif
44
94
 
45
95
# Build architecture-independent files here.
46
 
# Pass -i to all debhelper commands in this target to reduce clutter.
47
96
binary-indep: build install
48
97
        dh_testdir -i
49
98
        dh_testroot -i
53
102
        dh_installexamples -i
54
103
        dpsch-cvsclean
55
104
        dh_installmenu -i
56
 
#       dh_installlogrotate -i
57
 
#       dh_installemacsen -i
58
 
#       dh_installpam -i
59
 
#       dh_installmime -i
60
 
#       dh_installinit -i
61
 
#       dh_installcron -i
62
105
        dh_installman -i
63
 
#       dh_installinfo -i
64
 
#       dh_undocumented -i
65
 
        dh_installchangelogs  -i
 
106
        dh_installchangelogs -i
66
107
        dh_link -i
67
108
        dh_compress -i
68
109
        dh_fixperms -i
69
110
        dh_installdeb -i
70
 
#       dh_perl -i
71
111
        dh_gencontrol -i
72
112
        dh_md5sums -i
73
113
        dh_builddeb -i
74
114
 
75
 
        dh_builddeb
76
 
 
77
115
binary: binary-indep binary-arch
78
116
.PHONY: build clean binary-indep binary-arch binary install configure