/[gentoo-x86]/eclass/java-utils-2.eclass
Gentoo

Diff of /eclass/java-utils-2.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.41 Revision 1.42
4# Copyright (c) 2004, Karl Trygve Kalleberg <karltk@gentoo.org> 4# Copyright (c) 2004, Karl Trygve Kalleberg <karltk@gentoo.org>
5# Copyright (c) 2004-2005, Gentoo Foundation 5# Copyright (c) 2004-2005, Gentoo Foundation
6# 6#
7# Licensed under the GNU General Public License, v2 7# Licensed under the GNU General Public License, v2
8# 8#
9# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.41 2007/01/12 16:12:15 betelgeuse Exp $ 9# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.42 2007/01/15 00:01:21 caster Exp $
10 10
11 11
12# ----------------------------------------------------------------------------- 12# -----------------------------------------------------------------------------
13# @eclass-begin 13# @eclass-begin
14# @eclass-shortdesc Java Utility eclass 14# @eclass-shortdesc Java Utility eclass
550# @param $1 - filename of launcher to create 550# @param $1 - filename of launcher to create
551# @param $2 - options, as follows: 551# @param $2 - options, as follows:
552# --main the.main.class.too.start 552# --main the.main.class.too.start
553# --jar /the/jar/too/launch.jar or just <name>.jar 553# --jar /the/jar/too/launch.jar or just <name>.jar
554# --java_args 'Extra arguments to pass to java' 554# --java_args 'Extra arguments to pass to java'
555# --pkg_args 'Extra arguments too pass to the package' 555# --pkg_args 'Extra arguments to pass to the package'
556# --pwd 556# --pwd Directory the launcher changes to before executing java
557# -into 557# -into Directory to install the launcher to, instead of /usr/bin
558# -pre 558# -pre Prepend contents of this file to the launcher
559# ------------------------------------------------------------------------------ 559# ------------------------------------------------------------------------------
560java-pkg_dolauncher() { 560java-pkg_dolauncher() {
561 debug-print-function ${FUNCNAME} $* 561 debug-print-function ${FUNCNAME} $*
562 562
563 java-pkg_check-phase install 563 java-pkg_check-phase install
604 fi 604 fi
605 fi 605 fi
606 606
607 # Write the actual script 607 # Write the actual script
608 echo "#!/bin/bash" > "${target}" 608 echo "#!/bin/bash" > "${target}"
609 [[ -n "${pre}" ]] && [[ -f "${pre}" ]] && cat "${pre}" >> "${target}" 609 if [[ -n "${pre}" ]]; then
610 if [[ -f "${pre}" ]]; then
611 cat "${pre}" >> "${target}"
612 else
613 die "-pre specified file '${pre}' does not exist"
614 fi
615 fi
610 echo "gjl_package=${JAVA_PKG_NAME}" >> "${target}" 616 echo "gjl_package=${JAVA_PKG_NAME}" >> "${target}"
611 cat "${var_tmp}" >> "${target}" 617 cat "${var_tmp}" >> "${target}"
612 rm -f "${var_tmp}" 618 rm -f "${var_tmp}"
613 echo "source /usr/share/java-config-2/launcher/launcher.bash" >> "${target}" 619 echo "source /usr/share/java-config-2/launcher/launcher.bash" >> "${target}"
614 620

Legend:
Removed from v.1.41  
changed lines
  Added in v.1.42

  ViewVC Help
Powered by ViewVC 1.1.20