blob: 2afcb0a8bd7404af9c0f8029aa59fbe3b6ccccc2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Sean McAvoy <seanmcavoy@gmail.com>
pkgname=distrobuilder
pkgver=2.1
pkgrel=5
pkgdesc="System container image builder"
url="https://linuxcontainers.org/distrobuilder/"
arch="all !armhf !armv7"
license="Apache-2.0"
depends="gnupg xz"
makedepends="go linux-headers"
subpackages="$pkgname-lxc::noarch $pkgname-lxd::noarch $pkgname-doc"
checkdepends="squashfs-tools"
source="https://github.com/lxc/distrobuilder/archive/refs/tags/distrobuilder-$pkgver.tar.gz"
builddir="$srcdir/distrobuilder-distrobuilder-$pkgver"
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
export GOFLAGS="$GOFLAGS -modcacherw"
build() {
go build -o out ./distrobuilder
}
check() {
go test ./...
}
package() {
install -Dm755 out "$pkgdir"/usr/bin/$pkgname
install -Dm644 -t "$pkgdir"/usr/share/doc/distrobuilder doc/*.md
install -Dm644 -t "$pkgdir"/usr/share/doc/distrobuilder/examples doc/examples/*.yaml
}
lxc() {
pkgdesc="$pkgdesc (for LXC)"
depends="$pkgname"
install_if="$pkgname=$pkgver-r$pkgrel lxc"
mkdir -p "$subpkgdir"
}
lxd() {
pkgdesc="$pkgdesc (for LXD)"
depends="$pkgname squashfs-tools"
install_if="$pkgname=$pkgver-r$pkgrel lxd"
mkdir -p "$subpkgdir"
}
sha512sums="
8b57a90b1065efed29fa4a6d6c4699d81539a4bd802739d55b31d9a45b55d40fb19abe09ce76d861d96555c41942a7d874a8886ac4916fadab61eb190071b478 distrobuilder-2.1.tar.gz
"
|