mirror of
https://aur.archlinux.org/linux-vfio.git
synced 2024-12-26 16:44:09 +00:00
Fixes separate runs of packaging single packages
See Move-common-vars-outside-package.patch attached to https://bugs.archlinux.org/task/43885#comment137004
This commit is contained in:
parent
3f524d2026
commit
09df5d69b0
21
PKGBUILD
21
PKGBUILD
@ -118,6 +118,17 @@ build() {
|
||||
make ${MAKEFLAGS} LOCALVERSION= bzImage modules
|
||||
}
|
||||
|
||||
_common_package() {
|
||||
cd "${srcdir}/${_srcname}"
|
||||
|
||||
KARCH=x86
|
||||
|
||||
# get kernel version
|
||||
_kernver="$(make LOCALVERSION= kernelrelease)"
|
||||
_basekernel=${_kernver%%-*}
|
||||
_basekernel=${_basekernel%.*}
|
||||
}
|
||||
|
||||
_package() {
|
||||
pkgdesc="The Linux kernel and modules with patches to enable GPU passthrough with KVM"
|
||||
[ "${pkgbase}" = "linux" ] && groups=('base')
|
||||
@ -129,15 +140,6 @@ _package() {
|
||||
backup=("etc/mkinitcpio.d/${pkgbase}.preset")
|
||||
install=linux.install
|
||||
|
||||
cd "${srcdir}/${_srcname}"
|
||||
|
||||
KARCH=x86
|
||||
|
||||
# get kernel version
|
||||
_kernver="$(make LOCALVERSION= kernelrelease)"
|
||||
_basekernel=${_kernver%%-*}
|
||||
_basekernel=${_basekernel%.*}
|
||||
|
||||
mkdir -p "${pkgdir}"/{lib/modules,lib/firmware,boot}
|
||||
make LOCALVERSION= INSTALL_MOD_PATH="${pkgdir}" modules_install
|
||||
cp arch/$KARCH/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}"
|
||||
@ -321,6 +323,7 @@ pkgname=("${pkgbase}" "${pkgbase}-headers" "${pkgbase}-docs")
|
||||
for _p in ${pkgname[@]}; do
|
||||
eval "package_${_p}() {
|
||||
$(declare -f "_package${_p#${pkgbase}}")
|
||||
_common_package
|
||||
_package${_p#${pkgbase}}
|
||||
}"
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user