# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils rpm MY_P="${P/_p/-}" DESCRIPTION="Novell Groupwise 7 Client for Linux" HOMEPAGE="http://www.novell.com/en/gropwise/" SRC_URI="http://${NOVELL_ACCOUNT_USERNAME}:${NOVELL_ACCOUNT_PASSWORD}@cdn.novell.com/prot/Zep2XifIl50~/patchfiles/gw702betaclnxm.tar.gz" LICENSE="Novell-GW-7" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="java system-jre" DEPEND="!net-misc/novell-groupwise-gwclient" RDEPEND="sys-libs/glibc sys-libs/libstdc++-v3 sys-devel/gcc system-jre? ( || ( virtual/jdk virtual/jre ) amd64? ( app-emulation/emul-linux-x86-java ) ) amd64? ( app-emulation/emul-linux-x86-compat )" RESTRICT="strip mirror" src_unpack() { unpack ${A} mkdir -p ${WORKDIR}/${MY_P} cd ${MY_P} rpm_unpack ${WORKDIR}/${MY_P}.i386.rpm } src_compile() { :; } src_install() { JRE_DIR="${WORKDIR}"/${MY_P}/opt/novell/groupwise/client/jre; if ! use system-jre; then # Undo Novell funny-business with packed .jar's for i in $JRE_DIR/lib/*.pack; do i_b=`echo $i | sed 's/\.pack$//'`; einfo "Unpacking `basename $i` -> `basename $i_b.jar`"; $JRE_DIR/bin/unpack200 $i $i_b.jar || die "Unpack failed"; done; else rm -rf "${WORKDIR}"/${MY_P}/opt/novell/groupwise/client/jre sed -i 's%/opt/novell/groupwise/client/jre%`java-config --jre-home`%' "${WORKDIR}"/${MY_P}/opt/novell/groupwise/client/bin/groupwise fi insinto /usr/share/applications doins "${WORKDIR}"/${MY_P}/opt/novell/groupwise/client/gwclient.desktop mv "${WORKDIR}"/${MY_P}/opt "${D}"/ || die "mv opt" dodir /usr/bin dosym /opt/novell/groupwise/client/bin/groupwise /usr/bin/groupwise }