From e323a72f6da9049109b2fd18cd79313338584f0f Mon Sep 17 00:00:00 2001 From: Nils Freydank Date: Sat, 20 Apr 2024 16:22:02 +0200 Subject: [PATCH] app-misc/zk: Add new packages, version 0.14.0 Signed-off-by: Nils Freydank --- app-misc/zk/Manifest | 2 + app-misc/zk/metadata.xml | 11 ++++ app-misc/zk/zk-0.14.0.ebuild | 102 +++++++++++++++++++++++++++++++++++ 3 files changed, 115 insertions(+) create mode 100644 app-misc/zk/Manifest create mode 100644 app-misc/zk/metadata.xml create mode 100644 app-misc/zk/zk-0.14.0.ebuild diff --git a/app-misc/zk/Manifest b/app-misc/zk/Manifest new file mode 100644 index 0000000..bdb560f --- /dev/null +++ b/app-misc/zk/Manifest @@ -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 diff --git a/app-misc/zk/metadata.xml b/app-misc/zk/metadata.xml new file mode 100644 index 0000000..9439277 --- /dev/null +++ b/app-misc/zk/metadata.xml @@ -0,0 +1,11 @@ + + + + + nils.freydank@posteo.de + Nils Freydank + + + zk-org/zk + + diff --git a/app-misc/zk/zk-0.14.0.ebuild b/app-misc/zk/zk-0.14.0.ebuild new file mode 100644 index 0000000..aa71da7 --- /dev/null +++ b/app-misc/zk/zk-0.14.0.ebuild @@ -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 | 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" ./... +}