app-misc/zk: Add new packages, version 0.14.0

Signed-off-by: Nils Freydank <nils.freydank@posteo.de>
This commit is contained in:
Nils Freydank 2024-04-20 16:22:02 +02:00
parent 43f4cdb6c5
commit e323a72f6d
Signed by: nfr
GPG Key ID: 0F1DEAB2D36AD112
3 changed files with 115 additions and 0 deletions

2
app-misc/zk/Manifest Normal file
View File

@ -0,0 +1,2 @@
DIST zk-0.14.0-deps.tar.xz 25410696 BLAKE2B cca331c4b7b1b46ba890bda17334ad03097bbf9959201b320ea46f7c2de7abf18b79607603af41f824a4496ad22442b5d80c075a95974763a7e679ea195c0d12 SHA512 bf503640d0006fe81db2238b3a66f93473c4570bd99755da78c5d206a9bbea56eaca55eaa98fa4fedcd711654b2e6807a4d7567b944cec71fd883a46ee587693
DIST zk-0.14.0.tar.gz 630694 BLAKE2B 67b51d67851bcac67125c83b01d4ec10d588f86fc1922b89613de39024f5ebba309207b1979f361a1f27ba41525f0ee454085d72a71143097fe9cc04b20f2f27 SHA512 79cd7895226e1a32c3fdd4f6bb50a6571f45dc67fda764a1c7a1541798658de732885aa5323dccc950188465196b2217384d1c43012eb8b7572d0fc14fcac809

11
app-misc/zk/metadata.xml Normal file
View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>nils.freydank@posteo.de</email>
<name>Nils Freydank</name>
</maintainer>
<upstream>
<remote-id type="github">zk-org/zk</remote-id>
</upstream>
</pkgmetadata>

View File

@ -0,0 +1,102 @@
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="8"
EGO_PN="github.com/zk-org/zk"
inherit go-module
COMMIT_ID="b71a74eabcfc97df7b31e51edfb8e1b749061a76"
DESCRIPTION="A plain text note-taking assistant"
HOMEPAGE="https://github.com/zk-org/zk"
if [[ ${PV} == *_p* ]]; then
SRC_URI="https://${EGO_PN}/archive/${COMMIT_ID}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN}-${COMMIT_ID}"
else
SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
fi
# Add the manually vendored tarball.
# 1) Create a tar archive optimized to reproduced by other users or devs.
# 2) Compress the archive using XZ limiting decompression memory for
# pretty constraint systems.
# Use something like:
# GOMODCACHE="${PWD}"/go-mod go mod download -modcacherw
# tar cf $P-deps.tar go-mod \
# --mtime="1970-01-01" --sort=name --owner=portage --group=portage
# xz -k -9eT0 --memlimit-decompress=4096M $P-deps.tar
SRC_URI+=" https://files.holgersson.xyz/gentoo/distfiles/golang-pkg-deps/${P}-deps.tar.xz"
# As deps are linked into the resulting binary the licenses of all(sic!) deps
# must be listed here. Check licenses e.g. with dev-go/lichen:
# `lichen <path to binary> | cut -f2 -d: | cut -f1 -d'(' | sort -u`
LICENSE="
Apache-2.0
BSD
BSD-2
GPL-3
MIT
MPL-2.0
"
SLOT="0"
KEYWORDS="~amd64"
IUSE=""
DEPEND=""
RDEPEND="${DEPEND}"
BDEPEND="${DEPEND}"
DOCS=(
docs/automation.md
docs/config-alias.md
docs/config-extra.md
docs/config-filter.md
docs/config-group.md
docs/config-lsp.md
docs/config.md
docs/config-notebook.md
docs/config-note.md
docs/daily-journal.md
docs/editors-integration.md
docs/external-call.md
docs/external-processing.md
docs/future-proof.md
docs/getting-started.md
docs/neuron.md
docs/notebook-housekeeping.md
docs/notebook.md
docs/note-creation.md
docs/note-filtering.md
docs/note-format.md
docs/note-frontmatter.md
docs/note-id.md
docs/style.md
docs/tags.md
docs/template-creation.md
docs/template-format.md
docs/template.md
docs/tool-editor.md
docs/tool-fzf.md
docs/tool-pager.md
docs/tool-shell.md
)
src_compile() {
# Flags -w, -s: Omit debugging information to reduce binary size,
# see https://golang.org/cmd/link/.
local mygobuildargs=(
-ldflags="-X ${EGO_PN}/config.GitCommit=${GIT_COMMIT} -s -w"
-mod mod -v -work -x
-tags "fts5"
)
ego build "${mygobuildargs[@]}" .
}
src_install() {
dobin "${PN}"
einstalldocs
}
src_test() {
ego test -v -race -tags "fts5" ./...
}