aboutsummaryrefslogtreecommitdiffstats
path: root/net/nsq/Makefile
blob: ea0964f72f83237364c528b321e92a38f2a8ec59 (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
# $FreeBSD$

PORTNAME=   nsq
PORTVERSION=    1.0.0
DISTVERSIONPREFIX=  v
DISTVERSIONSUFFIX=  -compat
CATEGORIES= net

MAINTAINER= jhixson@gmail.com
COMMENT=    Realtime distributed messaging platform

LICENSE=    MIT

BUILD_DEPENDS=  go>=1.7:lang/go

ONLY_FOR_ARCHS= amd64

USE_RC_SUBR=    nsqd nsqlookupd nsqadmin

USES=   compiler go

USE_GITHUB= yes
GH_ACCOUNT= nsqio
GH_SUBDIR=  src/github.com/nsqio/nsq
GH_TUPLE=   BurntSushi:toml:v0.2.0:toml/src/github.com/BurntSushi/toml \
    judwhite:go-svc:v1.0.0:go_svc/src/github.com/judwhite/go-svc \
    mreiferson:go-options:77551d2:go_options/src/github.com/mreiferson/go-options \
    mreiferson:go-snappystream:v0.2.3:go_snappystream/src/github.com/mreiferson/go-snappystream\
    bitly:go-hostpool:d0e59c2:go_hostpool/src/github.com/bitly/go-hostpool \
    bitly:go-simplejson:v0.5.0:go_simplejson/src/github.com/bitly/go-simplejson\
    bitly:timer_metrics:afad179:timer_metrics/src/github.com/bitly/timer_metrics \
    blang:semver:v3.3.0:semver/src/github.com/blang/semver \
    bmizerany:perks:d9a9656:perks/src/github.com/bmizerany/perks \
    julienschmidt:httprouter:8a45e95:httprouter/src/github.com/julienschmidt/httprouter \
    golang:snappy:553a641:snappy/src/github.com/golang/snappy \
    nsqio:go-diskqueue:d7805f8:go_diskqueue/src/github.com/nsqio/go-diskqueue \
    nsqio:go-nsq:v1.0.6:go_nsq/src/github.com/nsqio/go-nsq

TARGETS=    nsqd nsqlookupd nsqadmin nsq_pubsub nsq_to_nsq nsq_to_file \
    nsq_to_http nsq_tail nsq_stat to_nsq

STRIP=

.for _t in ${TARGETS}
build-${_t}:
    cd ${GO_WRKSRC}/apps/${_t}; \
        ${SETENV} ${BUILD_ENV} GOPATH=${WRKSRC} go build \
            -ldflags "-X main.GitDescribe=${DISTVERSIONFULL}" -o bin/${_t}
install-${_t}:
    ${INSTALL_PROGRAM} ${GO_WRKSRC}/apps/${_t}/bin/${_t} \
        ${STAGEDIR}${PREFIX}/bin/${_t}

build_targets+= build-${_t}
install_targets+=   install-${_t}
.endfor

do-build: ${build_targets}
do-install: ${install_targets}

.include <bsd.port.pre.mk>

.if ${COMPILER_TYPE} == clang
BUILD_ENV=  CC=clang
.endif

.include <bsd.port.post.mk>