void-packages/srcpkgs/syncthing/template

34 lines
909 B
Bash
Raw Normal View History

2014-12-26 17:21:09 +01:00
# Template file for 'syncthing'
pkgname=syncthing
2015-04-26 16:03:31 +02:00
version=0.11.1
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"
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-04-26 16:03:31 +02:00
checksum=acd644ee8d1ba2568e901ce1dfc0973efb695d185868675e12d472a783c31825
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
}