1 # Maintainer: Eli Schwartz <eschwartz@archlinux.org>
4 _kernelname= # Build against stock -ARCH kernel
5 #_kernelname=-custom # Build against kernel with a different name
6 pkgname=${_module}${_kernelname}
9 pkgdesc='Broadcom 802.11 Linux STA wireless driver'
11 url='https://www.broadcom.com/support/download-search/?pf=Wireless+LAN+Infrastructure'
13 makedepends=("linux${_kernelname}-headers" "${_module}-dkms=${pkgver}")
16 _kernver=$(</usr/src/linux${_kernelname}/version)
18 fakeroot dkms build --dkmstree "${srcdir}" -m ${_module}/${pkgver} -k ${_kernver}
22 depends=("linux${_kernelname}")
24 _kernver=$(</usr/src/linux${_kernelname}/version)
25 _extramodules="/usr/lib/modules/${_kernver}/extramodules"
27 install -Dm644 -t "${pkgdir}${_extramodules}" \
28 ${_module}/${pkgver}/${_kernver}/${CARCH}/module/*
30 # compress kernel modules
31 find "$pkgdir" -name "*.ko" -exec xz {} +
33 _license="/usr/share/licenses/${_module}-dkms"
34 if [[ -d ${_license} ]]; then
35 install -Dm644 -t "${pkgdir}"/${_license/-dkms/${_kernelname}} ${_license}/*
37 _modprobe="/usr/lib/modprobe.d/${_module}-dkms.conf"
38 if [[ -r ${_modprobe} ]]; then
39 install -Dm644 ${_modprobe} "${pkgdir}"/${_modprobe/-dkms/${_kernelname}}