sys-fs/gocryptfs: Bump to 2.2.1

Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Nils Freydank <holgersson@posteo.de>
This commit is contained in:
Nils Freydank 2021-10-20 15:33:26 +02:00
parent 3e49ba995e
commit a1836fa274
Signed by: nfr
GPG Key ID: 0F1DEAB2D36AD112
2 changed files with 109 additions and 0 deletions

View File

@ -1 +1,2 @@
DIST gocryptfs-2.2.0.tar.gz 2829601 BLAKE2B 9e8e21322905aa55f4656feaa6c394dc7b104827ed9e4a1a766d8f31ac013aef3e82e75de19153e1b71f873c400a0162b204b602c80a0ab0fa356c2a522220b6 SHA512 19d7c64119123d563c46c1dc065093bfae464d48160d66ca220aed831293d713984d242fcbfeb7f1740b1e6fd5fdd7a21a9a828b33d892a012fae4df1903f0ff
DIST gocryptfs-2.2.1.tar.gz 2831327 BLAKE2B e785298d15b9083c502969e7a9696274a2accc227f84b8f4a7333a5683ec2a294b5d38375a221e1f8417cd1b71a721db9f0dae72954d11409e9f6dfbbc39d942 SHA512 b8aeb34fd7c16d1f0b1a53abf5ea26df0729fc1f8342e8e27a4ba63ed9da6726c6327e6397c7c0bca519d1a3f1f1ec74fe4b85bda50cfc64ae9b732f45507665

View File

@ -0,0 +1,108 @@
# Copyright 2019-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Note: For distfiles verification see https://nuetzlich.net/gocryptfs/releases.
EAPI="8"
EGO_PN="github.com/rfjakob/${PN}"
inherit go-module
MY_PV="${PV/_/-}"
EGO_SUM=( )
go-module_set_globals
DESCRIPTION="Encrypted overlay filesystem written in Go"
HOMEPAGE="https://nuetzlich.net/gocryptfs/ https://github.com/rfjakob/gocryptfs/releases"
if [[ "${PV}" = 9999* ]]; then
EGIT_REPO_URI="https://${EGO_PN}"
inherit git-r3
else
SRC_URI="
https://${EGO_PN}/releases/download/v${MY_PV}/${PN}_v${MY_PV}_src-deps.tar.gz -> ${P}.tar.gz
${EGO_SUM_SRC_URI}
"
fi
# in detail:
# BSD vendor/golang.org/x/sys/LICENSE
# BSD vendor/golang.org/x/crypto/LICENSE
# BSD vendor/github.com/hanwen/go-fuse/v2/LICENSE
# Apache-2.0 vendor/github.com/jacobsa/crypto/LICENSE
# BSD-2 vendor/github.com/pkg/xattr/LICENSE
# MIT vendor/github.com/rfjakob/eme/LICENSE
# MIT vendor/github.com/sabhiram/go-gitignore/LICENSE
LICENSE="Apache-2.0 BSD BSD-2 MIT"
SLOT="0"
KEYWORDS="~amd64"
IUSE="debug +man pie +ssl"
# Some tests need and ext4, some need libsandbox.so preloaded.
RESTRICT="test"
BDEPEND="man? ( dev-go/go-md2man )"
RDEPEND="
sys-fs/fuse
ssl? ( dev-libs/openssl:0= )
"
S="${WORKDIR}/${PN}_v${MY_PV}_src-deps"
# We omit debug symbols which looks like pre-stripping to portage.
QA_PRESTRIPPED="
/usr/bin/gocryptfs-atomicrename
/usr/bin/gocryptfs-findholes
/usr/bin/gocryptfs-statfs
/usr/bin/gocryptfs-xray
/usr/bin/gocryptfs
"
src_compile() {
export GOPATH="${G}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
local myldflags=(
"$(usex !debug '-s -w' '')"
-X "main.GitVersion=v${PV}"
-X "'main.GitVersionFuse=[vendored]'"
-X "main.BuildDate=$(date -u '+%Y-%m-%d')"
)
local mygoargs=(
-v -work -x
"-buildmode=$(usex pie pie exe)"
"-asmflags=all=-trimpath=${S}"
"-gcflags=all=-trimpath=${S}"
-ldflags "${myldflags[*]}"
-tags "$(usex !ssl 'without_openssl' 'none')"
)
go build "${mygoargs[@]}" || die
# loop over all helper tools
for dir in gocryptfs-xray contrib/statfs contrib/findholes contrib/atomicrename; do
cd "${S}/${dir}" || die
go build "${mygoargs[@]}" || die
done
cd "${S}"
if use man; then
go-md2man -in Documentation/MANPAGE.md -out gocryptfs.1 || die
go-md2man -in Documentation/MANPAGE-STATFS.md -out gocryptfs-statfs.2 || die
go-md2man -in Documentation/MANPAGE-XRAY.md -out gocryptfs-xray.1 || die
fi
}
src_install() {
dobin gocryptfs
dobin gocryptfs-xray/gocryptfs-xray
newbin contrib/statfs/statfs "${PN}-statfs"
newbin contrib/findholes/findholes "${PN}-findholes"
newbin contrib/atomicrename/atomicrename "${PN}-atomicrename"
if use man; then
doman gocryptfs.1
doman gocryptfs-xray.1
doman gocryptfs-statfs.2
fi
}