# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ A=MUTE_fileSharing-0.2.1_UnixSource.tar.gz S=${WORKDIR}/MUTE_fileSharing-0.2.1-rc1_UnixSource DESCRIPTION="MUTE Simple, Private File Sharing" SRC_URI="http://heanet.dl.sourceforge.net/sourceforge/mute-net/${A}" HOMEPAGE="http://mute-net.sourceforge.net/" LICENSE="GPL-2" SLOT="0" KEYWORDS="x86 ppc" RESTRICT="nomirror" IUSE="gtk" DEPEND="gtk? ( x11-libs/wxGTK )" INST_DIR="/opt/mute" src_unpack() { unpack ${A} cd ${S} epatch ${FILESDIR}/${P}-gentoo.diff } src_compile() { local MUTE_GUI local MUTE_PLATFORM if [ `use gtk` ]; then MUTE_GUI="gtk" else MUTE_GUI="text" fi if [ `use x86` ]; then MUTE_PLATFORM="x86" elif [ `use ppc` ]; then MUTE_PLATFORM="ppc" else die "Platform not supported" fi cd ${S} ./runToBuild ${MUTE_GUI} ${MUTE_PLATFORM} || die } src_install () { local MUTE_GUI_DIR if [ `use gtk` ]; then MUTE_GUI_DIR="MUTE_GUI_fileSharing" else MUTE_GUI_DIR="MUTE_text_fileSharing" fi enewuser p2p mkdir -p ${D}/${INST_DIR} cp -Rdf ${MUTE_GUI_DIR}/* ${D}/${INST_DIR} chown -R p2p ${D}/${INST_DIR} } pkg_postinst () { einfo "Downloading hosts IP from http://www.crimsonreport.com/mute-net/..." cd ${S} wget -q -O - "http://www.crimsonreport.com/cgi-bin/mute.cgi?ViewIp" | \ sed s/\// | grep -v Number > ${INST_DIR}/settings/seedHosts.ini einfo "This program means to be run under the user p2p" }