# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ NOVELL_BUILDID="qAcGecdScA8~" NOVELL_FILE="patchfiles/GWM202HP1CLNX.TGZ" RESTRICT="mirror strip" inherit novell rpm java-pkg-2 eutils MY_P="${P/_p/-}" DESCRIPTION="Novell Groupwise Messenger" HOMEPAGE="http://www.novell.com" SRC_URI="http://${NOVELL_ACCOUNT_USERNAME}:${NOVELL_ACCOUNT_PASSWORD}@cdn.novell.com/prot/${NOVELL_BUILDID}/${NOVELL_FILE}" LICENSE="Novell-Messenger-2" SLOT="0" KEYWORDS="~x86" IUSE="linguas_en linguas_hu linguas_ar linguas_cs linguas_da linguas_de linguas_es linguas_fi linguas_fr linguas_he linguas_it linguas_ja linguas_ko linguas_nl linguas_no linguas_pl linguas_pt linguas_ru linguas_sv linguas_zh_CN linguas_zh_TW" DEPEND=">=virtual/jre-1.4" S=${WORKDIR}/nmclient src_unpack() { cp ${DISTDIR}/GWM202HP1CLNX.TGZ ${WORKDIR}/${P}.tar.gz DISTDIR=${WORKDIR} unpack ${P}.tar.gz || die unpack_makeself nvlmsgr.bin 36 tail || die mkdir -p ${WORKDIR}/${MY_P} cd ${MY_P} rpm_unpack ${WORKDIR}/nmclient/${MY_P}.i586.rpm || die "rpm unpack failed" } src_compile() { :; } src_install() { for x in en hu ar cs da de es fi fr he it ja ko nl no pl pt ru sv zh_CN zh_TW ; do if use linguas_${x} then [[ ${x} == "zh_CN" ]] && x="zhcn" [[ ${x} == "zh_TW" ]] && x="zhtw" docinto ${x} dodoc ${WORKDIR}/${MY_P}/opt/novell/messenger/client/docs/${x}/*.htm fi done java-pkg_jarinto /opt/novell/messenger/client/$(get_libdir) for x in jh.jar nmclhlp.jar nmclient.jar; do java-pkg_dojar ${WORKDIR}/${MY_P}/opt/novell/messenger/client/${x} done java-pkg_sointo /opt/novell/messenger/client/$(get_libdir) for x in libeggtray.so libidlex.so; do java-pkg_doso ${WORKDIR}/${MY_P}/opt/novell/messenger/client/${x} done insinto ${JAVA_PKG_JARDEST} doins ${WORKDIR}/${MY_P}/opt/novell/messenger/client/*.wav insinto ${JAVA_PKG_JARDEST}/icons doins ${WORKDIR}/${MY_P}/opt/novell/messenger/client/icons/* doicon ${WORKDIR}/${MY_P}/opt/novell/messenger/client/nmclient.png # insinto ${JAVA_PKG_JARDEST}/docs into /opt/novell/messenger/client java-pkg_dolauncher nmclient --main com.novell.messenger.client.Messenger \ -pre ${FILESDIR}/nmclient-2.0-pre \ --java_args "-Xms5M -Dawt.toolkit=sun.awt.motif.MToolkit" make_desktop_entry /opt/novell/messenger/client/bin/nmclient "GroupWise Messenger" nmclient.png Network dosym /opt/novell/messenger/client/bin/nmclient /usr/bin/nmclient } pkg_nofetch() { einfo "This files require you to register at ${HOMEPAGE} (free account)" einfo "Please download following file:" einfo " - ${NOVELL_FILE}" 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 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" }