void-packages/srcpkgs/syncthing/template

42 lines
1.1 KiB
Plaintext
Raw Normal View History

2014-12-26 16:21:09 +00:00
# Template file for 'syncthing'
pkgname=syncthing
version=0.10.13
revision=3
2014-12-26 16:21:09 +00:00
hostmakedepends="go>=1.3"
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" go-cross-linux"
fi
short_desc="Open Source Continuous File Synchronization"
maintainer="Duncan Overbruck <mail@duncano.de>"
license="GPL-3"
homepage="http://syncthing.net/"
distfiles="https://github.com/syncthing/${pkgname}/archive/v${version}.tar.gz"
checksum=19d0d72eac7af99714c047677d892559a8d4c96c73ef5ba50a48cec44a03def2
do_build() {
case "$XBPS_TARGET_MACHINE" in
2014-12-26 18:56:42 +00:00
armv6*) goarch=armv6;;
armv7*) goarch=armv7;;
i686*) goarch=386;;
x86_64*) goarch=amd64;;
2014-12-26 16:21:09 +00:00
esac
2014-12-26 17:45:15 +00:00
export GOPATH="${PWD}/gopath"
export CGO_ENABLED=0
2014-12-26 17:45:15 +00:00
mkdir -p $GOPATH/src/github.com/syncthing
ln -s $PWD $GOPATH/src/github.com/syncthing/${pkgname}
2014-12-26 18:56:42 +00:00
mkdir tmp
TMPDIR=${PWD}/tmp/ go run build.go -goos linux -goarch ${goarch} -no-upgrade -version "v${version}"
2014-12-26 18:56:42 +00:00
rm -rf tmp
2014-12-26 16:21:09 +00:00
}
do_install() {
2014-12-26 18:56:42 +00:00
case "$XBPS_TARGET_MACHINE" in
armv6*|armv7*) vbin bin/linux_arm/syncthing;;
x86_64*|i686*) vbin bin/syncthing;;
esac
2014-12-26 17:45:15 +00:00
vlicense LICENSE
vdoc README.md
2014-12-26 16:21:09 +00:00
}