summaryrefslogtreecommitdiff
blob: 445ac5eaa776a542b6b6e94c5298bd8330a0a26f (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
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author: Donny Davies <woodchip@gentoo.org>
# $Header: /var/cvsroot/gentoo-x86/net-libs/lcrzo/lcrzo-4.06.ebuild,v 1.1 2002/03/20 08:21:11 woodchip Exp $

DESCRIPTION="Library of Ethernet, IP, UDP, TCP, ICMP, ARP and RARP protocols"
HOMEPAGE="http://www.laurentconstantin.com/en/lcrzo/"
SRC_URI="http://www.laurentconstantin.com/common/${PN}/download/v4/${P}-src.tgz"
S=${WORKDIR}/${P}-src

DEPEND="virtual/glibc net-libs/libpcap"

src_unpack() {
	unpack ${A} ; cd ${S}/src

	# genemake checks that these directories exist...
	mv genemake genemake.orig
	sed -e "s:/usr/local/include:/usr/include:" \
		-e "s:/usr/local/lib:/usr/lib:" \
		-e "s:/usr/local/bin:/usr/bin:" \
		-e "s:/usr/local/man/man1:/usr/share/man/man1:" \
		-e "s:/usr/local/man/man3:/usr/share/man/man3:" \
		genemake.orig > genemake

	chmod 755 genemake
	./genemake || die "problem creating Makefile"

	# plug in our CFLAGS and make it install into ${D}...
	mv Makefile Makefile.orig
	sed -e "s:^GCCOPT=.*:GCCOPT=${CFLAGS}:" \
		-e "s:^GCCOPTL=.*:GCCOPTL=${CFLAGS}:" \
		-e "s:^GCCOPTP=.*:GCCOPTP=${CFLAGS}:" \
		-e "s:^INSTINCLUDE=:INSTINCLUDE=${D}:" \
		-e "s:^INSTLIB=:INSTLIB=${D}:" \
		-e "s:^INSTBIN=:INSTBIN=${D}:" \
		-e "s:^INSTMAN1=:INSTMAN1=${D}:" \
		-e "s:^INSTMAN3=:INSTMAN3=${D}:" \
		Makefile.orig > Makefile
}

src_compile() {
	make -C src || die "compile problem :("
}

src_install() {
	dodir /usr/{bin,include,lib} /usr/share/man/{man1,man3}
	make -C src install || die
	dodoc doc/*.txt
}