mirror of
https://aur.archlinux.org/linux-vfio.git
synced 2024-12-27 07:44:11 +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
|
make ${MAKEFLAGS} LOCALVERSION= bzImage modules
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_common_package() {
|
||||||
|
cd "${srcdir}/${_srcname}"
|
||||||
|
|
||||||
|
KARCH=x86
|
||||||
|
|
||||||
|
# get kernel version
|
||||||
|
_kernver="$(make LOCALVERSION= kernelrelease)"
|
||||||
|
_basekernel=${_kernver%%-*}
|
||||||
|
_basekernel=${_basekernel%.*}
|
||||||
|
}
|
||||||
|
|
||||||
_package() {
|
_package() {
|
||||||
pkgdesc="The Linux kernel and modules with patches to enable GPU passthrough with KVM"
|
pkgdesc="The Linux kernel and modules with patches to enable GPU passthrough with KVM"
|
||||||
[ "${pkgbase}" = "linux" ] && groups=('base')
|
[ "${pkgbase}" = "linux" ] && groups=('base')
|
||||||
@ -129,15 +140,6 @@ _package() {
|
|||||||
backup=("etc/mkinitcpio.d/${pkgbase}.preset")
|
backup=("etc/mkinitcpio.d/${pkgbase}.preset")
|
||||||
install=linux.install
|
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}
|
mkdir -p "${pkgdir}"/{lib/modules,lib/firmware,boot}
|
||||||
make LOCALVERSION= INSTALL_MOD_PATH="${pkgdir}" modules_install
|
make LOCALVERSION= INSTALL_MOD_PATH="${pkgdir}" modules_install
|
||||||
cp arch/$KARCH/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}"
|
cp arch/$KARCH/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}"
|
||||||
@ -321,6 +323,7 @@ pkgname=("${pkgbase}" "${pkgbase}-headers" "${pkgbase}-docs")
|
|||||||
for _p in ${pkgname[@]}; do
|
for _p in ${pkgname[@]}; do
|
||||||
eval "package_${_p}() {
|
eval "package_${_p}() {
|
||||||
$(declare -f "_package${_p#${pkgbase}}")
|
$(declare -f "_package${_p#${pkgbase}}")
|
||||||
|
_common_package
|
||||||
_package${_p#${pkgbase}}
|
_package${_p#${pkgbase}}
|
||||||
}"
|
}"
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user