summaryrefslogtreecommitdiff
blob: 6b40aae3fc80c99f1aec89926ed2abf650752fd5 (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
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/whois/whois-4.6.6-r2.ebuild,v 1.10 2004/07/01 22:11:22 squinky86 Exp $

inherit eutils

IUSE="nls"
MY_P=${P/-/_}
DESCRIPTION="improved Whois Client"
SRC_URI="http://www.linux.it/~md/software/${MY_P}.tar.gz"
HOMEPAGE="http://www.linux.it/~md/software/"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="x86 ppc sparc ~mips hppa ia64 alpha"

DEPEND=">=sys-apps/sed-4
	>=dev-lang/perl-5"
RDEPEND="virtual/libc"

src_unpack() {
	unpack ${A}
	cd ${S}
	sed -i "s/-O2/$CFLAGS/" Makefile

	use nls && ( \
		cd po
		sed -i "s:/usr/bin/install:install:" Makefile
	) || ( \
		sed -i "s:cd po.*::" Makefile
	)

	epatch ${FILESDIR}/${P}-gentoo-security-2.patch
}

src_compile() {
	make || die
	make mkpasswd || die
}

src_install() {
	dodir /usr/bin
	dodir /usr/share/man/man1
	use nls && dodir /usr/share/locale
	make BASEDIR=${D} prefix=/usr mandir=/usr/share/man install || die

	dobin mkpasswd
	doman mkpasswd.1
	dodoc README whois.conf debian/changelog debian/copyright

	einfo ""
	einfo "The example whois.conf is located in /usr/doc/${P}"
	einfo ""
}