archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / broadcom-wl / trunk / PKGBUILD
blob4706bc5d59817c0a95b2fc0e8ec02b43ac3568ad
1 # Maintainer: Eli Schwartz <eschwartz@archlinux.org>
3 _module=broadcom-wl
4 _kernelname=              # Build against stock -ARCH kernel
5 #_kernelname=-custom      # Build against kernel with a different name
6 pkgname=${_module}${_kernelname}
7 pkgver=6.30.223.271
8 pkgrel=470
9 pkgdesc='Broadcom 802.11 Linux STA wireless driver'
10 arch=('x86_64')
11 url='https://www.broadcom.com/support/download-search/?pf=Wireless+LAN+Infrastructure'
12 license=('custom')
13 makedepends=("linux${_kernelname}-headers" "${_module}-dkms=${pkgver}")
15 build() {
16     _kernver=$(</usr/src/linux${_kernelname}/version)
18     fakeroot dkms build --dkmstree "${srcdir}" -m ${_module}/${pkgver} -k ${_kernver}
21 package() {
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}/*
36     fi
37     _modprobe="/usr/lib/modprobe.d/${_module}-dkms.conf"
38     if [[ -r ${_modprobe} ]]; then
39         install -Dm644 ${_modprobe} "${pkgdir}"/${_modprobe/-dkms/${_kernelname}}
40     fi