feat(release): add packaging support for Arch, Debian, and RPM
* 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:
44
pkg/arch/PKGBUILD
Normal file
44
pkg/arch/PKGBUILD
Normal 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
45
pkg/centos/unitdore.spec
Normal 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
10
pkg/debian/control
Normal 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.
|
||||
Reference in New Issue
Block a user