44 lines
990 B
Bash
44 lines
990 B
Bash
# Maintainer: Hein (Warky Devs) <hein@warky.dev>
|
|
pkgname=unitdore
|
|
pkgver=0.0.5
|
|
pkgrel=1
|
|
pkgdesc="A door you open and close for container units — manage containers via systemd"
|
|
arch=('x86_64' 'aarch64')
|
|
url="https://git.warky.dev/wdevs/unitdore"
|
|
license=('MIT')
|
|
depends=('systemd')
|
|
optdepends=(
|
|
'podman: Podman container runtime support'
|
|
'docker: Docker container runtime support'
|
|
)
|
|
makedepends=('go')
|
|
source=("$pkgname-$pkgver.zip::$url/archive/v$pkgver.zip")
|
|
sha256sums=('SKIP')
|
|
|
|
build() {
|
|
cd "$pkgname"
|
|
export CGO_ENABLED=0
|
|
go build \
|
|
-trimpath \
|
|
-ldflags "-X github.com/warkanum/unitdore/cmd.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"
|
|
}
|