feat(pkg): add Gentoo ebuild and Void Linux template
Anchor the .gitignore binary entry so pkg/*/unitdore is tracked. Document Gentoo and Void installs in the README.
This commit is contained in:
+1
-1
@@ -1,3 +1,3 @@
|
|||||||
unitdore
|
/unitdore
|
||||||
*.exe
|
*.exe
|
||||||
.codex
|
.codex
|
||||||
|
|||||||
@@ -30,6 +30,26 @@ sudo rpm -i unitdore-*.rpm
|
|||||||
sudo dnf install unitdore-*.rpm
|
sudo dnf install unitdore-*.rpm
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Gentoo (OpenRC / systemd)**
|
||||||
|
|
||||||
|
Ebuild in `pkg/gentoo/app-containers/unitdore/`. Copy it into a local overlay, then:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ebuild unitdore-<ver>.ebuild manifest # once per version
|
||||||
|
sudo emerge app-containers/unitdore
|
||||||
|
```
|
||||||
|
|
||||||
|
**Void Linux (runit)**
|
||||||
|
|
||||||
|
Template in `pkg/void/srcpkgs/unitdore/`. Copy it into a `void-packages` checkout, then:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./xbps-src pkg unitdore
|
||||||
|
sudo xbps-install --repository=hostdir/binpkgs unitdore
|
||||||
|
```
|
||||||
|
|
||||||
|
Set `init: runit` / `init: openrc` in the config if autodetect picks the wrong one.
|
||||||
|
|
||||||
**From source**
|
**From source**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||||
|
<pkgmetadata>
|
||||||
|
<maintainer type="person">
|
||||||
|
<email>hein@warky.dev</email>
|
||||||
|
<name>Hein (Warky Devs)</name>
|
||||||
|
</maintainer>
|
||||||
|
</pkgmetadata>
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
# 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}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
# Template file for 'unitdore'
|
||||||
|
pkgname=unitdore
|
||||||
|
version=0.0.11
|
||||||
|
revision=1
|
||||||
|
build_style=go
|
||||||
|
go_import_path="github.com/warkanum/unitdore"
|
||||||
|
go_ldflags="-X github.com/warkanum/unitdore/cmd.version=${version}"
|
||||||
|
short_desc="Manage container units via systemd, OpenRC or runit"
|
||||||
|
maintainer="Hein (Warky Devs) <hein@warky.dev>"
|
||||||
|
license="MIT"
|
||||||
|
homepage="https://git.warky.dev/wdevs/unitdore"
|
||||||
|
distfiles="${homepage}/releases/download/v${version}/unitdore-v${version}-source.tar.gz"
|
||||||
|
checksum=0ce16db55d2dbd5437c2820d19c76b0714c1b57568bf6db509184f66b7c4e7a3
|
||||||
|
|
||||||
|
post_install() {
|
||||||
|
vman docs/unitdore.1
|
||||||
|
vlicense LICENSE
|
||||||
|
vmkdir etc/unitdore
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user