aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Zapparov <alexey@zapparov.com>2024-09-17 17:43:18 +0200
committerAlexey Zapparov <alexey@zapparov.com>2024-09-17 18:18:01 +0200
commit8b8c5e87e1c1c29a28bf9a51f1c86ab1d3a1a3b8 (patch)
treefda0dfbb76dd403e4372d4fdbbdbda3548236c71 /app-containers
parentgui-apps/xremap: update HOMEPAGE, SRC_URI (diff)
downloadguru-8b8c5e87e1c1c29a28bf9a51f1c86ab1d3a1a3b8.tar.gz
guru-8b8c5e87e1c1c29a28bf9a51f1c86ab1d3a1a3b8.tar.bz2
guru-8b8c5e87e1c1c29a28bf9a51f1c86ab1d3a1a3b8.zip
app-containers/slim: new package, add 1.40.11
Signed-off-by: Alexey Zapparov <alexey@zapparov.com>
Diffstat (limited to 'app-containers')
-rw-r--r--app-containers/slim/Manifest2
-rw-r--r--app-containers/slim/metadata.xml11
-rw-r--r--app-containers/slim/slim-1.40.11.ebuild47
3 files changed, 60 insertions, 0 deletions
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>alexey@zapparov.com</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
+}