diff options
Diffstat (limited to 'app-misc/jp')
-rw-r--r-- | app-misc/jp/Manifest | 3 | ||||
-rw-r--r-- | app-misc/jp/jp-0.1.3.1.ebuild | 50 | ||||
-rw-r--r-- | app-misc/jp/metadata.xml | 21 |
3 files changed, 74 insertions, 0 deletions
diff --git a/app-misc/jp/Manifest b/app-misc/jp/Manifest new file mode 100644 index 000000000000..210db603517a --- /dev/null +++ b/app-misc/jp/Manifest @@ -0,0 +1,3 @@ +DIST jpp-0.1.3.1.tar.gz 64129 BLAKE2B a3663ee0a6b212a455dbe4c01f83fb450a5d17ff8f2173becc970133ed9a29b102280fbeb13730eebe69ebf481703e382df8456d030abbff695a5cc72a0faa36 SHA512 65844497d988645717363f812c14886e1a5befa925085527029145c4b5c7a3466c193bb6a8f1bc47c66e5cd616ae87eee25077278a48abcc4980dda08d3fc6bb +EBUILD jp-0.1.3.1.ebuild 1065 BLAKE2B fbc9397857d5d246718e1aa11217292085fb5ca567302d61e82698be78d9f0343b88b68a79b3608e1fc3dad9304d36d2a93fced804f6f36dad4026579abdb290 SHA512 1119475f842618786c14caaa8472010aa9ddcac24ed41ad2ac801c392a7d56d82bcd3bad0418e36a05c7c50a28af73d9ab8d36673ca28f03c76dfb4a240132fc +MISC metadata.xml 652 BLAKE2B 1dc0df17ce3314f8fef04cad1d8490c5a272964d71bd3328174813afe5e6d68907b98fe95f754947be493f89b0d2f4cc843d5509b26c0cd35924b4eaa8792bcc SHA512 8d543eef7131091cc8064c5371af307674719abd9cfb507cf68b908714a21ea600532fcc1726773f1af83a1549342fb29a1d075bebcfdd0f44274fad9fe4747d diff --git a/app-misc/jp/jp-0.1.3.1.ebuild b/app-misc/jp/jp-0.1.3.1.ebuild new file mode 100644 index 000000000000..2d61bd19fce0 --- /dev/null +++ b/app-misc/jp/jp-0.1.3.1.ebuild @@ -0,0 +1,50 @@ +# Copyright 2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit go-module + +MY_PN=jpp +MY_P=${MY_PN}-${PV} + +DESCRIPTION="Command line interface to JMESPath" +HOMEPAGE="https://github.com/pipebus/jpp https://github.com/jmespath/jp http://jmespath.org" +SRC_URI="https://github.com/pipebus/jpp/archive/refs/tags/v${PV}.tar.gz -> ${MY_P}.tar.gz" + +LICENSE="Apache-2.0 MIT" +SLOT="0" +KEYWORDS="~amd64" +IUSE="+jp +jpp" +RESTRICT+=" test" +REQUIRED_USE="|| ( jp jpp )" + +S=${WORKDIR}/${MY_P} + +src_prepare() { + if [[ -e $S/go.mod ]]; then + die "found unexpected $S/go.mod" + fi + cat <<-EOF > "$S/go.mod" + module github.com/jmespath/jp + replace github.com/jmespath/jp => ./ + EOF + + sed -e 's|except Exception, e|except Exception as e|' -i test/jp-compliance || die + + default +} + +src_compile() { + if use jp; then + go build -mod=readonly -o ./jp ./jp.go || die + fi + if use jpp; then + go build -mod=readonly -o ./jpp ./cmd/jpp/main.go || die + fi +} + +src_install() { + use jp && dobin "./jp" + use jpp && dobin "./jpp" + dodoc README.md +} diff --git a/app-misc/jp/metadata.xml b/app-misc/jp/metadata.xml new file mode 100644 index 000000000000..8a0623114292 --- /dev/null +++ b/app-misc/jp/metadata.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>zmedico@gentoo.org</email> + <name>Zac Medico</name> + </maintainer> + <upstream> + <bugs-to>https://github.com/pipebus/jpp/issues</bugs-to> + <changelog>https://github.com/pipebus/jpp/commits/master</changelog> + <remote-id type="github">pipebus/jpp</remote-id> + </upstream> + <use> + <flag name="jp"> + Install jp which is the official jp CLI for JMESPath + </flag> + <flag name="jpp"> + Install jpp which is an extended superset of the jp CLI for JMESPath + </flag> + </use> +</pkgmetadata> |