summaryrefslogtreecommitdiff
path: root/net-misc/gokrazy-rsync/gokrazy-rsync-0.3.3.ebuild
blob: def92c9f550df5d51ac24e356ed84af89c6716ee (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
34
35
36
37
38
39
40
41
42
43
# Copyright 2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit go-module systemd

DESCRIPTION="rsync in Go!"
HOMEPAGE="https://github.com/gokrazy/rsync"
SRC_URI="
	https://github.com/gokrazy/rsync/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz
	https://github.com/gentoo-golang-dist/rsync/releases/download/v${PV}/${P/gokrazy-}-vendor.tar.xz
"
S="${WORKDIR}"/${P/gokrazy-}

LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64"

BDEPEND=">=dev-lang/go-1.25.0"

PATCHES=(
	"${FILESDIR}"/${P}-landlock.patch
)

src_configure() {
	export GOBIN="${WORKDIR}"/bin
	mkdir "${GOBIN}" || die
}

src_test() {
	# TestMapFS, TestMapFSLargeFile fail to lchownat w/ EPERM
	ego test -fullpath ./... -skip TestMapFS
}

src_install() {
	einstalldocs

	dobin "${GOBIN}"/gokr-rsync{,d}

	systemd_dounit systemd/gokr-rsyncd.service
	systemd_dounit systemd/gokr-rsyncd.socket
}