166015fdd1f487beebe1834037225728b167ba60
[vuplus_openembedded] / libpcap / libpcap_0.7.2.oe
1 DESCRIPTION = "Network Packet Capture Library"
2 SECTION = "libs"
3 PRIORITY = "required"
4 MAINTAINER = "Greg Gilbert <treke@handhelds.org>"
5 DEPENDS = "virtual/libc"
6 RDEPENDS = "libc6"
7
8 SRC_URI=http://www.tcpdump.org/release/libpcap-${PV}.tar.gz;
9 SRC_URI_append=" file://${FILESDIR}/libpcap-shared.patch;patch=1"
10 SRC_URI_append=" file://${FILESDIR}/configure.patch;patch=1"
11 SRC_URI_append=" file://${FILESDIR}/ldflags.patch;patch=1"
12 DEPENDS = "virtual/libc"
13
14 inherit autotools
15 EXTRA_OECONF="  --with-pcap=linux"
16 CPPFLAGS_prepend = '-I${S} '
17 CFLAGS_prepend = '-I${S} '
18 CXXFLAGS_prepend = '-I${S} '
19
20 do_configure_prepend () {
21         if [ ! -e acinclude.m4 ]; then
22                 cat aclocal.m4 > acinclude.m4
23         fi
24 }
25
26 do_stage () {
27         install -d ${STAGING_DIR}/target/include/net
28         install -m 0644 net/bpf.h ${STAGING_DIR}/target/include/net/bpf.h
29         install -m 0644 pcap.h ${STAGING_DIR}/target/include/pcap.h
30         install -m 0644 pcap-namedb.h ${STAGING_DIR}/target/include/pcap-namedb.h
31         install -m 0755 libpcap.so.${PV} ${STAGING_LIBDIR}/
32         ln -sf libpcap.so.${PV} ${STAGING_LIBDIR}/libpcap.so.0.7
33         ln -sf libpcap.so.${PV} ${STAGING_LIBDIR}/libpcap.so.0
34         ln -sf libpcap.so.${PV} ${STAGING_LIBDIR}/libpcap.so
35         install -m 0644 libpcap.a ${STAGING_LIBDIR}/
36 }