diff options
Diffstat (limited to 'sys-fs/zrepl/zrepl-0.6.1.ebuild')
-rw-r--r-- | sys-fs/zrepl/zrepl-0.6.1.ebuild | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/sys-fs/zrepl/zrepl-0.6.1.ebuild b/sys-fs/zrepl/zrepl-0.6.1.ebuild new file mode 100644 index 0000000..2b71e50 --- /dev/null +++ b/sys-fs/zrepl/zrepl-0.6.1.ebuild @@ -0,0 +1,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 +} |