[arch-commits] Commit in broadcom-wl/repos (2 files)

Jan Steffens heftig at archlinux.org
Tue May 22 23:08:15 UTC 2018


    Date: Tuesday, May 22, 2018 @ 23:08:14
  Author: heftig
Revision: 327800

archrelease: copy trunk to community-staging-x86_64

Added:
  broadcom-wl/repos/community-staging-x86_64/
  broadcom-wl/repos/community-staging-x86_64/PKGBUILD
    (from rev 327799, broadcom-wl/trunk/PKGBUILD)

----------+
 PKGBUILD |   39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

Copied: broadcom-wl/repos/community-staging-x86_64/PKGBUILD (from rev 327799, broadcom-wl/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2018-05-22 23:08:14 UTC (rev 327800)
@@ -0,0 +1,39 @@
+# $Id$
+# Maintainer: Eli Schwartz <eschwartz at archlinux.org>
+
+pkgname=broadcom-wl            # Build against stock -ARCH kernel
+#pkgname=broadcom-wl-custom    # Build agains kernel with a different name
+_kernelname=${pkgname#broadcom-wl}
+pkgver=6.30.223.271
+pkgrel=18
+pkgdesc='Broadcom 802.11 Linux STA wireless driver'
+arch=('x86_64')
+url='https://www.broadcom.com/support/download-search/?pf=Wireless+LAN+Infrastructure'
+license=('custom')
+depends=("linux${_kernelname}")
+makedepends=("linux${_kernelname}-headers" "${pkgname%$_kernelname}-dkms=${pkgver}")
+
+build() {
+    _kernmajor="$(pacman -Q linux${_kernelname} | sed -r 's/linux'"${_kernelname}"' ([0-9]*.[0-9]*).*/\1/')"
+    _kernver="$(</usr/lib/modules/extramodules-"${_kernmajor}${_kernelname:--ARCH}"/version)"
+
+    dkms build --dkmstree "$srcdir" -m $pkgname/$pkgver -k $_kernver
+}
+
+package() {
+    _kernmajor="$(pacman -Q linux${_kernelname} | sed -r 's/linux'"${_kernelname}"' ([0-9]*.[0-9]*).*/\1/')"
+    _kernver="$(</usr/lib/modules/extramodules-${_kernmajor}${_kernelname:--ARCH}/version)"
+
+    install -Dm644 -t "${pkgdir}/usr/lib/modules/extramodules-${_kernmajor}${_kernelname:--ARCH}" \
+        ${pkgname}/${pkgver}/${_kernver}/${CARCH}/module/*.ko
+    find "$pkgdir" -name '*.ko' -exec xz -T1 {} +
+
+    _license="/usr/share/licenses/${pkgname}-dkms/"
+    if [[ -d $_license ]]; then
+        install -Dm644 -t "${pkgdir}"/${_license/-dkms/} ${_license}/*
+    fi
+    _modprobe="/usr/lib/modprobe.d/${pkgname}-dkms.conf"
+    if [[ -r ${_modprobe} ]]; then
+        install -Dm644 ${_modprobe} "${pkgdir}"/${_modprobe/-dkms/}
+    fi
+}



More information about the arch-commits mailing list