Anchor the .gitignore binary entry so pkg/*/unitdore is tracked. Document Gentoo and Void installs in the README.
59 lines
1.2 KiB
Bash
59 lines
1.2 KiB
Bash
# Copyright 2024 Hein (Warky Devs)
|
|
# Distributed under the terms of the MIT License
|
|
|
|
EAPI=8
|
|
|
|
inherit go-module
|
|
|
|
DESCRIPTION="A door you open and close for container units (systemd, OpenRC, runit)"
|
|
HOMEPAGE="https://git.warky.dev/wdevs/unitdore"
|
|
|
|
EGO_SUM=(
|
|
"github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod"
|
|
"github.com/inconshreveable/mousetrap v1.1.0"
|
|
"github.com/inconshreveable/mousetrap v1.1.0/go.mod"
|
|
"github.com/russross/blackfriday/v2 v2.1.0/go.mod"
|
|
"github.com/spf13/cobra v1.10.2"
|
|
"github.com/spf13/cobra v1.10.2/go.mod"
|
|
"github.com/spf13/pflag v1.0.9"
|
|
"github.com/spf13/pflag v1.0.9/go.mod"
|
|
"go.yaml.in/yaml/v3 v3.0.4/go.mod"
|
|
"gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod"
|
|
"gopkg.in/yaml.v3 v3.0.1"
|
|
"gopkg.in/yaml.v3 v3.0.1/go.mod"
|
|
)
|
|
go-module_set_globals
|
|
|
|
SRC_URI="
|
|
${HOMEPAGE}/releases/download/v${PV}/${PN}-v${PV}-source.tar.gz -> ${P}.tar.gz
|
|
${EGO_SUM_SRC_URI}
|
|
"
|
|
|
|
LICENSE="MIT"
|
|
SLOT="0"
|
|
KEYWORDS="~amd64 ~arm64"
|
|
|
|
RDEPEND="
|
|
|| (
|
|
app-containers/podman
|
|
app-containers/docker
|
|
)
|
|
"
|
|
BDEPEND=">=dev-lang/go-1.23"
|
|
|
|
src_compile() {
|
|
ego build -trimpath \
|
|
-ldflags "-X github.com/warkanum/unitdore/cmd.version=${PV}" \
|
|
-o ${PN} .
|
|
}
|
|
|
|
src_test() {
|
|
ego test ./...
|
|
}
|
|
|
|
src_install() {
|
|
dobin ${PN}
|
|
doman docs/${PN}.1
|
|
keepdir /etc/${PN}
|
|
}
|