blob: 2b71e504767192b73c40aa3e44de428c8d0a6d5a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# Copyright 2020-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit go-module systemd shell-completion
DESCRIPTION="One-stop ZFS backup & replication solution"
HOMEPAGE="https://zrepl.github.io/"
BDEPEND=">=dev-lang/go-1.12"
SRC_URI="https://github.com/zrepl/zrepl/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
SRC_URI+=" https://share.terinstock.com/${P}-deps.tar.xz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
src_compile() {
ego build -trimpath .
./zrepl gencompletion bash "${PN}.bash" || die
./zrepl gencompletion zsh "${PN}.zsh" || die
}
src_install() {
dobin zrepl
einstalldocs
newbashcomp "${PN}.bash" "${PN}"
newzshcomp "${PN}.zsh" "_${PN}"
sed -i -e 's:/usr/local/bin/zrepl:/usr/bin/zrepl:' dist/systemd/zrepl.service || die
systemd_dounit dist/systemd/zrepl.service
}
|