# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ MY_P=MUTE_fileSharing-0.3-rc4_UnixSource S=${WORKDIR}/${MY_P} DESCRIPTION="MUTE private file sharing" SRC_URI="mirror://sourceforge/mute-net/${MY_P/-rc4/}.tar.gz" HOMEPAGE="http://mute-net.sourceforge.net/" RESTRICT="nomirror" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86 ~ppc" IUSE="gtk" DEPEND="gtk? ( >=x11-libs/wxGTK-2.4.2 )" INST_DIR="/opt/mute" src_unpack() { unpack ${A} cd ${S}/MUTE cp ${FILESDIR}/muteconf-gentoo ./configure einfo "Downloading hosts IP from http://www.crimsonreport.com/mute-net/..." wget -q -O - "http://www.crimsonreport.com/cgi-bin/mute.cgi?ViewIp" | \ sed s/\// | grep -v Number > ${S}/seedHosts.ini } src_compile() { cd ${S}/MUTE econf || die cd crypto emake libcrypto.a cd ../layers/messageRouting emake libmuteMessageRouter.a cd ../../otherApps/fileSharing emake libmuteFileShare.a if use gtk; then export MuteInterface="wxWindows" else MuteInterface="textBased" fi cd userInterface/${MuteInterface} emake cd build if use gtk; then ./makeDistributions GUI fileSharing else ./makeDistributions text fileSharing fi } src_install () { cd ${S}/MUTE/otherApps/fileSharing/userInterface/${MuteInterface}/build dodir ${INST_DIR} cp -r unix/MUTE/* ${D}/${INST_DIR}/ insinto ${INST_DIR}/settings doins ${S}/seedHosts.ini unset MuteInterface dodir /etc/env.d echo "PATH=${INST_DIR}" > ${D}/etc/env.d/50mute dosym ${D}${INST_DIR}/fileSharingMUTE ${INST_DIR}/MUTE }