dev-python/zipp: keyworded 0.5.2 for ppc, bug #690956
[gentoo.git] / net-libs / daq / daq-0.6.2-r1.ebuild
1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="4"
5
6 inherit eutils multilib
7
8 DESCRIPTION="Data Acquisition library, for packet I/O"
9 HOMEPAGE="http://www.snort.org/"
10 SRC_URI="http://www.snort.org/downloads/1339 -> ${P}.tar.gz"
11 LICENSE="GPL-2"
12 SLOT="0"
13 KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86"
14 IUSE="ipv6 +afpacket +dump +pcap nfq ipq static-libs"
15
16 DEPEND="pcap? ( >=net-libs/libpcap-1.0.0 )
17                 dump? ( >=net-libs/libpcap-1.0.0 )
18                 nfq? ( dev-libs/libdnet
19                         >=net-firewall/iptables-1.4.10
20                         net-libs/libnetfilter_queue )
21                 ipq? ( dev-libs/libdnet
22                         >=net-firewall/iptables-1.4.10
23                         net-libs/libnetfilter_queue )"
24
25 RDEPEND="${DEPEND}"
26
27 src_configure() {
28         econf \
29                 $(use_enable ipv6) \
30                 $(use_enable pcap pcap-module) \
31                 $(use_enable afpacket afpacket-module) \
32                 $(use_enable dump dump-module) \
33                 $(use_enable nfq nfq-module) \
34                 $(use_enable ipq ipq-module) \
35                 $(use_enable static-libs static) \
36                 --disable-ipfw-module \
37                 --disable-bundled-modules
38 }
39
40 src_install() {
41         emake DESTDIR="${D}" install
42         dodoc ChangeLog README
43
44         # Remove unneeded .la files
45         rm \
46                 "${D}"usr/$(get_libdir)/daq/*.la \
47                 "${D}"usr/$(get_libdir)/libdaq*.la \
48                 "${D}"usr/$(get_libdir)/libsfbpf.la \
49                 || die
50
51         # If not using static-libs don't install the static libraries
52         # This has been bugged upstream
53         if ! use static-libs; then
54                 for z in libdaq_static libdaq_static_modules; do
55                         rm "${D}"usr/$(get_libdir)/${z}.a
56                 done
57         fi
58 }
59
60 pkg_postinst() {
61         einfo "The Data Acquisition library (DAQ) for packet I/O replaces direct"
62         einfo "calls to PCAP functions with an abstraction layer that facilitates"
63         einfo "operation on a variety of hardware and software interfaces without"
64         einfo "requiring changes to application such as Snort."
65         einfo
66         einfo "Please see the README file for DAQ for information about specific"
67         einfo "DAQ modules."
68 }