From: Petteri Räty Date: Fri, 20 Apr 2007 15:23:28 +0000 (+0000) Subject: Make java-pkg_dojavadoc check for index.html X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=14f83878a0462e894ff978f31e3b967fdbde1515;p=gentoo.git Make java-pkg_dojavadoc check for index.html --- diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass index faaccfa23a90..a5a0130d8806 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.73 2007/04/20 14:38:49 betelgeuse Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.74 2007/04/20 15:23:28 betelgeuse Exp $ # ----------------------------------------------------------------------------- @@ -558,12 +558,22 @@ java-pkg_dohtml() { # # ------------------------------------------------------------------------------ java-pkg_dojavadoc() { + debug-print-function ${FUNCNAME} $* local dir="$1" + # QA checks + java-pkg_check-phase install [[ -z "${dir}" ]] && die "Must specify a directory!" [[ ! -d "${dir}" ]] && die "${dir} does not exist, or isn't a directory!" + if [[ ! -e "${dir}/index.html" ]]; then + local msg="No index.html in javadoc directory" + ewarn "${msg}" + is-java-strict && die "${msg}" + fi + + # Renaming to match our directory layout local dir_to_install="${dir}" if [[ "$(basename "${dir}")" != "api" ]]; then @@ -572,6 +582,8 @@ java-pkg_dojavadoc() { cp -r "${dir}" "${dir_to_install}" || die "cp failed" fi + # Actual installation + java-pkg_dohtml -r ${dir_to_install} }