aboutsummaryrefslogtreecommitdiff
path: root/devel/etcd31/Makefile
blob: c993814632637dd41dcea716ba069cdf21598b5b (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
PORTNAME=	etcd
PORTVERSION=	3.1.20
DISTVERSIONPREFIX=	v
PORTREVISION=	19
CATEGORIES=	devel
PKGNAMEPREFIX=	coreos-
PKGNAMESUFFIX=	31

MAINTAINER=	olgeni@FreeBSD.org
COMMENT=	Highly-available key value store and service discovery
WWW=		https://github.com/etcd-io/etcd

LICENSE=	APACHE20
LICENSE_FILE=	${WRKSRC}/LICENSE

USES=		cpe go
USE_GITHUB=	yes
GH_ACCOUNT=	coreos
GH_TUPLE=	coreos:bbolt:v1.3.7:coreos_bbolt \
		golang:sys:v0.5.0:golang_sys

GO_PKGNAME=	github.com/coreos/etcd
GO_TARGET=	./cmd/etcd ./cmd/etcdctl

CONFLICTS_INSTALL=	coreos-etcd[0-9][0-9]

PLIST_FILES=	bin/etcd \
		bin/etcdctl
PORTDOCS=	README.md

OPTIONS_DEFINE=	DOCS
DOCS_DESC=	Install etcd README file

pre-patch:
	${RM} -r ${GO_WRKSRC}/cmd/vendor/github.com/coreos/bbolt
	${LN} -s ${WRKDIR}/bbolt-* ${GO_WRKSRC}/cmd/vendor/github.com/coreos/bbolt
	${RM} -r ${GO_WRKSRC}/cmd/vendor/golang.org/x/sys
	${LN} -s ${WRKDIR}/sys-* ${GO_WRKSRC}/cmd/vendor/golang.org/x/sys

post-patch:
	${REINPLACE_CMD} -i '' "s@#cgo LDFLAGS: -ldl@@g;" ${WRKSRC}/cmd/vendor/github.com/coreos/pkg/dlopen/dlopen.go

do-install-DOCS-on:
	${MKDIR} ${STAGEDIR}${DOCSDIR}
	${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}

.include <bsd.port.mk>