File tree Expand file tree Collapse file tree 1 file changed +7
-18
lines changed
Expand file tree Collapse file tree 1 file changed +7
-18
lines changed Original file line number Diff line number Diff line change 11PORTNAME = diceware
2- DISTVERSION = latest
2+ DISTVERSION = v1.0.0
33CATEGORIES = sysutils
44
55MAINTAINER = chief@8ff.org
@@ -8,28 +8,17 @@ WWW= https://github.com/8ff/diceware
88
99LICENSE = MIT
1010
11+ USES = go:modules
1112USE_GITHUB = yes
1213GH_ACCOUNT = 8ff
13- GH_TAGNAME = latest
1414
15- # The port only installs a single binary:
16- PLIST_FILES = bin/${PORTNAME}
15+ GO_MODULE = github.com/8ff/diceware
16+ GO_TARGET = ./cmd/pwgen
1717
18- # Download and set up the latest Go, then build diceware.
19- do-build :
20- @${MKDIR} ${WRKDIR} /gobin
21- @cd ${WRKDIR} && \
22- ${FETCH_CMD} -o go.json https://go.dev/dl/? mode=json && \
23- LATEST_GO=$$(grep -m1 '"version"' go.json | ${CUT} -d'"' -f4 | ${TR} -d 'go' ) && \
24- ${FETCH_CMD} https://go.dev/dl/go$$ {LATEST_GO}.freebsd-amd64.tar.gz && \
25- ${TAR} xf go$$ {LATEST_GO}.freebsd-amd64.tar.gz
26- @cd ${WRKSRC} /cmd/pwgen && \
27- ${SETENV} \
28- PATH=${WRKDIR} /go/bin:${PATH} \
29- GOROOT=${WRKDIR} /go \
30- go build -o ${WRKDIR} /${PORTNAME} .
18+ PLIST_FILES = bin/${PORTNAME}
3119
20+ # Rename binary from pwgen to diceware when installing
3221do-install :
33- ${INSTALL_PROGRAM} ${WRKDIR} /${PORTNAME} ${STAGEDIR}${PREFIX} /bin
22+ ${INSTALL_PROGRAM} ${WRKDIR} /bin/pwgen ${STAGEDIR}${PREFIX} /bin/ ${PORTNAME}
3423
3524.include <bsd.port.mk>
You can’t perform that action at this time.
0 commit comments