feat(release): add packaging support for Arch, Debian, and RPM
Some checks failed
Release / test (push) Successful in -30m44s
Release / release (push) Successful in -30m36s
Release / pkg-arch (push) Failing after -30m14s
Release / pkg-deb (push) Successful in -30m4s
Release / pkg-rpm (push) Failing after -28m19s

* Implement Arch package build process in release workflow
* Add Debian and RPM packaging specifications
* Include man page installation in Makefile
* Create unitdore man page for documentation
This commit is contained in:
Hein
2026-04-08 14:28:09 +02:00
parent 880023c68b
commit 0b34b182a9
6 changed files with 411 additions and 2 deletions

44
pkg/arch/PKGBUILD Normal file
View File

@@ -0,0 +1,44 @@
# Maintainer: Hein (Warky Devs) <hein@warky.dev>
pkgname=unitdore
pkgver=0.1.0
pkgrel=1
pkgdesc="A door you open and close for container units — manage containers via systemd"
arch=('x86_64' 'aarch64')
url="https://warky.dev"
license=('MIT')
depends=('systemd')
optdepends=(
'podman: Podman container runtime support'
'docker: Docker container runtime support'
)
makedepends=('go')
backup=('etc/unitdore/units.yaml')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha256sums=('SKIP')
build() {
cd "$pkgname"
export CGO_ENABLED=0
go build \
-trimpath \
-ldflags "-X main.version=$pkgver" \
-o "$pkgname" .
}
check() {
cd "$pkgname"
go test ./...
}
package() {
cd "$pkgname"
# Binary
install -Dm755 "$pkgname" "$pkgdir/usr/bin/$pkgname"
# Man page
install -Dm644 docs/unitdore.1 "$pkgdir/usr/share/man/man1/unitdore.1"
# Default config dir
install -dm755 "$pkgdir/etc/unitdore"
}

45
pkg/centos/unitdore.spec Normal file
View File

@@ -0,0 +1,45 @@
Name: unitdore
Version: 0.1.0
Release: 1%{?dist}
Summary: Manage container units via systemd
License: MIT
URL: https://warky.dev
Source0: %{name}-%{version}.tar.gz
BuildRequires: golang >= 1.21
Requires: systemd
%description
Unitdore bridges your container runtime (Podman, Docker) and systemd.
It discovers running containers, stores them in a config file, and generates
and manages systemd .service units for each one.
%prep
%autosetup
%build
export CGO_ENABLED=0
go build \
-trimpath \
-ldflags "-X main.version=%{version}" \
-o %{name} .
%install
# Binary
install -Dm755 %{name} %{buildroot}%{_bindir}/%{name}
# Man page
install -Dm644 docs/unitdore.1 %{buildroot}%{_mandir}/man1/unitdore.1
# Config dir
install -dm755 %{buildroot}%{_sysconfdir}/unitdore
%files
%{_bindir}/%{name}
%{_mandir}/man1/unitdore.1*
%dir %{_sysconfdir}/unitdore
%changelog
* Tue Apr 08 2026 Hein (Warky Devs) <hein@warky.dev> - 0.1.0-1
- Initial package

10
pkg/debian/control Normal file
View File

@@ -0,0 +1,10 @@
Package: unitdore
Version: VERSION
Architecture: ARCH
Maintainer: Hein (Warky Devs) <hein@warky.dev>
Depends: systemd
Recommends: podman | docker.io
Description: A door you open and close for container units
Unitdore bridges your container runtime (Podman, Docker) and systemd.
It discovers running containers, stores them in a config file, and generates
and manages systemd .service units for each one.