40 lines
1 KiB
Text
40 lines
1 KiB
Text
# Template file for 'syncthing'
|
|
pkgname=syncthing
|
|
version=0.10.21
|
|
revision=1
|
|
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"
|
|
checksum=241cc0cd6b87040da8551a1d1964ef7201a9f4679b731d6740592063012b2846
|
|
|
|
do_build() {
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
arm*) goarch=arm;;
|
|
i686*) goarch=386;;
|
|
x86_64*) goarch=amd64;;
|
|
esac
|
|
|
|
export GOPATH="${PWD}/gopath"
|
|
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
|
|
}
|