Provide all runtimes since Java 5 (Close: #775987)
[sven/java-package.git] / lib / jre.sh
1
2 j2re_control() {
3     j2se_control
4     for i in `seq 5 ${j2se_release}`;
5     do
6         provides_runtime="${provides_runtime} java${i}-runtime,"
7         provides_headless="${provides_headless} java${i}-runtime-headless,"
8     done
9     cat << EOF
10 Package: $j2se_package
11 Architecture: any
12 Depends: \${misc:Depends}, \${shlibs:Depends}
13 Recommends: netbase
14 Provides: java-virtual-machine, java-runtime, java2-runtime, $provides_runtime java-runtime-headless, java2-runtime-headless, $provides_headless java-browser-plugin
15 Description: $j2se_title
16  The Java(TM) SE Runtime Environment contains the Java virtual machine,
17  runtime class libraries, and Java application launcher that are
18  necessary to run programs written in the Java programming language.
19  It is not a development environment and does not contain development
20  tools such as compilers or debuggers.  For development tools, see the
21  Java SE Development Kit (JDK).
22  .
23  This package has been automatically created with java-package ($version).
24 EOF
25 }
26
27 # build debian package
28 j2re_run() {
29     echo
30     diskfree "$j2se_required_space"
31     read_maintainer_info
32     j2se_package="$j2se_vendor-java$j2se_release-jre"
33     j2se_name="jre-$j2se_release-$j2se_vendor-$j2se_arch"
34     local target="$package_dir/$j2se_name"
35     install -d -m 755 "$( dirname "$target" )"
36     extract_bin "$archive_path" "$j2se_expected_min_size" "$target"
37     rm -rf "$target/.systemPrefs"
38     echo "9" > "$debian_dir/compat"
39     j2se_readme > "$debian_dir/README.Debian"
40     j2se_changelog > "$debian_dir/changelog"
41     j2re_control > "$debian_dir/control"
42     j2se_copyright > "$debian_dir/copyright"
43     j2se_rules > "$debian_dir/rules"
44     chmod +x "$debian_dir/rules"
45     j2se_install_scripts
46     install -d "$target/debian"
47     j2se_info > "$target/debian/info"
48     eval "$j2se_jinfo" > "$package_dir/.$j2se_name.jinfo"
49     echo ".$j2se_name.jinfo $jvm_base" > "$debian_dir/install"
50     echo "$j2se_name $jvm_base" >> "$debian_dir/install"
51     j2se_build
52 }