From d5a1ea06a9cefc2d4130523b0ebc46176297bbc3 Mon Sep 17 00:00:00 2001 From: Leonid Pliushch Date: Fri, 8 Oct 2021 18:54:32 +0300 Subject: [PATCH] move from unstable: restic-server --- packages/restic-server/build.sh | 23 +++++++++++++++++++++++ packages/restic-server/fix-tmpdir.patch | 12 ++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 packages/restic-server/build.sh create mode 100644 packages/restic-server/fix-tmpdir.patch diff --git a/packages/restic-server/build.sh b/packages/restic-server/build.sh new file mode 100644 index 000000000..abd97f90a --- /dev/null +++ b/packages/restic-server/build.sh @@ -0,0 +1,23 @@ +TERMUX_PKG_HOMEPAGE=https://restic.net/ +TERMUX_PKG_DESCRIPTION="Restic's REST backend API server" +TERMUX_PKG_LICENSE="BSD 2-Clause" +TERMUX_PKG_MAINTAINER="Leonid Pliushch " +TERMUX_PKG_VERSION=0.10.0 +TERMUX_PKG_REVISION=1 +TERMUX_PKG_SRCURL=https://github.com/restic/rest-server/archive/v${TERMUX_PKG_VERSION}.tar.gz +TERMUX_PKG_SHA256=d109cf9e9c3f36c9c8eb6d4a2bd530c5dfcd62b11687d93034e2edc0fdecf479 +TERMUX_PKG_BUILD_IN_SRC=true + +termux_step_make() { + termux_setup_golang + _GOARCH="${GOARCH}" + unset GOOS GOARCH + go run build.go \ + --enable-cgo \ + --goos android \ + --goarch "${_GOARCH}" +} + +termux_step_make_install() { + install -Dm755 rest-server "${TERMUX_PREFIX}/bin/rest-server" +} diff --git a/packages/restic-server/fix-tmpdir.patch b/packages/restic-server/fix-tmpdir.patch new file mode 100644 index 000000000..578076ca7 --- /dev/null +++ b/packages/restic-server/fix-tmpdir.patch @@ -0,0 +1,12 @@ +diff -uNr rest-server-0.9.8/cmd/rest-server/main.go rest-server-0.9.8.mod/cmd/rest-server/main.go +--- rest-server-0.9.8/cmd/rest-server/main.go 2018-06-15 00:53:29.000000000 +0300 ++++ rest-server-0.9.8.mod/cmd/rest-server/main.go 2020-02-18 14:56:01.369738081 +0200 +@@ -26,7 +26,7 @@ + } + + var server = restserver.Server{ +- Path: "/tmp/restic", ++ Path: "@TERMUX_PREFIX@/tmp/restic", + Listen: ":8000", + } +