Provide all runtimes since Java 5 (Close: #775987)
[sven/java-package.git] / lib / jdk.sh
1
2 j2sdk_control() {
3     build_depends="libasound2, libgl1-mesa-glx, libgtk2.0-0, libxslt1.1, libxtst6, libxxf86vm1"
4     j2se_control
5     java_browser_plugin="java-browser-plugin, "
6     depends="\${shlibs:Depends}"
7     if [ "${DEB_BUILD_ARCH:0:3}" = "arm" -a "${j2se_arch}" != "arm-vfp-hflt" ]; then
8         # ARM is only softfloat ATM so if building on armhf
9         # force the dependencies to pickup cross platform fu
10         if [ "${DEB_BUILD_ARCH}" == "armhf" ]; then
11             depends="libc6-armel, libsfgcc1, libsfstdc++6"
12         fi
13         # No browser on ARM yet
14         java_browser_plugin=""
15     fi
16     for i in `seq 5 ${j2se_release}`;
17     do
18         provides_runtime="${provides_runtime} java${i}-runtime,"
19         provides_headless="${provides_headless} java${i}-runtime-headless,"
20         provides_sdk="${provides_sdk} java${i}-sdk,"
21     done
22     cat << EOF
23 Package: $j2se_package
24 Architecture: any
25 Depends: \${misc:Depends}, $depends
26 Recommends: netbase
27 Provides: java-virtual-machine, java-runtime, java2-runtime, $provides_runtime $java_browser_plugin java-compiler, java2-compiler, java-runtime-headless, java2-runtime-headless, $provides_headless java-sdk, java2-sdk, $provides_sdk
28 Description: $j2se_title
29  The Java(TM) SE JDK is a development environment for building
30  applications, applets, and components that can be deployed on the
31  Java(TM) platform.
32  .
33  The Java(TM) SE JDK software includes tools useful for developing and
34  testing programs written in the Java programming language and running
35  on the Java platform. These tools are designed to be used from the
36  command line. Except for appletviewer, these tools do not provide a
37  graphical user interface.
38  .
39  This package has been automatically created with java-package ($version).
40 EOF
41 }
42
43 # build debian package
44 j2sdk_run() {
45     echo
46     diskfree "$j2se_required_space"
47     read_maintainer_info
48     j2se_package="$j2se_vendor-java$j2se_release-jdk"
49     j2se_name="jdk-$j2se_release-$j2se_vendor-$j2se_arch"
50     local target="$package_dir/$j2se_name"
51     install -d -m 755 "$( dirname "$target" )"
52     extract_bin "$archive_path" "$j2se_expected_min_size" "$target"
53     rm -rf "$target/.systemPrefs"
54     echo "9" > "$debian_dir/compat"
55     j2se_readme > "$debian_dir/README.Debian"
56     j2se_changelog > "$debian_dir/changelog"
57     j2sdk_control > "$debian_dir/control"
58     j2se_copyright > "$debian_dir/copyright"
59     j2se_rules > "$debian_dir/rules"
60     chmod +x "$debian_dir/rules"
61     j2se_install_scripts
62     install -d "$target/debian"
63     j2se_info > "$target/debian/info"
64     eval "$j2se_jinfo" > "$package_dir/.$j2se_name.jinfo"
65     echo ".$j2se_name.jinfo $jvm_base" > "$debian_dir/install"
66     echo "$j2se_name $jvm_base" >> "$debian_dir/install"
67     j2se_build
68 }