* 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
45 lines
984 B
Bash
45 lines
984 B
Bash
# 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"
|
|
}
|