File: rules

package info (click to toggle)
java-common 0.71
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 92 kB
  • sloc: sh: 159; makefile: 36
file content (53 lines) | stat: -rwxr-xr-x 2,294 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f

include /usr/share/dpkg/default.mk
include debian/java_defaults.mk

release = $(shell dpkg-parsechangelog | grep -E ^Version: | sed "s/Version: 0.//")

dversion	= 2:1.$(java_default_version)-$(release)

jre_provides	= java-runtime, java2-runtime, $(shell seq --format java%.f-runtime --separator ', ' 5 $(java_default_version))
jhl_provides	= java-runtime-headless, java2-runtime-headless, $(shell seq --format java%.f-runtime-headless --separator ', ' 5 $(java_default_version))
jdk_provides	= java-sdk, java2-sdk, $(shell seq --format java%.f-sdk --separator ', ' 5 $(java_default_version))
jdkhl_provides	= java-sdk-headless, java2-sdk-headless, $(shell seq --format java%.f-sdk-headless --separator ', ' 5 $(java_default_version))


%:
	dh $@

override_dh_link:
	dh_link

	# Link /usr/lib/jvm/default-java to the default JRE
	dh_link -pdefault-jre-headless usr/lib/jvm/java-1.$(java_default_version).0-openjdk-$(DEB_HOST_ARCH) usr/lib/jvm/default-java

	# Link to the JDK documentation
	dh_link -pdefault-jdk-doc /usr/share/doc/openjdk-$(java_default_version)-doc/api usr/share/doc/default-jre-headless/api
	dh_link -pdefault-jdk-doc /usr/share/doc/openjdk-$(java_default_version)-doc/api usr/share/doc/default-jdk-doc/api

override_dh_installdocs:
	dh_installdocs -i

	# Install the changelog and copyright once in default-jre-headless and use links for the other packages
	dh_installdocs -pdefault-jre-headless
	dh_link -pdefault-jre          /usr/share/doc/default-jre-headless /usr/share/doc/default-jre
	dh_link -pdefault-jdk-headless /usr/share/doc/default-jre-headless /usr/share/doc/default-jdk-headless
	dh_link -pdefault-jdk          /usr/share/doc/default-jre          /usr/share/doc/default-jdk

	dh_installdocs -pdefault-jdk-doc

override_dh_gencontrol:
	dh_gencontrol -i
	dh_gencontrol -a -- \
		-v$(dversion) \
		'-Vjre=openjdk-$(java_default_version)-jre' \
		'-Vjhl=openjdk-$(java_default_version)-jre-headless' \
		'-Vjdk=openjdk-$(java_default_version)-jdk' \
		'-Vjdkhl=openjdk-$(java_default_version)-jdk-headless' \
		'-Vdoc=openjdk-$(java_default_version)-doc' \
		'-Vjre:arch=$(DEB_HOST_ARCH)' \
		'-Vjre:provides=$(jre_provides)' \
		'-Vjhl:provides=$(jhl_provides)' \
		'-Vjdkhl:provides=$(jdkhl_provides)' \
		'-Vjdk:provides=$(jdk_provides)'