]> git.sven.stormbind.net Git - sven/java-package.git/blobdiff - make-jpkg
Replaced references to "Java 2" by "Java SE"
[sven/java-package.git] / make-jpkg
index 2c829629e8e8494be6a8a153bf3a10a791404010..74c743b21bdcde85c6d9e3fe817e434f391fe968 100755 (executable)
--- a/make-jpkg
+++ b/make-jpkg
@@ -63,11 +63,20 @@ fi
 
 ### Parse options
 
-function print_usage() {
+print_usage() {
        cat << EOF
 Usage: $program_name [OPTION]... FILE
 
-$program_name builds Debian packages from Java(TM) 2 binary distributions.
+$program_name builds a Debian package from the given Java binary distribution FILE
+
+Supported java binary distributions currently include:
+  * Oracle (http://www.oracle.com/technetwork/java/javase/downloads) :
+    - The Java Development Kit (JDK), version 6 (update >= 10), 7
+    - The Java Runtime Environment (JRE), version 6 (update >= 10), 7
+    - The Java API Javadoc, version 6 (update >= 10), 7
+  (Choose tar.gz archives or self-extracting archives, do _not_ choose the RPM!)
+
+The following options are recognized:
 
   --full-name NAME   full name used in the maintainer field of the package
   --email EMAIL      email address used in the maintainer field of the package
@@ -80,7 +89,7 @@ $program_name builds Debian packages from Java(TM) 2 binary distributions.
 EOF
 }
 
-function unrecognized_option() {
+unrecognized_option() {
     cat >&2 << EOF
 $program_name: unrecognized option \`$1'
 Try \`$program_name --help' for more information.
@@ -88,7 +97,7 @@ EOF
     exit 1
 }
 
-function missing_argument() {
+missing_argument() {
     cat >&2 << EOF
 $program_name: missing argument for option \`$1'
 Try \`$program_name --help' for more information.
@@ -154,7 +163,7 @@ failed=
 tmp=
 
 # function is called when script terminates
-function on_exit() {
+on_exit() {
     lastcmd="$_"
     if [[ -z "$success" && -z "$failed" ]]; then
        cat >&2 << EOF
@@ -173,7 +182,7 @@ EOF
 trap on_exit EXIT
 
 # print error message and terminate
-function error_exit() {
+error_exit() {
     cat >&2 << EOF
 
 Aborted.
@@ -199,11 +208,10 @@ install -d -m 755 "$install_dir"
 
 # load and execute plugins
 echo -n "Loading plugins:"
-cd "$lib_dir"
-files=(*.sh)
+files=($lib_dir/*.sh)
 for file in "${files[@]}"; do
     echo -n " $file"
-    source "$lib_dir/$file"
+    source "$file"
 done
 
 echo
@@ -211,6 +219,9 @@ echo
 # get architecture information
 get_architecture
 
+jvm_base="/usr/lib/jvm/"
+javadoc_base="/usr/share/doc/"
+
 j2se_found=
 for var in ${!j2se_detect_*}; do 
     eval "\$$var"