2019-03-10 20:58:47 +01:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://restic.net/
|
|
|
|
TERMUX_PKG_DESCRIPTION="Fast, secure, efficient backup program"
|
|
|
|
TERMUX_PKG_LICENSE="BSD"
|
2019-05-16 18:54:59 +02:00
|
|
|
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>"
|
2019-05-02 00:31:32 +02:00
|
|
|
TERMUX_PKG_VERSION=0.9.5
|
2019-09-03 23:08:41 +02:00
|
|
|
TERMUX_PKG_REVISION=1
|
|
|
|
# Use a snapshot to fix building with go 1.13:
|
|
|
|
#TERMUX_PKG_SRCURL=https://github.com/restic/restic/archive/v$TERMUX_PKG_VERSION.tar.gz
|
|
|
|
TERMUX_PKG_SRCURL=https://github.com/restic/restic/archive/604b18aa7426148a55f76307ca729e829ff6b61d.zip
|
|
|
|
TERMUX_PKG_SHA256=e1d8c977c541d9503a6aba643cf10896f0de488a20db96f162a3e91a4e9def70
|
2019-03-10 20:58:47 +01:00
|
|
|
TERMUX_PKG_SUGGESTS="openssh, rclone"
|
|
|
|
|
|
|
|
termux_step_make() {
|
|
|
|
termux_setup_golang
|
|
|
|
|
2019-05-02 01:03:35 +02:00
|
|
|
export GOPATH=$TERMUX_PKG_BUILDDIR
|
|
|
|
mkdir -p "$GOPATH"/src/github.com/restic
|
2019-03-10 20:58:47 +01:00
|
|
|
|
2019-05-02 01:03:35 +02:00
|
|
|
ln -sf "$TERMUX_PKG_SRCDIR" "$GOPATH"/src/github.com/restic/restic
|
|
|
|
cd "$GOPATH"/src/github.com/restic/restic
|
|
|
|
|
|
|
|
(
|
|
|
|
# Separately building for host so we can generate manpages.
|
|
|
|
unset GOOS GOARCH CGO_LDFLAGS
|
|
|
|
unset CC CXX CFLAGS CXXFLAGS LDFLAGS
|
|
|
|
go build -ldflags "-X 'main.version=${TERMUX_PKG_VERSION}'" ./cmd/...
|
|
|
|
./restic generate --man doc/man
|
|
|
|
rm -f ./restic
|
|
|
|
)
|
|
|
|
|
|
|
|
go build -ldflags "-X 'main.version=${TERMUX_PKG_VERSION}'" ./cmd/...
|
2019-03-10 20:58:47 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
termux_step_make_install() {
|
2019-05-02 01:03:35 +02:00
|
|
|
cd "$GOPATH"/src/github.com/restic/restic
|
2019-03-10 20:58:47 +01:00
|
|
|
install -Dm700 restic "$TERMUX_PREFIX"/bin/restic
|
|
|
|
install -Dm600 -t "$TERMUX_PREFIX/share/man/man1/" doc/man/*.1
|
|
|
|
}
|