summaryrefslogtreecommitdiff
path: root/net/containernetworking-plugins/Makefile
blob: 1bb51731ca52bc2151b8d0d701b3c82fdc72f77d (plain)
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
PORTNAME=	containernetworking-plugins
DISTVERSIONPREFIX=	freebsd-v
DISTVERSION=	0.5
PORTREVISION=	7
CATEGORIES=	net

MAINTAINER=	dfr@FreeBSD.org
COMMENT=	Networking plugins for container networking support
WWW=		https://www.cni.dev/

LICENSE=	GPLv2

USES=		go:no_targets
BUILD_DEPENDS=	bash:shells/bash

USE_GITHUB=	yes
GH_ACCOUNT=	dfr
GH_PROJECT=	plugins
GH_TUPLE=	golang:sys:v0.6.0:sys

pre-patch:
	${RM} -r ${WRKSRC}/vendor/golang.org/x/sys
	${LN} -s ${WRKDIR}/sys-* ${WRKSRC}/vendor/golang.org/x/sys

do-build:
	cd ${WRKSRC} && ${SETENV} XDG_CACHE_HOME=${WRKDIR}/.cache GO=${GO_CMD} ./build_freebsd.sh

do-install:
	${MKDIR} ${STAGEDIR}${PREFIX}/libexec/cni
	${MKDIR} ${STAGEDIR}${PREFIX}/etc/containers
	cd ${WRKSRC} && ${INSTALL_PROGRAM} bin/* ${STAGEDIR}${PREFIX}/libexec/cni
	${INSTALL_DATA} files/pf.conf.sample ${STAGEDIR}${PREFIX}/etc/containers

.include <bsd.port.mk>