commit:     8b8c5e87e1c1c29a28bf9a51f1c86ab1d3a1a3b8
Author:     Alexey Zapparov <alexey <AT> zapparov <DOT> com>
AuthorDate: Tue Sep 17 15:43:18 2024 +0000
Commit:     Alexey Zapparov <alexey <AT> zapparov <DOT> com>
CommitDate: Tue Sep 17 16:18:01 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=8b8c5e87

app-containers/slim: new package, add 1.40.11

Signed-off-by: Alexey Zapparov <alexey <AT> zapparov.com>

 app-containers/slim/Manifest            |  2 ++
 app-containers/slim/metadata.xml        | 11 ++++++++
 app-containers/slim/slim-1.40.11.ebuild | 47 +++++++++++++++++++++++++++++++++
 3 files changed, 60 insertions(+)

diff --git a/app-containers/slim/Manifest b/app-containers/slim/Manifest
new file mode 100644
index 000000000..d01769f0c
--- /dev/null
+++ b/app-containers/slim/Manifest
@@ -0,0 +1,2 @@
+DIST slim-1.40.11-vendor.tar.xz 5363516 BLAKE2B 
1250a0ed43c5f30dec4d1113988ee5455375208a06dd9461aa1520e0496aca6a908df352a322a648bf9bca92ff4b8cc39cc5e9c0fc2f019d0ba19f5c5ddd8c32
 SHA512 
3d40da2322357845752ec8f6428ded77b26e732fcaa2eb0e7c0254d174b934016455afa676fd18f329f9be91a44df71bd0003979e46f5bb0c8fccf73105d371a
+DIST slim-1.40.11.tar.gz 11763371 BLAKE2B 
5724957d7a62609eee895dfa00e998351249b148dc3675d3fc2229423b7f17e5ed8397c9ea4c71fdf89c558b55b9b43e4822fa85b1c6d92c23f6a1b1cf65e3d6
 SHA512 
fa1049c68b3849d51dc58b1f84797048c6fa3d75b6e49715118107bfc6700e1d8fbad0c1ff0f654ce5aa5ac216200248fa883d4482978a7ab6dbd180d2696eb7

diff --git a/app-containers/slim/metadata.xml b/app-containers/slim/metadata.xml
new file mode 100644
index 000000000..b02509443
--- /dev/null
+++ b/app-containers/slim/metadata.xml
@@ -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>[email protected]</email>
+               <name>Alexey Zapparov</name>
+       </maintainer>
+       <upstream>
+               <remote-id type="github">slimtoolkit/slim</remote-id>
+       </upstream>
+</pkgmetadata>

diff --git a/app-containers/slim/slim-1.40.11.ebuild 
b/app-containers/slim/slim-1.40.11.ebuild
new file mode 100644
index 000000000..0b6075e04
--- /dev/null
+++ b/app-containers/slim/slim-1.40.11.ebuild
@@ -0,0 +1,47 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit go-module
+
+DESCRIPTION="Inspect, optimize and debug containers"
+HOMEPAGE="https://github.com/slimtoolkit/slim";
+SRC_URI="
+       https://github.com/slimtoolkit/slim/archive/refs/tags/${PV}.tar.gz -> 
${P}.tar.gz
+       https://github.com/ixti/slim/releases/download/${PV}/${P}-vendor.tar.xz
+"
+
+LICENSE="Apache-2.0 BSD BSD-2 ISC MIT MPL-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="
+       app-containers/docker
+"
+
+BDEPEND="
+       >=dev-lang/go-1.22.0
+"
+
+src_compile() {
+       LD_FLAGS+=" -s -w"
+       LD_FLAGS+=" -X 
github.com/slimtoolkit/slim/pkg/version.appVersionTag=${PV}"
+       LD_FLAGS+=" -X 
github.com/slimtoolkit/slim/pkg/version.appVersionRev=${PVR}"
+       LD_FLAGS+=" -X 
github.com/slimtoolkit/slim/pkg/version.appVersionTime=$(date --utc 
'+%Y-%m-%d_%I:%M:%S%p')"
+
+       ego generate github.com/slimtoolkit/slim/pkg/appbom
+
+       pushd "${S}/cmd/slim"
+               ego build -trimpath -ldflags="${LD_FLAGS}" -tags 'netgo 
osusergo' -o "${S}/slim"
+       popd
+
+       pushd "${S}/cmd/slim-sensor"
+               ego build -trimpath -ldflags="${LD_FLAGS}" -tags 'netgo 
osusergo' -o "${S}/slim-sensor"
+       popd
+}
+
+src_install() {
+       dobin slim
+       dobin slim-sensor
+}

Reply via email to