aboutsummaryrefslogtreecommitdiffstats
path: root/net/libnet/Makefile
blob: da6c118eedb24368d8339640aaf8dc6e137af15a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Created by: shipley@dis.org
# $FreeBSD$

PORTNAME=   libnet
PORTVERSION=    1.1.6
PORTREVISION=   4
PORTEPOCH=  1
CATEGORIES= net
MASTER_SITES=   SF/libnet-dev

MAINTAINER= sunpoet@FreeBSD.org
COMMENT=    C library for creating IP packets

LICENSE=    BSD2CLAUSE
LICENSE_FILE=   ${WRKSRC}/doc/COPYING

OPTIONS_DEFINE= BPF DOCS EXAMPLES
OPTIONS_DEFAULT=BPF
BPF_DESC=   link layer bpf

GNU_CONFIGURE=  yes
INSTALL_TARGET= install-strip
USE_CSTD=   gnu89
USE_LDCONFIG=   yes
USES=       libtool

PLIST_SUB=  VERSION=${PORTVERSION}

DOCS=       README doc/CHANGELOG doc/CONTRIB \
        doc/DESIGN_NOTES doc/MIGRATION doc/PACKET_BUILDING doc/PORTED \
        doc/RAWSOCKET_NON_SEQUITUR doc/TODO
EXAMPLES=   sample/*.c

BPF_CONFIGURE_OFF=  --with-link-layer=none
BPF_CONFIGURE_ON=   --with-link-layer=bpf

post-patch:
    @${REINPLACE_CMD} \
        -e 's|@LIBNET_CONFIG_LIBS@|@LIBNET_CONFIG_LIBS@ -L@prefix@/lib|' \
        -e 's|@LIBNET_CONFIG_CFLAGS@|@LIBNET_CONFIG_CFLAGS@ -I@prefix@/include|' \
            ${WRKSRC}/libnet-config.in

post-install:
    ${MKDIR} ${STAGEDIR}${DOCSDIR}/
    cd ${WRKSRC}/ && ${INSTALL_DATA} ${DOCS} ${STAGEDIR}${DOCSDIR}/
    ${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/
    cd ${WRKSRC}/ && ${INSTALL_DATA} ${EXAMPLES} ${STAGEDIR}${EXAMPLESDIR}/

.include <bsd.port.mk>