stable/net-mail/netiq-groupwise-client/netiq-groupwise-client-7.0.4.20100714.ebuild
2014-08-16 09:01:13 +02:00

86 lines
3.1 KiB
Bash

# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
NOVELL_BUILDID="hJh0x5bhIIQ~"
NOVELL_FILE32="patchfiles/gw704ftf_full_linux_multi.tar.gz"
RESTRICT="mirror strip"
inherit novell eutils rpm 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}"
LICENSE="Novell-GW-7"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="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 ) )"
src_unpack() {
unpack ${A}
mkdir -p "${WORKDIR}"/${PN}-${MY_PV}
cd ${PN}-${MY_PV}
rpm_unpack ../work/client/linux/novell-groupwise-gwclient-${MY_PV}.i586.rpm
}
src_compile() { :; }
src_install() {
JRE_DIR="${WORKDIR}"/${PN}-${MY_PV}/opt/novell/groupwise/client/jre;
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/jre
sed -i 's%/opt/novell/groupwise/client/jre/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/jre
sed -i 's%/opt/novell/groupwise/client/jre/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"
}