aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/ipfs-go/Makefile
blob: 446ac2017687915e8436e3b4b1cc47862a163f20 (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
# $FreeBSD$

PORTNAME=   ipfs-go
PORTVERSION=    0.3.7
DISTVERSIONPREFIX=  v
CATEGORIES= sysutils

MAINTAINER= wg@FreeBSD.org
COMMENT=    IPFS implementation in Go

BUILD_DEPENDS=  ${LOCALBASE}/bin/go:${PORTSDIR}/lang/go

USES=       gmake

USE_GITHUB= yes
GH_ACCOUNT= ipfs
GH_PROJECT= go-ipfs

MAKE_ENV+=  GOPATH=${WRKSRC}

PLIST_FILES=    bin/${PORTNAME}

USE_RC_SUBR=    ${PORTNAME}

STRIP=      # stripping can break go binaries

.include <bsd.port.pre.mk>

.if ${ARCH} == i386
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-32bit
.endif

# Prepare for possible extra modules in future
post-extract:
    @${MKDIR} ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${GH_PROJECT}
.for src in CHANGELOG.md Dockerfile Godeps LICENSE Makefile README.md assets bin blocks blockservice circle.yml cmd commands core dev dev.md diagnostics doc.go docs exchange fuse importer ipnsfs jenkins merkledag metrics misc namesys notifications p2p path pin repo routing test thirdparty tour unixfs updates util
    ${MV} ${WRKSRC}/${src} \
        ${WRKSRC}/src/github.com/ipfs/${GH_PROJECT}
.endfor

do-build:
    cd ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${GH_PROJECT}; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} build

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${GH_PROJECT}/cmd/ipfs/ipfs ${STAGEDIR}${PREFIX}/bin/${PORTNAME}

.include <bsd.port.post.mk>