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

# source: james
TARBALL=kexec-tools-$PKGVER.tar.xz
MD5SUM=ce3c79e0f639035ef7ddfc39b286a61a
SRC_URL=https://mirrors.edge.kernel.org/pub/linux/utils/kernel/kexec/$TARBALL
BUNDLE=

SLACKREQ= # musl and musl-kernel-libc
SLACKDESC="kexec-tools-static: kexec-tools-static $PKGVER (Soft-reboot tool)
kexec-tools-static: 
kexec-tools-static: Kexec is a soft-reboot and crash-dump facility provided by both Linux 
kexec-tools-static: and Xen.
kexec-tools-static: 
kexec-tools-static: This package contains a statically-built version of the tools.
kexec-tools-static: 
kexec-tools-static: https://projects.horms.net/projects/kexec/
kexec-tools-static: https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git
kexec-tools-static: 
kexec-tools-static: 
"

### default pkg_download
### prepare
pkg_prepare() {
	pkg_prepare_default &&

	# apply upstream patches 
	#cd tmp/kexec* &&
	#for p in ../pkg/upstream/*; do
	#	patch -Np1 -i $p || return 1
	#done &&

	true
}

### default pkg_package
### build
pkg_build() {
	cd /tmp/kexec* &&
	autoreconf -fi &&

	CONFFLAGS="$CONFFLAGS --sbindir=/sbin" &&
	CC="musl-gcc -static -I/usr/musl/kernel/include" &&
	
	pkg_build_autoconf &&
	pkg_build_slackdesc &&

	# delete test files
	rm -rf /usr/$LIBDIR/kexec-tools
}
