# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: inherit eutils java-pkg MY_PVR=${PVR/rc/RC} DESCRIPTION="MSN and Jabber client in Java" HOMEPAGE="http://www.mercury.to/" ##Mercury.to does not provided http or ftp links LICENSE="mercury" SLOT="0" KEYWORDS="~x86" RESTRICT="fetch nostrip" IUSE="cam flash" SRC_URI="${MY_PVR}.zip cam? ( JavaLibs-linux.jar ) cam? ( VidConf-libs.jar ) cam? ( NativeLibs-linux.zip )" DEPEND="app-arch/unzip >=virtual/jdk-1.4" RDEPEND=">=virtual/jre-1.4 =dev-java/jgoodies-looks-1.3* dev-java/jmf-bin dev-java/jdictrayapi dev-java/xpp3 ~dev-java/jdom-1.0" S=${WORKDIR} pkg_nofetch() { einfo "Goto http://www.mercury.to/ and download ${MY_PVR}" einfo "It is a torrent download, so you must use a BitTorrent-like client" einfo "For information about this tecnology, look at Mercury official site" einfo "You must put the downloaded file in ${DISTDIR}" if use cam; then einfo "" einfo "For cam support You also have to download a directory with" einfo "some files inside via this torrent:" einfo "http://www.mercury.to/torrents/VidConf_Files.torrent" einfo "You have to copy the files inside the directory you downloaded in" einfo "${DISTDIR}" einfo "WARNING: you DON'T HAVE TO COPY the directory itself, only the files inside!" fi } src_unpack() { unpack ${MY_PVR}.zip cd ${S} rm -f *.dll *.so #Clean the dllStuff.jar from things we dont need cd lib mkdir dllStuff cd dllStuff unzip ../dllStuff.jar rm -rf ../dllStuff.jar org/jdesktop x10gimli/platform cd ${S} rm lib/XML.jar # jdom rm lib/looks-*.jar #jgoodies-looks if use !flash; then echo "Removing JFlash.jar" rm lib/JFlash.jar # seems to be trial from http://www.javaapis.com/jflashplayer/ which says its windows only fi rm lib/xmlpull.jar # xpp3 } src_install() { #rebuild the dllStuff.jar cd ${S}/lib/dllStuff jar cf ../dllStuff.jar * cd ${S} rm -rf lib/dllStuff #Start installing stuff insinto /opt/${PN}/resources doins -r resources/* java-pkg_dojar lib/* insinto /opt/${PN}/lib if use cam; then doins ${DISTDIR}/JavaLibs-linux.jar doins ${DISTDIR}/VidConf-libs.jar insinto $(java-config -o)/lib/i386 echo "*** Installing needed java libraries into current JRE home $(java-config -o)" unzip ${DISTDIR}/NativeLibs-linux.zip -d ${D}$(java-config -o)/lib/i386 fi insinto /usr/share/pixmaps newins ${FILESDIR}/mercury.png mercury.png exeinto /opt/bin newexe ${FILESDIR}/mercury.sh mercury make_desktop_entry mercury "Mercury MSN client" /usr/share/pixmaps/mercury.png }