aboutsummaryrefslogtreecommitdiffstats
path: root/community/tini/APKBUILD
blob: 9a198134cf9f66a6e55f7da94dfcd1920dbc1324 (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
# Maintainer: Danilo Bürger <danilo@feastr.de>
pkgname=tini
pkgver=0.18.0
pkgrel=1
pkgdesc="A tiny but valid init for containers"
options="!check" # Test suite depends on Docker
url="https://github.com/krallin/tini"
arch="all"
license="MIT"
makedepends="cmake"
subpackages="$pkgname-static"
source="$pkgname-$pkgver.tar.gz::https://github.com/krallin/tini/archive/v$pkgver.tar.gz"

build() {
	export CFLAGS="$CFLAGS -DPR_SET_CHILD_SUBREAPER=36 -DPR_GET_CHILD_SUBREAPER=37"
	cmake -B build . \
		-DCMAKE_BUILD_TYPE=None
	make -C build
	make -C build tini-static
}

package() {
	install -Dm755 build/tini "$pkgdir"/sbin/tini
}

static() {
	pkgdesc="Static build of tini"
	install -Dm755 "$builddir"/build/tini-static "$subpkgdir"/sbin/tini-static
}

sha512sums="83279180b6a875aaff9b6b7446ee7e71fd05357279744afcb4db67c76572dc871acfba86c035857009b5dd88ca75d9f2e815d6a925563cdb3e6e771eb83be9b1  tini-0.18.0.tar.gz"