Sat Oct 3 16:26:00 2015 UTC ()
Import syncthing-0.11.25 as net/syncthing. From pkgsrc-wip.

Syncthing replaces proprietary sync and cloud services with something open,
trustworthy and decentralized.
Features include:
- web admin console
- directory watcher
- authentication with x509 certificates
- node discovery
- written in "go"


(tnn)
diff -r0 -r1.1 pkgsrc/net/syncthing/DESCR
diff -r0 -r1.1 pkgsrc/net/syncthing/Makefile
diff -r0 -r1.1 pkgsrc/net/syncthing/PLIST
diff -r0 -r1.1 pkgsrc/net/syncthing/distinfo
diff -r0 -r1.1 pkgsrc/net/syncthing/patches/patch-lib_config_config.go

File Added: pkgsrc/net/syncthing/DESCR
Syncthing replaces proprietary sync and cloud services with something open,
trustworthy and decentralized.
Features include:
- web admin console
- directory watcher
- authentication with x509 certificates
- node discovery
- written in "go"

File Added: pkgsrc/net/syncthing/Makefile
# $NetBSD: Makefile,v 1.1 2015/10/03 16:26:00 tnn Exp $

DISTNAME=	syncthing-0.11.25
CATEGORIES=	net
MASTER_SITES=	${MASTER_SITE_GITHUB:=syncthing/}
GITHUB_TAG=	v${PKGVERSION_NOREV}

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	http://syncthing.net/
COMMENT=	Keeps directories in sync across hosts
LICENSE=	mpl-2.0

BUILD_DEPENDS+=		go-[0-9]*:../../lang/go

USE_LANGUAGES=		# go
NO_CONFIGURE=		yes

INSTALLATION_DIRS=	bin

MAKE_ENV+=		GOPATH=${WRKDIR}/gopath
INSTALL_UNSTRIPPED=	yes	# XXX for Mac OS?

SUBST_CLASSES+=		version
SUBST_STAGE.version=	pre-build
SUBST_MESSAGE.version=  Fixing version string
SUBST_FILES.version=	build.go
SUBST_SED.version=	-e 's|runError("git", "describe", "--always", "--dirty")|runError("echo","v${PKGVERSION_NOREV}")|'
SUBST_SED.version+=	-e 's|runError("git", "show", "-s", "--format=%ct")|runError("false")|'

post-extract:
	${MKDIR} ${WRKDIR}/gopath/src/github.com/syncthing
	${LN} -s ${WRKSRC} ${WRKDIR}/gopath/src/github.com/syncthing/syncthing

do-build:
	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${PREFIX}/bin/go run build.go

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/bin/syncthing ${DESTDIR}/${PREFIX}/bin

.include "../../mk/bsd.pkg.mk"

File Added: pkgsrc/net/syncthing/PLIST
@comment $NetBSD: PLIST,v 1.1 2015/10/03 16:26:00 tnn Exp $
bin/syncthing

File Added: pkgsrc/net/syncthing/distinfo
$NetBSD: distinfo,v 1.1 2015/10/03 16:26:00 tnn Exp $

SHA1 (syncthing-0.11.25.tar.gz) = 6387204c517327eb1d28cc83104b44145037f367
RMD160 (syncthing-0.11.25.tar.gz) = 1751a81e0a7db6497ba2ae16a760f8d844beb926
Size (syncthing-0.11.25.tar.gz) = 4202742 bytes
SHA1 (patch-lib_config_config.go) = 3d4188721292e21106b16914f0a1ed75d8882638

File Added: pkgsrc/net/syncthing/patches/Attic/patch-lib_config_config.go
$NetBSD: patch-lib_config_config.go,v 1.1 2015/10/03 16:26:00 tnn Exp $

Disable auto upgrade mechanism. It would overwrite the binary in /usr/pkg/bin
with something the user doesn't necessarily trust.

--- lib/config/config.go.orig	2015-08-16 13:29:48.000000000 +0000
+++ lib/config/config.go
@@ -229,7 +229,7 @@ type OptionsConfiguration struct {
 	URAccepted              int      `xml:"urAccepted" json:"urAccepted"` // Accepted usage reporting version; 0 for off (undecided), -1 for off (permanently)
 	URUniqueID              string   `xml:"urUniqueID" json:"urUniqueId"` // Unique ID for reporting purposes, regenerated when UR is turned on.
 	RestartOnWakeup         bool     `xml:"restartOnWakeup" json:"restartOnWakeup" default:"true"`
-	AutoUpgradeIntervalH    int      `xml:"autoUpgradeIntervalH" json:"autoUpgradeIntervalH" default:"12"` // 0 for off
+	AutoUpgradeIntervalH    int      `xml:"autoUpgradeIntervalH" json:"autoUpgradeIntervalH" default:"0"` // 0 for off
 	KeepTemporariesH        int      `xml:"keepTemporariesH" json:"keepTemporariesH" default:"24"`         // 0 for off
 	CacheIgnoredFiles       bool     `xml:"cacheIgnoredFiles" json:"cacheIgnoredFiles" default:"true"`
 	ProgressUpdateIntervalS int      `xml:"progressUpdateIntervalS" json:"progressUpdateIntervalS" default:"5"`