Skip to content
Snippets Groups Projects
PKGBUILD 1.61 KiB
Newer Older
Bernhard Landauer's avatar
Bernhard Landauer committed
# Maintainer: Bernhard Landauer <bernhard@manjaro.org>
# Based on the file created for Arch Linux by: Frank Vanderham

_linuxprefix=linux515-rt
_extramodules=extramodules-5.15-rt-MANJARO
pkgname=$_linuxprefix-broadcom-wl
_pkgname=broadcom-wl
pkgver=6.30.223.271
Manjaro Build Server's avatar
Manjaro Build Server committed
pkgrel=40
Bernhard Landauer's avatar
Bernhard Landauer committed
pkgdesc='Broadcom 802.11 Linux STA wireless driver BCM43142.'
url='https://bbs.archlinux.org/viewtopic.php?id=145884'
arch=('x86_64')
license=('custom')
depends=("$_linuxprefix")
makedepends=("broadcom-wl-dkms>=$pkgver" 'dkms' "$_linuxprefix" "$_linuxprefix-headers")
Bernhard Landauer's avatar
Bernhard Landauer committed
groups=("$_linuxprefix-extramodules")
provides=("$_pkgname=$pkgver")
replaces=('linux510-rt-broadcom-wl')
Bernhard Landauer's avatar
Bernhard Landauer committed
install=$_pkgname.install
backup=('etc/modprobe.d/$_linuxprefix-broadcom-wl.conf')
source=(broadcom-wl-dkms.conf)
sha256sums=('b97bc588420d1542f73279e71975ccb5d81d75e534e7b5717e01d6e6adf6a283')

build() {
  _kernver="$(cat /usr/lib/modules/${_extramodules}/version)"

  # build host modules
  msg2 'Build module'

  CFLAGS="${CFLAGS} -Wno-error"
  CXXFLAGS="${CXXFLAGS}  -Wno-error"

  msg2 "$CFLAGS, ${CXXFLAGS}"

Bernhard Landauer's avatar
Bernhard Landauer committed
  fakeroot dkms build --dkmstree "$srcdir" -m "broadcom-wl/$pkgver" -k "$_kernver"
Bernhard Landauer's avatar
Bernhard Landauer committed
}

package(){
  _kernver="$(cat /usr/lib/modules/${_extramodules}/version)"

  install -dm755 "$pkgdir/usr/lib/modules/$_extramodules"
Bernhard Landauer's avatar
Bernhard Landauer committed
  cd "broadcom-wl/$pkgver/$_kernver/$CARCH/module"
Bernhard Landauer's avatar
Bernhard Landauer committed
  install -m644 * "$pkgdir/usr/lib/modules/$_extramodules"
  find "$pkgdir" -name '*.ko' -exec gzip -9 {} +
  sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='$_extramodules'/" "$startdir/$_pkgname.install"
  install -D -m 644 "${srcdir}/broadcom-wl-dkms.conf" "${pkgdir}/etc/modprobe.d/${_linuxprefix}-broadcom-wl.conf"
}