diff options
author | Steve Wills <swills@FreeBSD.org> | 2015-05-06 17:47:55 +0000 |
---|---|---|
committer | Steve Wills <swills@FreeBSD.org> | 2015-05-06 17:47:55 +0000 |
commit | da4d8f29c8f22995d42f4305be9e1b598c75ab0e (patch) | |
tree | 770850ac250565fd546eee04e90c1c1c0681ae62 /devel/go-bindata/Makefile | |
parent | 73036258707ae064639be8e8a8f10f5803fd8e15 (diff) | |
download | ports-da4d8f29c8f22995d42f4305be9e1b598c75ab0e.tar.gz ports-da4d8f29c8f22995d42f4305be9e1b598c75ab0e.zip |
devel/go-bindata: add port
A small utility which generates Go code from any file. Useful for embedding
binary data in a Go program.
WWW: https://github.com/jteeuwen/go-bindata
Notes
Notes:
svn path=/head/; revision=385532
Diffstat (limited to 'devel/go-bindata/Makefile')
-rw-r--r-- | devel/go-bindata/Makefile | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/devel/go-bindata/Makefile b/devel/go-bindata/Makefile new file mode 100644 index 000000000000..9d466f127ac1 --- /dev/null +++ b/devel/go-bindata/Makefile @@ -0,0 +1,49 @@ +# $FreeBSD$ + +PORTNAME= go-bindata +PORTVERSION= 3.0.5 +DISTVERSIONPREFIX= v +CATEGORIES= devel + +MAINTAINER= swills@FreeBSD.org +COMMENT= Generates Go code from any file + +BUILD_DEPENDS= ${LOCALBASE}/bin/go:${PORTSDIR}/lang/go + +USE_GITHUB= yes +GH_ACCOUNT= jteeuwen +GH_PROJECT= go-bindata + +PLIST_FILES= bin/go-bindata + +PORTDOCS= CONTRIBUTING.md LICENSE README.md + +STRIP= # stripping can break go binaries + +OPTIONS_DEFINE= DOCS + +.include <bsd.port.options.mk> + +post-patch: + @cd ${WRKSRC} ; ${MKDIR} src/github.com/${GH_ACCOUNT}/${GH_PROJECT} ; \ + ${CP} -R CONTRIBUTING.md LICENSE README.md asset.go bytewriter.go \ + config.go convert.go debug.go doc.go go-bindata release.go \ + stringwriter.go testdata toc.go \ + src/github.com/${GH_ACCOUNT}/${GH_PROJECT} + +do-build: + cd ${WRKSRC} ; \ + ${SETENV} GOPATH=${WRKSRC} go build -o ${PORTNAME}/${PORTNAME} ${PORTNAME}/main.go ${PORTNAME}/version.go + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME}/${PORTNAME} \ + ${STAGEDIR}${PREFIX}/bin/ + ${MKDIR} ${STAGEDIR}${DOCSDIR} +.if ${PORT_OPTIONS:MDOCS} +.for x in ${PORTDOCS} + ${INSTALL_MAN} ${WRKSRC}/${x} \ + ${STAGEDIR}${DOCSDIR} +.endfor +.endif + +.include <bsd.port.mk> |