dev-python/zipp: keyworded 0.5.2 for ppc, bug #690956
[gentoo.git] / net-libs / daq / daq-0.6.2.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 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         for x in pcap afpacket dump nfq ipq; do
46                 rm "${D}"usr/lib64/daq/daq_${x}.la
47         done
48         for y in libdaq libdaq_static libdaq_static_modules libsfbpf; do
49                 rm "${D}"usr/lib64/${y}.la
50         done
51
52         # If not using static-libs don't install the static libraries
53         # This has been bugged upstream
54         if ! use static-libs; then
55                 for z in libdaq_static libdaq_static_modules; do
56                         rm "${D}"usr/lib64/${z}.a
57                 done
58         fi
59 }
60
61 pkg_postinst() {
62         einfo "The Data Acquisition library (DAQ) for packet I/O replaces direct"
63         einfo "calls to PCAP functions with an abstraction layer that facilitates"
64         einfo "operation on a variety of hardware and software interfaces without"
65         einfo "requiring changes to application such as Snort."
66         einfo
67         einfo "Please see the README file for DAQ for information about specific"
68         einfo "DAQ modules."
69 }