PKGBUILD 1.76 KB
Newer Older
Phil's avatar
Phil committed
1
#
AlmAck's avatar
AlmAck committed
2
# Chakra Packages for Chakra, part of chakraos.org
Phil's avatar
Phil committed
3 4
#

AlmAck's avatar
AlmAck committed
5 6
_extramodules=extramodules-3.14-CHAKRA-LTS
_kver="$(cat /lib/modules/${_extramodules}/version)"
7
_kernelver=3.14.66
Phil's avatar
Phil committed
8 9

pkgname=broadcom-wl-lts
AlmAck's avatar
AlmAck committed
10
pkgver=6.30.223.271
11
pkgrel=2
Phil's avatar
Phil committed
12
pkgdesc='Broadcom 802.11abgn hybrid Linux networking device driver'
13
arch=('x86_64')
Phil's avatar
Phil committed
14 15
url='http://www.broadcom.com/support/802.11/linux_sta.php'
license=('custom')
Xuetian Weng's avatar
Xuetian Weng committed
16 17
depends=("linux-lts=${_kernelver}")
makedepends=("linux-lts-headers=${_kernelver}")
18 19
backup=('etc/modprobe.d/broadcom-wl-lts.conf')
install=install
AlmAck's avatar
AlmAck committed
20
source=("http://www.broadcom.com/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-${pkgver//./_}.tar.gz"
AlmAck's avatar
AlmAck committed
21
         #"http://ftp.de.debian.org/debian/pool/non-free/b/broadcom-sta/broadcom-sta_5.100.82.112.orig.tar.gz" "http://www.broadcom.com/docs/linux_sta/hybrid-portsrc_${ARCH}-v${pkgver//./_}.tar.gz" we need the debian version, because upstream URL doesn't exist anymore
Phil's avatar
Phil committed
22
        'modprobe.d'
AlmAck's avatar
AlmAck committed
23
        'license.patch'
AlmAck's avatar
AlmAck committed
24 25
        'wl_linux.c.patch')
sha1sums=('1f568bb989d175813c5631c6629d9479eae6f3be'
Phil's avatar
Phil committed
26
          '89bf92286ede30dd85304c6c4e42e89cfdc0f60a'
AlmAck's avatar
AlmAck committed
27
          'ea7b67982ddc0f56fd3becb9914fd4458fe7d373'
AlmAck's avatar
AlmAck committed
28
          '94e12ef9e64fde04a5bfb04858dd5be86a70e902')
AlmAck's avatar
AlmAck committed
29 30 31 32

prepare() {
        cd "${srcdir}"
        patch -p1 -i license.patch
AlmAck's avatar
AlmAck committed
33
        patch -p1 -i wl_linux.c.patch
AlmAck's avatar
AlmAck committed
34 35 36 37

        sed -e "/BRCM_WLAN_IFNAME/s:eth:wlan:" \
            -i src/wl/sys/wl_linux.c
}
Phil's avatar
Phil committed
38 39

build() {
AlmAck's avatar
AlmAck committed
40
	cd "${srcdir}"
Phil's avatar
Phil committed
41

AlmAck's avatar
AlmAck committed
42
	make -C /lib/modules/"${_kver}"/build M=`pwd`
Phil's avatar
Phil committed
43 44 45
}

package() {
AlmAck's avatar
AlmAck committed
46
	cd "${srcdir}"
Phil's avatar
Phil committed
47

48 49
	install -D -m 755 wl.ko "${pkgdir}/usr/lib/modules/${_extramodules}/wl.ko"
	gzip "${pkgdir}/usr/lib/modules/${_extramodules}/wl.ko"
Phil's avatar
Phil committed
50 51

	install -D -m 644 lib/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
52
	install -D -m 644 ${srcdir}/modprobe.d "${pkgdir}"/etc/modprobe.d/broadcom-wl-lts.conf
53
}