2017-04-11 21:35:34 +02:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://syncthing.net/
|
2017-04-11 22:22:54 +02:00
|
|
|
TERMUX_PKG_DESCRIPTION="Decentralized file synchronization"
|
2017-06-14 13:50:33 +02:00
|
|
|
TERMUX_PKG_VERSION=0.14.30
|
2017-05-17 22:58:45 +02:00
|
|
|
TERMUX_PKG_SRCURL=https://github.com/syncthing/syncthing/releases/download/v${TERMUX_PKG_VERSION}/syncthing-source-v${TERMUX_PKG_VERSION}.tar.gz
|
2017-06-14 13:50:33 +02:00
|
|
|
TERMUX_PKG_SHA256=cc1ad821f184eeeb183b6dff0736f54ed5e3e4310f75d8d83d1ff6f460f7ca9f
|
2017-05-17 22:58:45 +02:00
|
|
|
TERMUX_PKG_FOLDERNAME=syncthing
|
2017-04-11 21:35:34 +02:00
|
|
|
|
2017-04-11 22:22:54 +02:00
|
|
|
termux_step_make(){
|
|
|
|
termux_setup_golang
|
2017-04-11 21:35:34 +02:00
|
|
|
|
2017-04-11 22:22:54 +02:00
|
|
|
# The build.sh script doesn't with our compiler
|
|
|
|
# so small adjustments to file locations are needed
|
|
|
|
# so the build.go is fine.
|
2017-04-11 21:35:34 +02:00
|
|
|
mkdir -p go/src/github.com/syncthing/syncthing
|
|
|
|
cp $TERMUX_PKG_SRCDIR/vendor/* ./go/src/ -r
|
|
|
|
cp $TERMUX_PKG_SRCDIR/* go/src/github.com/syncthing/syncthing -r
|
|
|
|
|
2017-04-11 22:22:54 +02:00
|
|
|
# Set gopath so dependencies are built as in go get etc.
|
2017-04-11 21:35:34 +02:00
|
|
|
export GOPATH=$(pwd)/go
|
2017-04-11 22:22:54 +02:00
|
|
|
|
2017-04-11 21:35:34 +02:00
|
|
|
cd go/src/github.com/syncthing/syncthing
|
2017-04-11 22:22:54 +02:00
|
|
|
|
|
|
|
# Unset GOARCH so building build.go is works.
|
2017-04-11 21:35:34 +02:00
|
|
|
export GO_ARCH=$GOARCH
|
2017-04-11 22:22:54 +02:00
|
|
|
unset GOOS GOARCH
|
|
|
|
|
|
|
|
# Now file structure is same as go get etc.
|
2017-04-11 21:35:34 +02:00
|
|
|
go build build.go
|
2017-04-11 22:22:54 +02:00
|
|
|
./build -goos android \
|
|
|
|
-goarch $GO_ARCH \
|
|
|
|
-no-upgrade \
|
|
|
|
-version v$TERMUX_PKG_VERSION \
|
|
|
|
build
|
2017-04-11 21:35:34 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
termux_step_make_install() {
|
2017-04-11 22:22:54 +02:00
|
|
|
cp go/src/github.com/syncthing/syncthing/syncthing $TERMUX_PREFIX/bin/
|
2017-04-11 22:26:35 +02:00
|
|
|
|
|
|
|
for section in 1 5 7; do
|
|
|
|
local MANDIR=$PREFIX/share/man/man$section
|
|
|
|
mkdir -p $MANDIR
|
|
|
|
cp $TERMUX_PKG_SRCDIR/man/*.$section $MANDIR
|
|
|
|
done
|
2017-04-11 21:35:34 +02:00
|
|
|
}
|