holgersson-overlay/app-backup/restic/restic-0.15.1.ebuild
Nils Freydank fd53fda906
app-backup/restic: Import package, bump to 0.15.1
This ebuild is imported from the main gentoo tree and bumped to 0.15.x.

Signed-off-by: Nils Freydank <nils.freydank@posteo.de>
2023-02-13 22:20:50 +01:00

50 lines
1.1 KiB
Bash

# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="8"
inherit bash-completion-r1 go-module
DESCRIPTION="A backup program that is fast, efficient and secure"
HOMEPAGE="
https://restic.net
https://github.com/restic/restic
"
SRC_URI="https://github.com/restic/restic/archive/v${PV}.tar.gz -> ${P}.tar.gz"
#SRC_URI+=" https://dev.gentoo.org/~williamh/dist/${P}-deps.tar.xz"
SRC_URI+=" https://files.holgersson.xyz/gentoo/distfiles/${P}-deps.tar.xz"
LICENSE="Apache-2.0 BSD BSD-2 LGPL-3-with-linking-exception MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
RDEPEND="sys-fs/fuse:0"
DEPEND="${RDEPEND}"
src_compile() {
local mygoargs=(
-tags release
-ldflags "-X main.version=${PV} -s -w"
-asmflags "-trimpath=${S}"
-gcflags "-trimpath=${S}"
)
ego build "${mygoargs[@]}" -o restic ./cmd/restic
}
src_test() {
ego test -timeout 30m ./cmd/... ./internal/...
}
src_install() {
dobin restic
newbashcomp doc/bash-completion.sh "${PN}"
insinto /usr/share/zsh/site-functions
newins doc/zsh-completion.zsh _restic
doman doc/man/*
dodoc doc/*.rst
}