From c68c16310b7fd7c6947eddabae797d224c45fbf9 Mon Sep 17 00:00:00 2001 From: Leonid Pliushch Date: Sun, 10 Mar 2019 21:58:47 +0200 Subject: [PATCH] new package: restic Previously, it was available only in unstable-packages, but since this utility is really stable and useful, it is better to have it in main repository. Also, this will be a test for automatic package deploy. --- packages/restic/build.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 packages/restic/build.sh diff --git a/packages/restic/build.sh b/packages/restic/build.sh new file mode 100644 index 000000000..4611fe852 --- /dev/null +++ b/packages/restic/build.sh @@ -0,0 +1,28 @@ +TERMUX_PKG_HOMEPAGE=https://restic.net/ +TERMUX_PKG_DESCRIPTION="Fast, secure, efficient backup program" +TERMUX_PKG_LICENSE="BSD" +TERMUX_PKG_MAINTAINER="Leonid Plyushch @xeffyr" +TERMUX_PKG_VERSION=0.9.4 +TERMUX_PKG_REVISION=2 +TERMUX_PKG_SRCURL=https://github.com/restic/restic/archive/v$TERMUX_PKG_VERSION.tar.gz +TERMUX_PKG_SHA256=c7dca90fb6fd83cee8b9f6a2776f5839794341af1953d251bf06a91870be7a8e +TERMUX_PKG_SUGGESTS="openssh, rclone" +TERMUX_PKG_BUILD_IN_SRC=true + +termux_step_make() { + termux_setup_golang + _GOARCH=${GOARCH} + unset GOOS GOARCH + + ## build for host and regenerate manpages + go run build.go --goos linux --goarch "amd64" + ./restic generate --man doc/man && rm -f ./restic + + ## finally build for target + go run build.go --enable-cgo --goos android --goarch "${_GOARCH}" +} + +termux_step_make_install() { + install -Dm700 restic "$TERMUX_PREFIX"/bin/restic + install -Dm600 -t "$TERMUX_PREFIX/share/man/man1/" doc/man/*.1 +}