syncthing: Update from 0.14.45 to 0.14.47
[termux-packages] / packages / syncthing / build.sh
CommitLineData
fb887a78 1TERMUX_PKG_HOMEPAGE=https://syncthing.net/
b2f02e74 2TERMUX_PKG_DESCRIPTION="Decentralized file synchronization"
883e3434
FF
3TERMUX_PKG_VERSION=0.14.47
4TERMUX_PKG_SHA256=92b3535ca3ea7b27c5b2ec771088865cd6e91d811a0816be39a6283a3067e6f3
d6c26998 5TERMUX_PKG_SRCURL=https://github.com/syncthing/syncthing/releases/download/v${TERMUX_PKG_VERSION}/syncthing-source-v${TERMUX_PKG_VERSION}.tar.gz
fb887a78 6
b2f02e74
FF
7termux_step_make(){
8 termux_setup_golang
fb887a78 9
b2f02e74
FF
10 # The build.sh script doesn't with our compiler
11 # so small adjustments to file locations are needed
12 # so the build.go is fine.
fb887a78 13 mkdir -p go/src/github.com/syncthing/syncthing
14 cp $TERMUX_PKG_SRCDIR/vendor/* ./go/src/ -r
15 cp $TERMUX_PKG_SRCDIR/* go/src/github.com/syncthing/syncthing -r
16
b2f02e74 17 # Set gopath so dependencies are built as in go get etc.
fb887a78 18 export GOPATH=$(pwd)/go
b2f02e74 19
fb887a78 20 cd go/src/github.com/syncthing/syncthing
b2f02e74
FF
21
22 # Unset GOARCH so building build.go is works.
fb887a78 23 export GO_ARCH=$GOARCH
7fab8e0d 24 export _CC=$CC
25 unset GOOS GOARCH CC
26
b2f02e74 27 # Now file structure is same as go get etc.
fb887a78 28 go build build.go
7fab8e0d 29 export CC=$_CC
b2f02e74
FF
30 ./build -goos android \
31 -goarch $GO_ARCH \
32 -no-upgrade \
33 -version v$TERMUX_PKG_VERSION \
34 build
fb887a78 35}
fb887a78 36
37termux_step_make_install() {
b2f02e74 38 cp go/src/github.com/syncthing/syncthing/syncthing $TERMUX_PREFIX/bin/
e5a9fdd8
FF
39
40 for section in 1 5 7; do
41 local MANDIR=$PREFIX/share/man/man$section
42 mkdir -p $MANDIR
43 cp $TERMUX_PKG_SRCDIR/man/*.$section $MANDIR
44 done
fb887a78 45}