# Contributor: Łukasz Jendrysik # Contributor: Carlo Landmeter # Contributor: Sören Tempel # Maintainer: Natanael Copa pkgname=syncthing pkgver=0.11.26 pkgrel=0 pkgdesc="Open Source Continuous File Synchronization" url="http://syncthing.net/" arch="all" license="MIT" pkgusers="$pkgname" pkggroups="$pkgname" depends="" depends_dev="" makedepends="godep go" install="$pkgname.pre-install" subpackages="" options="!strip" source="$pkgname-$pkgver.tar.gz::https://github.com/syncthing/syncthing/archive/v$pkgver.tar.gz syncthing.confd syncthing.initd" _builddir="$srcdir/src/github.com/syncthing" prepare() { mkdir -p "$_builddir" ln -s "$srcdir"/$pkgname-$pkgver "$_builddir"/$pkgname || return 1 cd "$_builddir" local i for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } build() { cd "$_builddir"/$pkgname # XXX this sucks because it blindly fetches dependencies from # the internet not allowing us their verify their integrity. GOPATH="$srcdir" go run build.go -no-upgrade -version=v$pkgver } package() { mkdir -p "$pkgdir"/usr/bin || return 1 install -d -o $pkgname -g $pkgname \ "$pkgdir"/var/lib/$pkgname || return 1 mv "$_builddir"/$pkgname/bin/* \ "$pkgdir"/usr/bin || return 1 install -D -m755 "$srcdir"/$pkgname.initd \ "$pkgdir"/etc/init.d/$pkgname || return 1 install -D -m644 "$srcdir"/$pkgname.confd \ "$pkgdir"/etc/conf.d/$pkgname || return 1 } md5sums="d4832f099005d9443a21846ab8817eb8 syncthing-0.11.26.tar.gz c4923d6df4d3e51274869c09ea46a3e1 syncthing.confd 760e26e5ea2f1dce8ce149a45f5e99bb syncthing.initd" sha256sums="d2cc72d5711c5a7d25c32951bd11680ad7d9530c2183de240287f07fe9e80ac2 syncthing-0.11.26.tar.gz da396f944d7b5b2e4f5a7a9a3a7b31529cf359ef7ebecec4c48383d0c8b6821e syncthing.confd 4d7c1de71cfc415d716471f32fdbb1693597f0209167e4c4ea302478481ab9b3 syncthing.initd" sha512sums="0cd97d303bfb45886360eadcd250e6c8f699c43f492113b7bc231944b78203b5078d2cba195bc688800e3f7ed729dd979bbb03297e1722ade2739686804b943d syncthing-0.11.26.tar.gz b19cc3d802caa33f4d06852de590d2d984c12cf27d0540162cd7195da4f3f149c83c72e7a10f385b32b27fff6f39d33698e7402442a3f32a9da136c5d19059ae syncthing.confd 21fa7b0090e579ad0f02bb8cc9a78736eb99811613823bf12d477262da2281543d07b47ae0888e2e3876a687bf4cab3c89405447373a9c5ab2915989c5f9dce8 syncthing.initd"