Also link stcli (the command line interface) to the build. This was a combined effort between myself and Alex Holst. OK abieber@, thanks.
47 lines
1.2 KiB
Makefile
47 lines
1.2 KiB
Makefile
# $OpenBSD: Makefile,v 1.24 2019/02/07 15:50:09 edd Exp $
|
|
|
|
COMMENT = open decentralized synchronization utility
|
|
|
|
V = 1.0.1
|
|
DISTNAME = syncthing-${V}
|
|
DISTFILES = syncthing-source-v${V}${EXTRACT_SUFX}
|
|
|
|
CATEGORIES = net
|
|
HOMEPAGE = https://syncthing.net/
|
|
|
|
MAINTAINER = Edd Barrett <edd@openbsd.org>
|
|
|
|
# MPL 2.0
|
|
PERMIT_PACKAGE_CDROM = Yes
|
|
|
|
WANTLIB += c pthread
|
|
|
|
MASTER_SITES = https://github.com/syncthing/syncthing/releases/download/v${V}/
|
|
|
|
WRKDIST = ${WRKDIR}/syncthing
|
|
WRKSRC = ${WRKDIR}/go/src/github.com/syncthing/syncthing
|
|
SUBST_VARS += VARBASE
|
|
|
|
MODULES = lang/go
|
|
MODGO_TYPE = bin
|
|
MODGO_ENV = PATH="${PORTPATH}" HOME="${PORTHOME}"
|
|
|
|
do-build:
|
|
cd ${WRKSRC} && ${MODGO_CMD} run build.go \
|
|
-version v${V} -no-upgrade
|
|
|
|
# Some tests fail, but they are bugs in the test suite itself, not Syncthing.
|
|
# We are working with upstream to fix these:
|
|
# https://forum.syncthing.net/t/openbsd-test-debugging/12799
|
|
do-test:
|
|
cd ${WRKSRC} && ${MODGO_CMD} run build.go test
|
|
|
|
do-install:
|
|
${INSTALL_PROGRAM} ${WRKSRC}/bin/syncthing ${PREFIX}/bin/
|
|
${INSTALL_PROGRAM} ${WRKSRC}/bin/stcli ${PREFIX}/bin/
|
|
.for sec in 1 5 7
|
|
${INSTALL_MAN} ${WRKSRC}/man/*.${sec} ${PREFIX}/man/man${sec}/
|
|
.endfor
|
|
|
|
.include <bsd.port.mk>
|