Skip to content

Commit

Permalink
app-misc/jp: Initial import
Browse files Browse the repository at this point in the history
Package-Manager: Portage-3.0.19, Repoman-3.0.3
Signed-off-by: Zac Medico <[email protected]>
  • Loading branch information
zmedico committed Jun 12, 2021
1 parent 15ac2d2 commit a519452
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
1 change: 1 addition & 0 deletions app-misc/jp/Manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DIST jp-0.1.3.tar.gz 62719 BLAKE2B cb7783cc5e23c279237a12284e7be2e6af25477d89a087dc5b5717e3aece7325fd7f056310ed79dead578425177df96911df092ecf82e3e75c935db1137a0341 SHA512 bf7c5ad2889404145b2e5e9e3e30f7e136fc81b7026114801bdd8ea65b78609d91c20f35c4717aff1bfb9750cdf5a8d9f405177ac8716851cbf391ee8c7e1e04
38 changes: 38 additions & 0 deletions app-misc/jp/jp-0.1.3.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Copyright 2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7
inherit go-module

DESCRIPTION="Command line interface to JMESPath"
HOMEPAGE="https://github.com/jmespath/jp http://jmespath.org"
SRC_URI="https://github.com/jmespath/jp/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="Apache-2.0 MIT"
SLOT="0"
KEYWORDS="~amd64"
IUSE=""
RESTRICT+=" test"

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() {
go build -mod=readonly -o ./jp ./jp.go || die
}

src_install() {
dobin "./jp"
dodoc README.md
}
13 changes: 13 additions & 0 deletions app-misc/jp/metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>[email protected]</email>
<name>Zac Medico</name>
</maintainer>
<upstream>
<bugs-to>https://github.com/jmespath/jp/issues</bugs-to>
<changelog>https://github.com/jmespath/jp/commits/master</changelog>
<remote-id type="github">jmespath/jp</remote-id>
</upstream>
</pkgmetadata>

0 comments on commit a519452

Please sign in to comment.