void-packages/srcpkgs/syncthing/template

34 lines
905 B
Bash
Raw Normal View History

2014-12-26 17:21:09 +01:00
# Template file for 'syncthing'
pkgname=syncthing
2015-05-31 10:22:33 +02:00
version=0.11.7
2015-03-22 16:05:51 +01:00
revision=1
build_style=go
go_import_path="github.com/syncthing/syncthing"
2014-12-26 17:21:09 +01:00
short_desc="Open Source Continuous File Synchronization"
2015-05-03 13:39:40 +02:00
maintainer="Duncaen <duncaen@voidlinux.eu>"
2015-03-22 14:18:27 +01:00
license="MPLv2"
2014-12-26 17:21:09 +01:00
homepage="http://syncthing.net/"
distfiles="https://github.com/syncthing/${pkgname}/archive/v${version}.tar.gz"
2015-05-31 10:22:33 +02:00
checksum=467a511b35046da90ed4416210222339a59539cf463fd72149f6f40fe6953340
2014-12-26 17:21:09 +01:00
do_build() {
goarch="${GOARCH}"
unset GOARCH
export CGO_ENABLED=0
2014-12-26 18:45:15 +01:00
mkdir -p $GOPATH/src/github.com/syncthing
ln -s $PWD $GOPATH/src/github.com/syncthing/${pkgname}
2014-12-26 19:56:42 +01:00
mkdir tmp
TMPDIR=${PWD}/tmp/ go run build.go -goos linux -goarch ${goarch} -no-upgrade -version "v${version}"
2014-12-26 19:56:42 +01:00
rm -rf tmp
2014-12-26 17:21:09 +01:00
}
do_install() {
2014-12-26 19:56:42 +01:00
case "$XBPS_TARGET_MACHINE" in
arm*) vbin bin/linux_arm/syncthing;;
2014-12-26 19:56:42 +01:00
x86_64*|i686*) vbin bin/syncthing;;
esac
2014-12-26 18:45:15 +01:00
vlicense LICENSE
vdoc README.md
2014-12-26 17:21:09 +01:00
}