Sean Chittenden 906cb4b9e3 Add a new port: sysutils/sockaddr
Sockaddr is a command-line utility that makes it easy to query network
address information from the local server. With sockaddr it is possible
to create a list of the RFC 1918 addresses on a server, obtain the
default gateway, or public IP addresses and use this information in other
shell scripts. See the website for additional templating and IP math
functions.

Reviewed by:	mat, swills
Approved by:	swills (mentor)
Differential Revision:	https://reviews.freebsd.org/D14570
2018-05-11 20:30:18 +00:00

37 lines
909 B
Makefile

# $FreeBSD$
PORTNAME= sockaddr
DISTVERSION= g20180320
CATEGORIES= sysutils
MAINTAINER= seanc@FreeBSD.org
COMMENT= Command line utility for querying IP information
LICENSE= MPL20
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= go:lang/go
USE_GITHUB= yes
GH_SUBDIR= src/github.com/hashicorp/go-sockaddr
GH_ACCOUNT= hashicorp
GH_PROJECT= go-sockaddr
GH_TAGNAME= 7165ee1
PLIST_FILES= bin/sockaddr
post-extract:
@${CP} -rp ${WRKSRC}/cmd/${PORTNAME}/vendor/* ${WRKSRC}/src/
do-build:
@cd ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${GH_PROJECT}/cmd/${PORTNAME}/ && \
${SETENV} ${MAKE_ENV} CGO_ENABLED=0 GOPATH=${WRKSRC} \
${LOCALBASE}/bin/go build -ldflags "-X main.version=${DISTVERSIONPREFIX}${PORTVERSION} -w -s" \
-o ${PORTNAME}
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/src/github.com/hashicorp/go-sockaddr/cmd/${PORTNAME}/${PORTNAME} \
${STAGEDIR}${PREFIX}/bin/${PORTNAME}
.include <bsd.port.mk>