summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Roman <davidroman96@gmail.com>2018-08-07 12:42:52 +0200
committerMichał Górny <mgorny@gentoo.org>2018-08-15 12:41:52 +0200
commitf5d40dd50655a82f8f7d9637e8fefdb52e2d401d (patch)
tree6f01dcae08a8520e83598a1080c0e92f047a28e0 /app-backup/restic/restic-0.9.2.ebuild
parentsci-geosciences/qgis: Fix build with USE=-webkit (diff)
downloadgentoo-f5d40dd50655a82f8f7d9637e8fefdb52e2d401d.tar.gz
gentoo-f5d40dd50655a82f8f7d9637e8fefdb52e2d401d.tar.bz2
gentoo-f5d40dd50655a82f8f7d9637e8fefdb52e2d401d.zip
app-backup/restic: verbump to 0.9.2
Diffstat (limited to 'app-backup/restic/restic-0.9.2.ebuild')
-rw-r--r--app-backup/restic/restic-0.9.2.ebuild54
1 files changed, 54 insertions, 0 deletions
diff --git a/app-backup/restic/restic-0.9.2.ebuild b/app-backup/restic/restic-0.9.2.ebuild
new file mode 100644
index 000000000000..89515ce18d02
--- /dev/null
+++ b/app-backup/restic/restic-0.9.2.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit bash-completion-r1 golang-vcs-snapshot
+
+DESCRIPTION="A backup program that is fast, efficient and secure"
+HOMEPAGE="https://restic.github.io/"
+SRC_URI="https://github.com/restic/restic/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+EGO_PN="github.com/restic/restic"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="test"
+
+RDEPEND="sys-fs/fuse:0"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${P}/src/${EGO_PN}"
+
+src_compile() {
+ local mygoargs=(
+ -v
+ -work
+ -x
+ -tags release
+ -ldflags "-X main.version=${PV}"
+ -asmflags "-trimpath=${S}"
+ -gcflags "-trimpath=${S}"
+ -o restic ${EGO_PN}/cmd/restic
+ )
+
+ GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" \
+ go build "${mygoargs[@]}" || die
+}
+
+src_test() {
+ GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" \
+ go test -timeout 30m -v -work -x ${EGO_PN}/cmd/... ${EGO_PN}/internal/... || die
+}
+
+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
+}