# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils SLOT="0" LICENSE="GPL-1" KEYWORDS="amd64 x86" DESCRIPTION="LiveJournal Tools. Includes SMS to LiveJournal Gateway, Popular Users, LJ Interests Overlap, LJ Common Interests, LJ Comments Stats, LJ Security Edit, LJ Common Frields, LJ Overlap, LJ Backup, LJ Greet, LJ Images Copy, and LJ Images Download" # Tar files to install SRC_URI="perl? ( http://superb-east.dl.sourceforge.net/sourceforge/ljtools/ljbackup-cli-1.0.1.zip \ http://internap.dl.sourceforge.net/sourceforge/ljtools/ljoverlap-cli-1.0.0.zip \ http://internap.dl.sourceforge.net/sourceforge/ljtools/ljsecedit-cli-1.0.1.zip \ http://internap.dl.sourceforge.net/sourceforge/ljtools/ljimgdl-cli-1.0.0.zip \ http://internap.dl.sourceforge.net/sourceforge/ljtools/ljimgcpy-cli-1.0.0.zip \ http://superb-east.dl.sourceforge.net/sourceforge/ljtools/ljgreet-cli-1.0.0.zip \ http://superb-west.dl.sourceforge.net/sourceforge/ljtools/ljcommon-cli-1.0.0.zip ) python? ( http://superb-west.dl.sourceforge.net/sourceforge/ljtools/sms2lj-cli-py-1.1.0.zip \ http://superb-west.dl.sourceforge.net/sourceforge/ljtools/popwithfriends-cli-py-1.0.0.zip \ http://internap.dl.sourceforge.net/sourceforge/ljtools/ljintoverlap-cli-py-1.0.0.zip \ http://superb-west.dl.sourceforge.net/sourceforge/ljtools/ljcommint-cli-py-1.0.0.zip \ http://superb-east.dl.sourceforge.net/sourceforge/ljtools/ljcommstats-cli-py-1.0.0.zip )" HOMEPAGE="http://ljtools.sourceforge.net/" IUSE="perl python" DEPEND="perl? ( dev-lang/perl ) python? ( dev-lang/python )" # Not because we don't want one, just because it doesn't exist. It has to check every mirror for every file, which takes FOREVER RESTRICT="nomirror" # Tools to install (in /usr/bin) PERL_LJTOOLS="ljbackup.pl ljsecedit.pl ljoverlap.pl ljimgdl.pl \ ljgreet.pl ljcommon.pl ljimgcpy.pl" PYTHON_LJTOOLS="ljcommstats.py ljcommint.py ljintoverlap.py sms2lj.py popwithfriends.py" LJTOOLS_LIST="" pkg_setup() { if use perl ; then LJTOOLS_LIST="$LJTOOLS_LIST $PERL_LJTOOLS" fi if use python ; then LJTOOLS_LIST="$LJTOOLS_LIST $PYTHON_LJTOOLS" fi if ! use perl && ! use python ; then die "Either perl or python must be enabled." fi } src_unpack() { unpack ${A} edos2unix ${LJTOOLS_LIST} } src_install() { mkdir -p ${D}/usr/bin cd ${WORKDIR} cp ${LJTOOLS_LIST} ${D}/usr/bin cd ${D}/usr/bin chmod a+x ${LJTOOLS_LIST} }