void-packages/srcpkgs/kexec-tools/template
Jürgen Buchmüller c6d9e3fef0 kexec-tools: needs -fcommon for gcc10
[ci skip]
2020-08-28 18:25:35 +02:00

37 lines
1.1 KiB
Bash

# Template file for 'kexec-tools'
pkgname=kexec-tools
version=2.0.20
revision=1
create_wrksrc=yes
build_style=gnu-configure
hostmakedepends="tar xz"
makedepends="zlib-devel liblzma-devel"
short_desc="Tools to support fast kexec reboots"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-only"
homepage="http://kernel.org/pub/linux/utils/kernel/kexec/"
distfiles="${KERNEL_SITE}/utils/kernel/kexec/${pkgname}-${version}.tar.xz"
checksum=dad8077f0315445d1f6335579fc4ade222facf82a67124974c7be5303ba4f8c8
skip_extraction="${pkgname}-${version}.tar.xz"
CFLAGS="-fcommon"
case "$XBPS_TARGET_MACHINE" in
ppc-musl) nopie=yes;; # textrels not supported
esac
do_extract() {
# bsdtar fails to extract version 2.0.20 tarball which
# contains (buggy) hard links from files to themselves.
tar --strip-components 1 --no-same-owner --extract --file \
${XBPS_SRCDISTDIR}/${pkgname}-${version}/${pkgname}-${version}.tar.xz \
--directory ${wrksrc}
}
pre_build() {
rm ${XBPS_WRAPPERDIR}/strip
case "$XBPS_TARGET_MACHINE" in
i686*) vsed -i '/compat_x86_64.S/d' purgatory/arch/i386/Makefile;;
esac
}