Merge pull request #781 from Duncaen/syncthing
syncthing: fix arm build
This commit is contained in:
commit
d5e3c42b4c
1 changed files with 12 additions and 7 deletions
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'syncthing'
|
||||
pkgname=syncthing
|
||||
version=0.10.13
|
||||
revision=1
|
||||
revision=2
|
||||
hostmakedepends="go>=1.3"
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
hostmakedepends+=" go-cross-linux"
|
||||
|
@ -15,21 +15,26 @@ checksum=19d0d72eac7af99714c047677d892559a8d4c96c73ef5ba50a48cec44a03def2
|
|||
|
||||
do_build() {
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
armv6*) export GOARCH=arm; export GOARM=6;;
|
||||
armv7*) export GOARCH=arm; export GOARM=7;;
|
||||
i686*) export GOARCH=386;;
|
||||
x86_64*) export GOARCH=amd64;;
|
||||
armv6*) goarch=armv6;;
|
||||
armv7*) goarch=armv7;;
|
||||
i686*) goarch=386;;
|
||||
x86_64*) goarch=amd64;;
|
||||
esac
|
||||
|
||||
export GOPATH="${PWD}/gopath"
|
||||
mkdir -p $GOPATH/src/github.com/syncthing
|
||||
ln -s $PWD $GOPATH/src/github.com/syncthing/${pkgname}
|
||||
|
||||
go run build.go -no-upgrade
|
||||
mkdir tmp
|
||||
TMPDIR=${PWD}/tmp/ go run build.go -goos linux -goarch ${goarch} -no-upgrade
|
||||
rm -rf tmp
|
||||
}
|
||||
|
||||
do_install() {
|
||||
vbin bin/syncthing
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
armv6*|armv7*) vbin bin/linux_arm/syncthing;;
|
||||
x86_64*|i686*) vbin bin/syncthing;;
|
||||
esac
|
||||
vlicense LICENSE
|
||||
vdoc README.md
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue