summaryrefslogtreecommitdiff
blob: 1097ebdaab4d4e4cfeffe3e56cbb54f0faa04085 (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
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8
inherit go-module

DESCRIPTION="Encrypted overlay filesystem written in Go"
HOMEPAGE="https://github.com/rfjakob/gocryptfs"
SRC_URI="https://github.com/rfjakob/gocryptfs/releases/download/v${PV}/${PN}_v${PV}_src-deps.tar.gz"
S=${WORKDIR}/${PN}_v${PV}_src-deps
LICENSE="MIT"
LICENSE+=" Apache-2.0 BSD BSD-2"
SLOT="0"
KEYWORDS="~amd64"
BDEPEND="virtual/pandoc"
PROPERTIES="test_privileged"
RESTRICT="test"

src_prepare() {
	default
	sed -e 's:ldd gocryptfs 2> /dev/null:! ldd gocryptfs | grep -q "statically linked":' \
		-i "${S}/build-without-openssl.bash" || die
}

src_compile() {
	emake build
}

src_install() {
	emake "DESTDIR=${ED}" install
	dobin contrib/statfs/statfs
	doman Documentation/*.1
	dodoc -r README.md Documentation
	rm -f "${ED}"/usr/share/doc/${PF}/Documentation/{.gitignore,gocryptfs.1,gocryptfs-xray.1,statfs.1,MANPAGE-render.bash} || die
}

src_test() {
	emake test
}