app-containers/slim: new package, add 1.40.11

Signed-off-by: Alexey Zapparov <alexey@zapparov.com>
This commit is contained in:
Alexey Zapparov 2024-09-17 17:43:18 +02:00
parent dc08548188
commit 8b8c5e87e1
No known key found for this signature in database
GPG Key ID: 1FA54F86EB189F3C
3 changed files with 60 additions and 0 deletions

View File

@ -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

View File

@ -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>

View File

@ -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
}