void-packages/srcpkgs/syncthing/template
Dominik Honnef a62f407007 set Go env vars in environment
This way, a template can overwrite do_build but still have good defaults
for GOPATH, GOARCH and GOARM.
2015-02-21 14:49:02 +01:00

33 lines
910 B
Text

# Template file for 'syncthing'
pkgname=syncthing
version=0.10.23
revision=1
build_style=go
go_import_path="github.com/syncthing/syncthing"
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=c8c829191620e2268209c3da19b4b58b3568aaf859d9be84b161da26454fb54a
do_build() {
goarch="${GOARCH}"
unset GOARCH
export CGO_ENABLED=0
mkdir -p $GOPATH/src/github.com/syncthing
ln -s $PWD $GOPATH/src/github.com/syncthing/${pkgname}
mkdir tmp
TMPDIR=${PWD}/tmp/ go run build.go -goos linux -goarch ${goarch} -no-upgrade -version "v${version}"
rm -rf tmp
}
do_install() {
case "$XBPS_TARGET_MACHINE" in
arm*) vbin bin/linux_arm/syncthing;;
x86_64*|i686*) vbin bin/syncthing;;
esac
vlicense LICENSE
vdoc README.md
}