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