# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-libs/libpcap-ringbuffer/libpcap-ringbuffer-1.0.20050129-r2.ebuild,v 1.2 2005/06/11 13:41:09 dholm Exp $ inherit toolchain-funcs linux-info multilib eutils MY_P=${PN:0:7}-${PV} DESCRIPTION="A libpcap version which supports MMAP mode (ringbuffer) on the linux kernel 2.[46].x" HOMEPAGE="http://public.lanl.gov/cpw/" SRC_URI="${HOMEPAGE}${MY_P}.tar.gz" LICENSE="BSD" SLOT="0" KEYWORDS="~ppc ~x86" IUSE="ipv6" DEPEND="virtual/libc !virtual/libpcap" PROVIDE="virtual/libpcap" S=${WORKDIR}/${MY_P} # Used in linux-info to check minium Kernel support CONFIG_CHECK="PACKET_MMAP" PACKET_MMAP_ERROR="Make sure you have PACKET_MMAP compiled in your kernel to make use of libpcap's ringbuffer feature." src_unpack() { unpack ${A} cd ${S} # epatch ${FILESDIR}/${P}-makefile.patch } src_compile() { cd ${S} econf $(use_enable ipv6) --enable-shared --with-pcap=linux || die "bad configure" emake || die "compile problem" } src_install() { dodir /usr/include dodir /usr/$(get_libdir) emake DESTDIR=${D} install || die "install problem" dodoc CREDITS CHANGES FILES README* VERSION } pkg_postinst() { einfo "For usage with tcpdump and further details see:" einfo "/usr/share/doc/${PF}/README.ring.gz" }