aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt/pmacct/Makefile
blob: d96828bc6d0b56487c55a8043a20dc2d160e4e43 (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# New ports collection makefile for:    pmacct
# Date created:             Thu May  8 16:03:11 CEST 2003
# Whom:                 Kirill Ponomarew <ponomarew@oberon.net>
#
# $FreeBSD$
#

PORTNAME=   pmacct
DISTVERSION=    0.11.1
CATEGORIES= net-mgmt
MASTER_SITES=   http://www.pmacct.net/ \
        http://voodoo.bawue.com/download/

MAINTAINER= krion@FreeBSD.org
COMMENT=    Accounting and aggregation tool for IPv4 and IPv6 traffic

GNU_CONFIGURE=  yes
CONFIGURE_ENV=  CPPFLAGS="-I${LOCALBASE}/include" \
        LDFLAGS="-L${LOCALBASE}/lib"
USE_GETOPT_LONG=yes

OPTIONS=    MYSQL "Enable MySQL support." Off \
        PGSQL "Enable PostgreSQL support." Off \
        SQLITE "Enable SQLite support." Off \
        MMAP  "Enable mmap(2) support." On \
        LAYER2 "Enable Layer-2 support: MAC Adresses and VLANs" On

.include <bsd.port.pre.mk>

.if ${ARCH} == "amd64" || ${ARCH} == "sparc64"
CONFIGURE_ARGS+=    --enable-64bit
.endif

.if defined(WITH_MYSQL)
USE_MYSQL=  yes
CONFIGURE_ARGS+=--enable-mysql
PLIST_SUB+= WITH_MYSQL=""
.else
CONFIGURE_ARGS+=    --disable-mysql
PLIST_SUB+= WITH_MYSQL="@comment "
.endif

.if defined(WITH_PGSQL)
USE_PGSQL=  yes
CONFIGURE_ARGS+=--enable-pgsql
PLIST_SUB+= WITH_PGSQL=""
.else
CONFIGURE_ARGS+=    --disable-pgsql
PLIST_SUB+= WITH_PGSQL="@comment "
.endif

.if defined(WITH_SQLITE)
USE_SQLITE= yes
CONFIGURE_ARGS+=--enable-sqlite3 \
        --with-sqlite3-includes=${LOCALBASE}/include
.else
CONFIGURE_ARGS+=--disable-sqlite3
.endif

.if defined(WITHOUT_MMAP)
CONFIGURE_ARGS+=--disable-mmap
.else
CONFIGURE_ARGS+=--enable-mmap
.endif

.if defined(WITHOUT_LAYER2)
CONFIGURE_ARGS+=--disable-l2
.else
CONFIGURE_ARGS+=--enable-l2
.endif

post-patch:
    @${REINPLACE_CMD} -e 's|-O2||g' ${WRKSRC}/configure

post-install:
    @${MKDIR} ${EXAMPLESDIR}
    ${INSTALL_DATA} ${WRKSRC}/examples/* ${EXAMPLESDIR}
.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}
.for i in ChangeLog EXAMPLES FAQS README
    ${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
.endfor
.endif

.include <bsd.port.post.mk>
pan>/+1 * - update to 1.4.1dinoex2010-03-281-1/+1 * - update to jpeg-8dinoex2010-02-051-1/+1 * - bump all port that indirectly depends on libjpeg and have not yet been bump...dinoex2009-07-311-1/+1 * bump PORTREVISION after cmake updatemakc2009-03-251-0/+1 * - Add missing patch to fix the buildmiwi2009-02-171-0/+10 * - Unbreakmiwi2009-02-132-9/+7 * The KDE FreeBSD team is proud to announce the release of KDE 4.2.0miwi2009-02-091-0/+2