app-backup/restic: x86 stable (bug #706454)
[gentoo.git] / app-backup / consul-backinator / consul-backinator-1.6.5.ebuild
1 # Copyright 2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 EGO_PN=github.com/myENA/consul-backinator
6 RESTRICT="strip"
7
8 DESCRIPTION="consul backup and restore utility"
9 HOMEPAGE="https://github.com/myENA/consul-backinator"
10 SRC_URI="https://github.com/myENA/consul-backinator/archive/v${PV}.tar.gz -> ${P}.tar.gz
11         https://dev.gentoo.org/~williamh/dist/${P}-vendor.tar.gz"
12
13 LICENSE="MPL-2.0"
14 SLOT="0"
15 KEYWORDS="~amd64"
16
17 DEPEND="dev-lang/go:="
18
19 src_prepare() {
20         default
21         mv ../vendor .
22         echo module ${EGO_PN} > go.mod || die "Unable to create go.mod"
23 }
24
25 src_compile() {
26         CGO_ENABLED=0 go build -mod vendor -o "${PN}" -v -x \
27                 -ldflags="-X main.appVersion=${PV} -s -w" || die
28 }
29
30 src_install() {
31         dobin ${PN}
32         dodoc *.md
33 }