aboutsummaryrefslogtreecommitdiffstats
path: root/devel/go-bindata/Makefile
blob: 9d466f127ac15a9b93ea2fecb7bd39684036d407 (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
# $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>