blob: 8c38b7820dc2a98887269fe6c3f4df80bcf276e1 (
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
|
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
DESCRIPTION="The Link Layer Discovery Protocol"
HOMEPAGE="http://openlldp.sourceforge.net"
MY_P=${P/_/}
SRC_URI="http://downloads.sourceforge.net/${PN}/${MY_P}.tar.gz"
S=${WORKDIR}/${MY_P}
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE="libpcap debug"
DEPEND="libpcap? ( net-libs/libpcap )"
RDEPEND=${DEPEND}
src_compile() {
use libpcap && myconf=" --enable-generic-framer"
use debug && myconf="${myconf} --enable-efence"
econf --prefix=/usr/lib/openlldp \
${myconf} \
|| die "Error: econf failed!"
emake || die "emake failed"
}
src_install() {
make DESTDIR="${D}" install || die "emake install failed"
dodoc README
newinitd "${FILESDIR}"/openlldp.initd lldpd
newconfd "${FILESDIR}"/openlldp.confd lldpd
}
pkg_postinst() {
elog "This is an experimental ebuild. Use with caution."
elog ""
! use libpcap && elog "The kernel module \"af_packet\" is needed for this tool to run."
}
|