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