2014-12-26 17:21:09 +01:00
|
|
|
# Template file for 'syncthing'
|
|
|
|
pkgname=syncthing
|
2015-02-09 23:38:11 +01:00
|
|
|
version=0.10.22
|
2014-12-29 15:35:14 +01:00
|
|
|
revision=1
|
2014-12-26 17:21:09 +01: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"
|
2015-02-09 23:38:11 +01:00
|
|
|
checksum=6631f0b172df66b656c93cf5455e3c43cddeeb394e59e0c56223fe405316b0d9
|
2014-12-26 17:21:09 +01:00
|
|
|
|
|
|
|
do_build() {
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
2015-01-12 09:04:38 +01:00
|
|
|
arm*) goarch=arm;;
|
2014-12-26 19:56:42 +01:00
|
|
|
i686*) goarch=386;;
|
|
|
|
x86_64*) goarch=amd64;;
|
2014-12-26 17:21:09 +01:00
|
|
|
esac
|
2014-12-26 18:45:15 +01:00
|
|
|
|
|
|
|
export GOPATH="${PWD}/gopath"
|
2014-12-28 18:07:05 +01:00
|
|
|
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
|
2014-12-28 18:07:05 +01:00
|
|
|
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
|
2015-01-12 09:04:38 +01:00
|
|
|
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
|
|
|
}
|