# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils java-pkg MY_PN="hibernate" MY_P=${MY_PN}-${PV} DESCRIPTION="Hibernate is a powerful, ultra-high performance object / relational persistence and query service for Java. This binary package has needed additional jars bundled." SRC_URI="mirror://sourceforge/hibernate/${MY_P}.tar.gz" HOMEPAGE="http://www.hibernate.org" LICENSE="LGPL-2" SLOT="3" KEYWORDS="~x86" RDEPEND=">=virtual/jre-1.3" DEPEND=" doc? ( >=dev-java/ant-1.6 ) " IUSE="doc source" S=${WORKDIR}/${MY_PN}-${PV:0:3} unused="ant*.jar junit*.jar versioncheck.jar cleanimports.jar" src_unpack() { unpack ${A} cd ${S} mkdir lib-unused for file in $unused; do mv lib/$file lib-unused done # Disable splash while building. cp ${FILESDIR}/build.properties ${S} } src_compile() { cd ${S} use doc && targets="javadoc" if [ "$targets" ]; then mkdir -p build/gensrc ant -lib lib ${targets} || die "Build failed." fi } src_install() { cd ${WORKDIR} use doc && java-pkg_dohtml -r ${MY_PN}/doc/* insinto /usr/share/${PN}-${SLOT}/lib java-pkg_jarinto /usr/share/${PN}-${SLOT}/lib cd ${S} java-pkg_dojar hibernate3.jar pushd lib 1>/dev/null for file in $(ls *.jar); do if [ ! -L $file ]; then java-pkg_dojar $file fi done popd 1>/dev/null use source && java-pkg_dosrc src/org dodoc *.txt insinto /usr/share/doc/${P}/sample doins etc/*.xml etc/*.properties etc/*.template }