aboutsummaryrefslogtreecommitdiff
path: root/security/ssh-vault/Makefile
blob: 50b199b84cb6b72be5950eb3372d127cefd5a8cc (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
# $FreeBSD$

PORTNAME=       ssh-vault
PORTVERSION=    0.9.1
CATEGORIES=     security

MAINTAINER=     nbari@tequila.io
COMMENT=        Encrypt/decrypt using ssh keys

LICENSE=        BSD3CLAUSE
LICENSE_FILE=   ${WRKSRC}/LICENSE

BUILD_DEPENDS=  go>=1.7:lang/go \
		go.crypto>=20160709:security/go.crypto

USES=           go

USE_GITHUB=     yes
GH_TUPLE=	ssh-vault:crypto:ae180e0:crypto \
		ssh-vault:ssh2pem:228a306:ssh2pem \
		kr:pty:ce7fa45:pty \
		keybase:go-keychain:fc62173:keychain

STRIP=		# stripping can break go binaries

PLIST_FILES=	bin/ssh-vault

post-patch:
	@${MKDIR} ${WRKSRC}/src/golang.org \
	${WRKSRC}/src/github.com/ssh-vault/ssh-vault
.for src in cmd a_test.go cache.go cache_test.go close.go create.go \
	create_test.go edit.go encode.go getkey.go getkey_test.go shred.go \
	shred_test.go vault.go vault_test.go view.go get_password.go \
	get_password_prompt.go
	@${MV} ${WRKSRC}/${src} \
	${WRKSRC}/src/github.com/${GH_ACCOUNT}/${GH_PROJECT}
.endfor
	@${MV} ${WRKSRC_crypto}/${src} \
		${WRKSRC}/src/github.com/${GH_ACCOUNT}/crypto
	@${MV} ${WRKSRC_ssh2pem}/${src} \
		${WRKSRC}/src/github.com/${GH_ACCOUNT}/ssh2pem
	@${MKDIR} ${WRKSRC}/src/github.com/keybase
	@${MV} ${WRKDIR}/go-keychain-fc62173 \
		${WRKSRC}/src/github.com/keybase/go-keychain
	@${MKDIR} ${WRKSRC}/src/github.com/kr
	@${MV} ${WRKDIR}/pty-ce7fa45 \
		${WRKSRC}/src/github.com/kr/pty
	@${LN} -sf ${LOCALBASE}/share/go/src/golang.org/x ${WRKSRC}/src/golang.org/x

do-build:
	@cd ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${GH_PROJECT}; \
	${SETENV} ${BUILD_ENV} GOPATH=${WRKSRC} go build -ldflags \
	"-X main.version=${PORTVERSION}" -o ssh-vault cmd/ssh-vault/main.go;

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/src/github.com/ssh-vault/ssh-vault/ssh-vault ${STAGEDIR}${PREFIX}/bin/ssh-vault

.include <bsd.port.mk>