Commit | Line | Data |
---|---|---|
fb887a78 | 1 | TERMUX_PKG_HOMEPAGE=https://syncthing.net/ |
b2f02e74 | 2 | TERMUX_PKG_DESCRIPTION="Decentralized file synchronization" |
7e4a3c66 LP |
3 | TERMUX_PKG_VERSION=0.14.39 |
4 | TERMUX_PKG_SHA256=2ef169e75590032ef501789fdffb8142dd1d5e1f07df064a71e402bc47dbb91e | |
d6c26998 | 5 | TERMUX_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 |
7 | termux_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 |
b2f02e74 FF |
24 | unset GOOS GOARCH |
25 | ||
26 | # Now file structure is same as go get etc. | |
fb887a78 | 27 | go build build.go |
b2f02e74 FF |
28 | ./build -goos android \ |
29 | -goarch $GO_ARCH \ | |
30 | -no-upgrade \ | |
31 | -version v$TERMUX_PKG_VERSION \ | |
32 | build | |
fb887a78 | 33 | } |
fb887a78 | 34 | |
35 | termux_step_make_install() { | |
b2f02e74 | 36 | cp go/src/github.com/syncthing/syncthing/syncthing $TERMUX_PREFIX/bin/ |
e5a9fdd8 FF |
37 | |
38 | for section in 1 5 7; do | |
39 | local MANDIR=$PREFIX/share/man/man$section | |
40 | mkdir -p $MANDIR | |
41 | cp $TERMUX_PKG_SRCDIR/man/*.$section $MANDIR | |
42 | done | |
fb887a78 | 43 | } |