stable/trunk/novell4gentoo/net-mail/novell-groupwise-client/novell-groupwise-client-8.0.2.90388.ebuild

87 lines
3.1 KiB
Bash
Raw Normal View History

# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
NOVELL_BUILDID="jmcxvBI-b7I~"
NOVELL_FILE32="gw802_beta1_client_linux_multi.tar.gz"
RESTRICT="mirror strip"
inherit novell eutils rpm5 multilib versionator
MY_PV=$(replace_version_separator 3 '-')
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/${NOVELL_BUILDID}/${NOVELL_FILE32}"
2010-07-07 12:54:09 +02:00
LICENSE="Novell-GW-8"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="java novell-jre multilib"
DEPEND=""
RDEPEND="sys-libs/glibc
sys-libs/libstdc++-v3
sys-devel/gcc
!novell-jre? (
|| ( virtual/jdk
virtual/jre )
multilib? (
amd64? ( app-emulation/emul-linux-x86-java ) ) )
multilib? (
amd64? ( app-emulation/emul-linux-x86-compat
www-client/seamonkey-bin ) )
!net-mail/novell-groupwise-gwclient"
src_unpack() {
unpack ${A}
mkdir -p "${WORKDIR}"/${PN}-${MY_PV}
cd ${PN}-${MY_PV}
rpm5_unpack "${WORKDIR}"/gw8.0.2-90388_client_linux_multi/${PN}-${MY_PV}.i586.rpm
}
src_compile() { :; }
src_install() {
JRE_DIR="${WORKDIR}"/${PN}-${MY_PV}/opt/novell/groupwise/client/java;
if use novell-jre; then
# Undo Sun's 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
if use multilib; then
rm -rf "${WORKDIR}"/${PN}-${MY_PV}/opt/novell/groupwise/client/java
sed -i 's%/opt/novell/groupwise/client/java/lib/i386%`java-config --select-vm=emul-linux-x86-java --jre-home`/lib/i386/client:`java-config --select-vm=emul-linux-x86-java --jre-home`/lib/i386/server:`java-config --select-vm=emul-linux-x86-java --jre-home`/lib/i386%' "${WORKDIR}"/${PN}-${MY_PV}/opt/novell/groupwise/client/bin/groupwise
else
rm -rf "${WORKDIR}"/${PN}-${MY_PV}/opt/novell/groupwise/client/java
sed -i 's%/opt/novell/groupwise/client/java/lib/i386%`java-config --jre-home`/jre/lib/i386/client:`java-config --jre-home`/jre/lib/i386/server:`java-config --jre-home`/jre/lib/i386%' "${WORKDIR}"/${PN}-${MY_PV}/opt/novell/groupwise/client/bin/groupwise
fi
fi
insinto /usr/share/applications
doins "${WORKDIR}"/${PN}-${MY_PV}/opt/novell/groupwise/client/gwclient.desktop
mv "${WORKDIR}"/${PN}-${MY_PV}/opt "${D}"/ || die "mv opt"
dodir /opt/bin
dosym /opt/novell/groupwise/client/bin/groupwise /opt/bin/groupwise
}
pkg_nofetch() {
einfo "This files require you to register at ${HOMEPAGE} (free account)"
einfo "Please download following file:"
einfo " - ${NOVELL_FILE32}"
einfo "from http://download.novell.com/Download?buildid=${NOVELL_BUILDID}"
einfo "and place it in ${DISTDIR}"
einfo ""
einfo "To get rid of downloading files from ${HOMEPAGE}"
einfo "you can create a file /etc/portage/novell.acc"
einfo "containing the novell account infos with following commands"
einfo "# echo \"NOVELL_ACCOUNT_USERNAME=\\\"balduin\\\"\" >> /etc/portage/novell.acc"
einfo "# echo \"NOVELL_ACCOUNT_PASSWORD=\\\"derfisch\\\"\" >> /etc/portage/novell.acc"
}