aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt/spectools/Makefile
blob: 188e414c18e47c9c15e86021ea7c2b979df62ae5 (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:    spectools
# Date created:             09 Oct 2007
# Whom:                 Henrik Brix Andersen <henrik@brixandersen.dk>
#
# $FreeBSD$
#

PORTNAME=   spectools
PORTVERSION=    200906.r1
CATEGORIES= net-mgmt
MASTER_SITES=   http://www.kismetwireless.net/code/ \
        ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= brix
DISTNAME=   spectools-2009-06-R1

MAINTAINER= brix@FreeBSD.org
COMMENT=    Tools for the Wi-Spy spectrum analyzers from MetaGeek LLC

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

PORTDOCS=   README

OPTIONS=    GTK "Enable graphical client" On \
        NCURSES "Enable ncurses client" On

ALL_TARGET= spectool_net spectool_raw

.include <bsd.port.options.mk>

.if defined(WITH_GTK)
ALL_TARGET+=    spectool_gtk
LIB_DEPENDS+=   gtk:${PORTSDIR}/x11-toolkits/gtk20
PLIST_SUB+= GTK=""
.else
PLIST_SUB+= GTK="@comment "
.endif

.if defined(WITH_NCURSES)
ALL_TARGET+=    spectool_curses
PLIST_SUB+= NCURSES=""
.else
PLIST_SUB+= NCURSES="@comment "
.endif

.include <bsd.port.pre.mk>

.if ${OSVERSION} < 602101
IGNORE= is unsupported on systems prior to FreeBSD v602101
.elif ${OSVERSION} > 700000 && ${OSVERSION} < 700027
IGNORE= is unsupported on systems prior to FreeBSD v700027
.endif

.if ${OSVERSION} < 800069
LIB_DEPENDS+=   usb-0.1:${PORTSDIR}/devel/libusb
.endif

.if ${ARCH} == "sparc64"
.if ${OSVERSION} > 800000
BROKEN=     Does not build on sparc64-8: duplicate definition of malloc
.else
BROKEN=     Does not compile on sparc64: fails to build wispy_hw_dbx.c
.endif
.endif

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/spectool_net ${PREFIX}/bin
    ${INSTALL_PROGRAM} ${WRKSRC}/spectool_raw ${PREFIX}/bin
.if defined(WITH_GTK)
    ${INSTALL_PROGRAM} ${WRKSRC}/spectool_gtk ${PREFIX}/bin
.endif
.if defined(WITH_NCURSES)
    ${INSTALL_PROGRAM} ${WRKSRC}/spectool_curses ${PREFIX}/bin
.endif

post-install:
.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${PORTDOCS:S@^@${WRKSRC}/@} ${DOCSDIR}
.endif
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>