diff options
author | 2022-06-27 12:16:27 +0800 | |
---|---|---|
committer | 2022-06-27 12:16:27 +0800 | |
commit | 4b0f2531668600b62d414e6c804f02587f125e7f (patch) | |
tree | c6d9a55dcd2eab85ba361990aeea60ceda3fba3d | |
parent | [app-admin/google-compute-engine] support python 3.11 (diff) | |
download | pigfoot-4b0f2531668600b62d414e6c804f02587f125e7f.tar.gz pigfoot-4b0f2531668600b62d414e6c804f02587f125e7f.tar.bz2 pigfoot-4b0f2531668600b62d414e6c804f02587f125e7f.zip |
[app-misc/dasel] new ebuild
Signed-off-by: Chen, Chih-Chia <pigfoot@gmail.com>
-rw-r--r-- | app-misc/dasel/Manifest | 1 | ||||
l--------- | app-misc/dasel/dasel-1.25.0.ebuild | 1 | ||||
-rw-r--r-- | app-misc/dasel/dasel-9999.ebuild | 59 |
3 files changed, 61 insertions, 0 deletions
diff --git a/app-misc/dasel/Manifest b/app-misc/dasel/Manifest new file mode 100644 index 0000000..1daf78d --- /dev/null +++ b/app-misc/dasel/Manifest @@ -0,0 +1 @@ +DIST dasel-1.25.0.tar.gz 3053827 BLAKE2B 2902cddbb2feb4ce3f4d643e26c4b1f82f3b25a2d6e016257767fefe499bc4e52cefa784723ae2c33ff68614501a10e0aea2a8b8f000de3748c3e7f4fb0ff28f SHA512 ec2b1d0ca0acd84dc9465b0f4aa27b054a0897efbcb4dd6a94cf6de73415933e44b857e8dbcb01d3bac266597d2dfe132146d282c168b087dcd77512e5f06e72 diff --git a/app-misc/dasel/dasel-1.25.0.ebuild b/app-misc/dasel/dasel-1.25.0.ebuild new file mode 120000 index 0000000..80da0cf --- /dev/null +++ b/app-misc/dasel/dasel-1.25.0.ebuild @@ -0,0 +1 @@ +dasel-9999.ebuild
\ No newline at end of file diff --git a/app-misc/dasel/dasel-9999.ebuild b/app-misc/dasel/dasel-9999.ebuild new file mode 100644 index 0000000..1dde16e --- /dev/null +++ b/app-misc/dasel/dasel-9999.ebuild @@ -0,0 +1,59 @@ +# Copyright 2019-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +EGO_PN="github.com/TomWright/${PN}" + +inherit go-module + +if [[ ${PV} == *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://${EGO_PN}.git" + EGO_VER="devel" + + src_unpack() { + git-r3_src_unpack + go-module_live_vendor + } +else + EGO_VER="v${PV}" + SRC_URI="https://${EGO_PN}/archive/${EGO_VER}.tar.gz -> ${P}.tar.gz" + inherit git-r3 + EGIT_REPO_URI="https://${EGO_PN}.git" + EGIT_COMMIT="${EGO_VER}" + + src_unpack() { + git-r3_src_unpack + go-module_live_vendor + } + + #S="${WORKDIR}/cli-${P}" + KEYWORDS="~amd64 ~x86 ~arm64 ~arm" +fi + +DESCRIPTION="Select, put and delete data from JSON, TOML, YAML, XML and CSV files with a single tool." +LICENSE="MIT" +SLOT="0/${PVR}" +RESTRICT="mirror" +IUSE="+pie" + +src_compile() { + # -buildmode=pie forces external linking mode, even CGO_ENABLED=0 + # https://github.com/golang/go/issues/18968 + use pie && local build_pie="-buildmode=pie" + + local build_flags="$( echo ${EGO_BUILD_FLAGS} ) $( echo ${build_pie} )" + local ld_flags="$( echo "-X 'github.com/tomwright/dasel/internal.Version=${PV}'" )" + + set -- env \ + CGO_ENABLED=0 \ + go build -o "bin/${PN}" -mod=vendor -v -work -x ${build_flags} -ldflags "${ld_flags}" \ + ./cmd/${PN} + echo "$@" + "$@" || die +} + +src_install() { + dobin bin/* +} |