diff options
-rw-r--r-- | libre/bbswitch/PKGBUILD | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/libre/bbswitch/PKGBUILD b/libre/bbswitch/PKGBUILD index ff931a0ff..2c2ff169d 100644 --- a/libre/bbswitch/PKGBUILD +++ b/libre/bbswitch/PKGBUILD @@ -64,17 +64,22 @@ _package() { gzip "${pkgdir}/usr/lib/modules/${_extramodules}/${pkgbase}.ko" } -_package-dkms() { - depends=('dkms') +if [[ ${_kernelname} == "" ]]; then + _package-dkms() { + depends=('dkms') - cd "${srcdir}/${pkgbase}-${pkgver}" + cd "${srcdir}/${pkgbase}-${pkgver}" - install -dm755 "${pkgdir}/usr/src/${pkgbase}-${pkgver}/" + install -dm755 "${pkgdir}/usr/src/${pkgbase}-${pkgver}/" - install -Dm644 Makefile bbswitch.c dkms/dkms.conf "${pkgdir}/usr/src/${pkgbase}-${pkgver}/" -} + install -Dm644 Makefile bbswitch.c dkms/dkms.conf "${pkgdir}/usr/src/${pkgbase}-${pkgver}/" + } + + pkgname=("${pkgbase}${_kernelname}" "${pkgbase}${_kernelname}-dkms") +else + pkgname=("${pkgbase}${_kernelname}") +fi -pkgname=("${pkgbase}${_kernelname}" "${pkgbase}${_kernelname}-dkms") for _p in ${pkgname[@]}; do eval "package_${_p}() { $(declare -f "_package${_p#${pkgbase}${_kernelname}}") |