diff options
author | Petteri Räty <betelgeuse@gentoo.org> | 2007-03-03 20:37:35 +0000 |
---|---|---|
committer | Petteri Räty <betelgeuse@gentoo.org> | 2007-03-03 20:37:35 +0000 |
commit | 52fb6a66254e6184f9c5f84004a82347d1bbbb91 (patch) | |
tree | 7d1c9e133c3e045ca073cf8c090fa53d5c6f7a54 /eclass | |
parent | Stable on x86, bug #169153. (diff) | |
download | gentoo-2-52fb6a66254e6184f9c5f84004a82347d1bbbb91.tar.gz gentoo-2-52fb6a66254e6184f9c5f84004a82347d1bbbb91.tar.bz2 gentoo-2-52fb6a66254e6184f9c5f84004a82347d1bbbb91.zip |
Add java-pkg_doexamples
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/java-utils-2.eclass | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass index 14aea2943abd..d6c856b95f7e 100644 --- a/eclass/java-utils-2.eclass +++ b/eclass/java-utils-2.eclass @@ -6,7 +6,7 @@ # # Licensed under the GNU General Public License, v2 # -# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.62 2007/03/03 16:51:09 betelgeuse Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.63 2007/03/03 20:37:35 betelgeuse Exp $ # ----------------------------------------------------------------------------- @@ -185,6 +185,33 @@ JAVA_PKG_QA_VIOLATIONS=0 # libraries, etc. # ----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- +# @ebuild-function java-pkg_doexamples +# +# Installs given arguments to /usr/share/doc/${PF}/examples +# If you give it only one parameter and it is a directory it will install +# everything in that directory to the examples directory. +# +# @example +# java-pkg_doexamples demo +# java-pkg_doexamples demo/* examples/* +# +# @param $* - list of files to install +# ------------------------------------------------------------------------------ +java-pkg_doexamples() { + debug-print-function ${FUNCNAME} $* + + [[ ${#} -lt 1 ]] && die "At least one argument needed" + + java-pkg_check-phase install + + local dest=/usr/share/doc/${PF}/examples + if [[ ${#} = 1 && -d ${1} ]]; then + INSDESTTREE="${dest}" doins -r ${1}/* || die "Installing examples failed" + else + INSDESTTREE="${dest}" doins -r "${@}" || die "Installing examples failed" + fi +} # ----------------------------------------------------------------------------- # @ebuild-function java-pkg_dojar |