aboutsummaryrefslogtreecommitdiffstats
path: root/community/tini/APKBUILD
blob: 1e6bceb5c568a54ca2c94fd73865777e28f4f407 (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
# Maintainer: Danilo Bürger <danilo@feastr.de>

pkgname=tini
pkgver=0.14.0
pkgrel=0
pkgdesc="A tiny but valid init for containers"
url="https://github.com/krallin/tini"
arch="all"
license="MIT"
depends=""
depends_dev=""
makedepends="$depends_dev cmake"
install=""
subpackages="$pkgname-static"
source="$pkgname-$pkgver.tar.gz::https://github.com/krallin/tini/archive/v$pkgver.tar.gz"

builddir="$srcdir"/$pkgname-$pkgver

build() {
	cd "$builddir"
	export CFLAGS="-DPR_SET_CHILD_SUBREAPER=36 -DPR_GET_CHILD_SUBREAPER=37"
	cmake . || return 1
	make || return 1
	make tini-static || return 1
}

package() {
	cd "$builddir"
	install -D -m755 tini "$pkgdir"/sbin/tini || return 1
}

static() {
	cd "$builddir"
	pkgdesc="Static build of tini"
	install -D -m755 tini-static "$subpkgdir"/sbin/tini-static || return 1
}

sha512sums="dc86c4d36e8bd232e0c8880d3ea6a7d55d01ab8ba7d903ac9e9edfb2d2fe39e900e20c63cedc3f22abd9b24d9fd1d309bd6823ce863fffe0909507f880356985  tini-0.14.0.tar.gz"