void-packages/srcpkgs/broadcom-wl-dkms/template
maxice8 d2eb199ebd
ports-wide: remove all occurrences of triggers="dkms"
There is no need for triggers="dkms" since having dkms_modules="" set
also adds the dkms trigger automatically.

This occoured problably since one template did it and everyone else
just copied it (understandable since dkms_modules is not documented)

[ci skip]
2018-08-20 08:34:30 -03:00

55 lines
1.8 KiB
Bash

# Template file for 'broadcom-wl-dkms'
pkgname=broadcom-wl-dkms
version=6.30.223.271
revision=7
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="Proprietary Broadcom license"
homepage="http://broadcom.com"
only_for_archs="i686 i686-musl x86_64 x86_64-musl"
repository="nonfree"
create_wrksrc=yes
short_desc="Broadcom proprietary wireless drivers for Linux - DKMS kernel module"
dkms_modules="wl ${version}"
depends="dkms"
case "$XBPS_TARGET_MACHINE" in
i686*)
distfiles="http://www.broadcom.com/docs-and-downloads/docs/linux_sta/hybrid-v35-nodebug-pcoem-${version//./_}.tar.gz"
checksum=4f8b70b293ac8cc5c70e571ad5d1878d0f29d133a46fe7869868d9c19b5058cd
;;
x86_64*)
distfiles="http://www.broadcom.com/docs-and-downloads/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-${version//./_}.tar.gz"
checksum=5f79774d5beec8f7636b59c0fb07a03108eef1e3fd3245638b20858c714144be
;;
esac
do_install() {
sed -i -e "/BRCM_WLAN_IFNAME/s:eth:wlan:" src/wl/sys/wl_linux.c
# dkms pkg
vmkdir usr/src/wl-${version}/src
vcopy "src/*" usr/src/wl-${version}/src
vmkdir usr/src/wl-${version}/lib
vcopy "lib/*" usr/src/wl-${version}/lib
vcopy "Makefile" usr/src/wl-${version}
vinstall ${FILESDIR}/dkms.conf 644 usr/src/wl-${version}
sed -i -e "s/@VERSION@/${version}-${revision}/" ${PKGDESTDIR}/usr/src/wl-${version}/dkms.conf
# modules-load.d(5) file.
vmkdir usr/lib/modules-load.d
echo "wl" > ${DESTDIR}/usr/lib/modules-load.d/wl.conf
chmod 644 ${DESTDIR}/usr/lib/modules-load.d/wl.conf
# Blacklist OSS broadcom modules.
vmkdir usr/lib/modprobe.d
printf '' > ${DESTDIR}/usr/lib/modprobe.d/wl.conf
for module in b43{,legacy} ssb bcm{43xx,a} brcm{80211,fmac,smac}; do
echo "blacklist $module" >> ${DESTDIR}/usr/lib/modprobe.d/wl.conf
done
chmod 644 ${DESTDIR}/usr/lib/modprobe.d/wl.conf
}