be98bfdf93f0b203f01d40312cd6c217fa5a4f3a
[sven/java-package.git] / lib / jdk-doc.sh
1 j2sdk_doc_control() {
2     j2se_control
3     cat << EOF
4 Package: $j2se_package
5 Architecture: any
6 Depends: 
7 Recommends: 
8 Provides: 
9 Replaces: 
10 Description: $j2se_title
11  The Java(TM) SE JDK is a development environment for building
12  applications, applets, and components that can be deployed on the
13  Java(TM) platform.
14  .
15  This package provides the official API documentation published
16  by Oracle.
17  .
18  This package has been automatically created with java-package ($version).
19 EOF
20 }
21
22 j2sdk_doc_doc-base() {
23     cat << EOF
24 Document: $j2se_package
25 Title: $j2se_title
26 Author: $maintainer_name
27 Abstract: This is the API Javadoc provided by the vendor
28 Section: Programming
29
30 Format: HTML
31 Index: /usr/share/doc/$j2se_vendor-java$j2se_release-doc/index.html
32 Files: /usr/share/doc/$j2se_vendor-java$j2se_release-doc/*.html
33
34 EOF
35 }
36
37 # build debian package
38 j2sdk_doc_run() {
39     echo
40     diskfree "$j2se_required_space"
41     read_maintainer_info
42     j2se_package="$j2se_vendor-java$j2se_release-doc"
43     j2se_name="jdk$j2se_release-$j2se_vendor-doc"
44     local target="$install_dir$javadoc_base$j2se_name"
45     install -d -m 755 "$( dirname "$target" )"
46     extract_bin "$archive_path" "$j2se_expected_min_size" "$target"
47     rm -rf "$target/.systemPrefs"
48     echo "7" > "$debian_dir/compat"
49     j2se_readme > "$debian_dir/README.Debian"
50     j2se_changelog > "$debian_dir/changelog"
51     j2sdk_doc_control > "$debian_dir/control"
52     j2se_copyright > "$debian_dir/copyright"
53     j2sdk_doc_doc-base > "$debian_dir/$j2se_package.doc-base"
54     j2se_install_scripts
55     install -d "$target/debian"
56     j2se_info > "$target/debian/info"
57     j2se_build
58 }