blob: 382965447f392cf6d6022010764dad02385b910c (
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
|
PORTNAME= amazon-ssm-plugin
DISTVERSION= 1.2.536.0
PORTREVISION= 4
CATEGORIES= sysutils
MAINTAINER= nork@FreeBSD.org
COMMENT= Amazon AWS Manages shell experience using SSM APIs
WWW= https://github.com/aws/session-manager-plugin/
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE
RUN_DEPENDS= aws:devel/py-awscli@${PY_FLAVOR}
USES= go python:env
GO_BUILDFLAGS= -ldflags "-s -w"
GO_TARGET= src/sessionmanagerplugin-main/main.go:${PREFIX}/bin/session-manager-plugin \
src/ssmcli-main/main.go:${PREFIX}/bin/ssmcli
USE_GITHUB= yes
GH_ACCOUNT= aws
GH_PROJECT= session-manager-plugin
GH_SUBDIR= ${GH_PROJECT}
GH_TUPLE= eiannone:keyboard:6d2a597fd0f1:eiannone_keyboard/vendor/github.com/eiannone/keyboard \
fsnotify:fsnotify:v1.4.7:fsnotify_fsnotify/vendor/github.com/fsnotify/fsnotify \
golang:crypto:159ae71589f3:golang_crypto/vendor/golang.org/x/crypto \
golang:sync:43a5402ce75a:golang_sync/vendor/golang.org/x/sync \
golang:sys:v0.6.0:golang_sys/vendor/golang.org/x/sys \
gorilla:websocket:e8629af678b7:gorilla_websocket/vendor/github.com/gorilla/websocket \
jmespath:go-jmespath:c2b33e8439af:jmespath_go_jmespath/vendor/github.com/jmespath/go-jmespath \
stretchr:objx:cbeaeb16a013:stretchr_objx/vendor/github.com/stretchr/objx \
stretchr:testify:6cb3b85ef5a0:stretchr_testify/vendor/github.com/stretchr/testify \
twinj:uuid:70cac2bcd273:twinj_uuid/vendor/github.com/twinj/uuid \
xtaci:smux:09e2c01560df:xtaci_smux/vendor/github.com/xtaci/smux
#shrinked?# aws:aws-sdk-go:v1.44.302:aws_aws_sdk_go/vendor/github.com/aws/aws-sdk-go
#customized# cihub:seelog:c510775bb50d:cihub_seelog/vendor/github.com/cihub/seelog
PORTDOCS= NOTICE README.md RELEASENOTES.md THIRD-PARTY VERSION
PLIST_FILES= ${ETCDIR}/sessionmanagerplugin/seelog.xml.template \
${ETCDIR}/SSMCLI/seelog.xml.template \
bin/session-manager-plugin \
bin/ssmcli \
'@dir /var/log/amazon-ssm-plugin'
LOGDIR= ${DESTDIR}/var/log/${PORTNAME}
OPTIONS_DEFINE= DOCS
post-extract:
@${MKDIR} ${WRKDIR}/src
@${LN} -s ${WRKSRC} ${GO_WRKSRC}
${MKDIR} ${WRKSRC}/vendor/github.com/aws/session-manager-plugin
${LN} -s ../../../../src ${GO_WRKSRC}/vendor/github.com/aws/session-manager-plugin/
${LN} -s ../src/github.com/cihub ${GO_WRKSRC}/vendor/github.com/
${LN} -s ../../src/github.com/aws/aws-sdk-go ${GO_WRKSRC}/vendor/github.com/aws/
post-patch:
${REINPLACE_CMD} -e 's|%%VERSION%%|${DISTVERSION}|' ${WRKSRC}/src/version/version.go
${REINPLACE_CMD} -e 's|%%ETCDIR%%|${ETCDIR}|g; s|%%LOGDIR%%|${LOGDIR}|g' ${WRKSRC}/seelog_unix.xml
${REINPLACE_CMD} -e 's|%%ETCDIR%%|${ETCDIR}|g; s|%%LOGDIR%%|${LOGDIR}|g' ${WRKSRC}/src/log/log_unix.go
post-install:
@${MKDIR} ${STAGEDIR}${LOGDIR} ${STAGEDIR}${ETCDIR}/SSMCLI ${STAGEDIR}${ETCDIR}/sessionmanagerplugin
${INSTALL_DATA} ${WRKSRC}/seelog_unix.xml ${STAGEDIR}${ETCDIR}/SSMCLI/seelog.xml.template
${INSTALL_DATA} ${WRKSRC}/seelog_unix.xml ${STAGEDIR}${ETCDIR}/sessionmanagerplugin/seelog.xml.template
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>
|