### this file is sourced not run
PKGVER=0.19.0
PKGBUILD=1
PKGARCH=x86_64

# source: james
TARBALL=tini-init-$PKGVER.tar.gz
MD5SUM=72935bca9232313409a052833068fb1d
SRC_URL=https://github.com/krallin/tini/archive/v$PKGVER.tar.gz
BUNDLE=  # included

SLACKREQ= # musl build time
SLACKDESC="tini-init: tini-init $PKGVER (Simple PID 1 supervisor)
tini-init: 
tini-init: Tini is the simplest init you could think of. All Tini does is spawn 
tini-init: a single child (Tini is meant to be run in a container), and wait for 
tini-init: it to exit all the while reaping zombies and performing signal 
tini-init: forwarding.
tini-init: 
tini-init: https://github.com/krallin/tini
tini-init: 
tini-init: 
tini-init: 
"

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	cd /tmp/tini*/src &&
	
	type musl-gcc 2> /dev/null &&

	> tiniConfig.h cat << EOF &&
#define TINI_VERSION "$PKGVER"
#define TINI_GIT
EOF
	CFLAGS="$CFLAGS -DPR_SET_CHILD_SUBREAPER=36 -DPR_GET_CHILD_SUBREAPER=37" &&
	musl-gcc $CFLAGS -o /usr/bin/tini-init tini.c &&

	# docs
	install -m644 ../README.md /usr/share/doc/tini-init-README.md &&
	pkg_build_slackdesc
}
