void-packages/srcpkgs/syncthing/template

34 lines
910 B
Bash
Raw Normal View History

2014-12-26 17:21:09 +01:00
# Template file for 'syncthing'
pkgname=syncthing
2015-03-22 14:10:32 +01:00
version=0.10.28
2015-03-22 14:18:27 +01:00
revision=2
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"
maintainer="Duncan Overbruck <mail@duncano.de>"
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-03-22 14:10:32 +01:00
checksum=239db58f276493135f4c5a91644523876dea4e9df0201517dab5a25dd102239f
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
}