]> Pileus Git - ~andy/sunrise/blob - net-misc/openlldp/openlldp-0.3_alpha.ebuild
dev-db/dabo: Add ~amd64 keyword, EAPI bump
[~andy/sunrise] / net-misc / openlldp / openlldp-0.3_alpha.ebuild
1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 DESCRIPTION="The Link Layer Discovery Protocol"
6 HOMEPAGE="http://openlldp.sourceforge.net"
7 MY_P=${P/_/}
8 SRC_URI="http://downloads.sourceforge.net/${PN}/${MY_P}.tar.gz"
9 S=${WORKDIR}/${MY_P}
10
11 LICENSE="GPL-2"
12 SLOT="0"
13 KEYWORDS="~x86 ~amd64"
14 IUSE="libpcap debug"
15
16 DEPEND="libpcap? ( net-libs/libpcap )"
17 RDEPEND=${DEPEND}
18
19 src_compile() {
20         use libpcap && myconf=" --enable-generic-framer"
21         use debug && myconf="${myconf} --enable-efence"
22
23         econf --prefix=/usr/lib/openlldp \
24         ${myconf} \
25         || die "Error: econf failed!"
26         emake || die "emake failed"
27 }
28
29 src_install() {
30         make DESTDIR="${D}" install || die "emake install failed"
31
32         dodoc README
33         newinitd "${FILESDIR}"/openlldp.initd lldpd
34         newconfd "${FILESDIR}"/openlldp.confd lldpd
35 }
36
37 pkg_postinst() {
38         elog "This is an experimental ebuild. Use with caution."
39         elog ""
40         ! use libpcap && elog "The kernel module \"af_packet\" is needed for this tool to run."
41 }