summaryrefslogtreecommitdiff
blob: 4c0ed397f84e5bf7c4099a9aa997b02dacd3770e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/ebayagent/ebayagent-0.9.11-r2.ebuild,v 1.2 2005/12/30 12:04:32 mcummings Exp $

inherit eutils

DESCRIPTION="ebay bidding Perl-Script"
HOMEPAGE="http://ebayagent.sf.net"
SRC_URI="mirror://sourceforge/ebayagent/eBayAgent-${PV}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
IUSE="tcltk"
KEYWORDS="x86"

DEPEND="dev-lang/perl
	>=perl-core/libnet-1.16
	>=dev-perl/URI-1.35
	>=dev-perl/Crypt-SSLeay-0.49
	>=dev-perl/libwww-perl-5.79
	tcltk? ( dev-perl/perl-tk )
	>=dev-perl/TimeDate-1.16"

S=${WORKDIR}/eBayAgent-${PV}

src_compile() {
	sed -i -e "s|PREFIX=/usr|PREFIX=${D}${DESTTREE}|" ${S}/Makefile

	# BUG: 95144 fix path for perl-tk app XeBayAgent.pl to point to eBayAgent 
	sed -i -e "s|X_eBayAgentLocation\ \=>\ \"\",|X_eBayAgentLocation\ \=>\ \"${ROOT}\/usr\/bin\/eBayAgent\",|"	${S}/XeBayAgent.pl

	# patching repebay and runrepebay
	epatch ${FILESDIR}/ebayagent.patch
	emake || die "emake failed"
}

src_install() {
	einstall || die "einstall failed"
	dosym /usr/bin/eBayAgent /usr/bin/eBayAgent.pl

	dobin ${S}/Tools/repebay ${S}/Tools/runrepebay ${S}/Tools/eBayAgent_Skript
	doman ${S}/Tools/repebay.1 ${S}/Tools/runrepebay.1 ${S}/eBayAgent.1
	newdoc ${S}/Tools/README_First.txt README_First_Tools.txt
	newdoc ${S}/Tools/README.Debian README_Tools.Debian

	# perl-tk (disable XeBayAgent.pl)
	if ! use tcltk ; then
		rm -rf ${D}/usr/bin/XeBayAgent
	fi

	# prepare manpages (prepallman won´t do that)
	for mpage in $(find ${D} -name '*.1'|grep man);do
		gzip $mpage
	done

	dodoc COPYING INSTALL
	prepalldocs
}