summaryrefslogtreecommitdiff
path: root/aports/broadcom-wl/APKBUILD
blob: e26add860db40a959206b75bfe1a2572a5e63226 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# Maintainer: Gabor Pali <pali.gabor@gmail.com>

pkgname=broadcom-wl
pkgver=6.30.223.271
pkgrel=06060220100
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"
makedepends="linux-lts-dev xz"
depends="linux-lts"
install=
options="!check !strip"
source="broadcom-wl.conf
        Makefile.patch
        msi_support.patch
        001-null-pointer-fix.patch
        002-rdtscl.patch
        003-linux47.patch
        004-linux48.patch
        005-debian-fix-kernel-warnings.patch
        006-linux411.patch
        007-linux412.patch
        008-linux415.patch
        009-fix_mac_profile_discrepancy.patch
        010-linux56.patch
        011-linux59.patch
        012-linux517.patch
        013-linux518.patch
        014-linux414.patch
        015-linux600.patch
        016-linux601.patch
        https://docs.broadcom.com/docs-and-downloads/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-${pkgver//./_}.tar.gz
	"

_kernver=$(cd /usr/src/ && find . -mindepth 1 -maxdepth 1 -type d -name '*-lts' | sed 's!./linux-headers-!!')
_kbase="/lib/modules/${_kernver}"

prepare() {
  local _patch_failed=

  for i in $source; do
    case $i in
      *.patch)
        msg "Applying $i..."
        if ! patch -s -p1 -N -i "$srcdir"/$i; then
          echo $i >>failed
          _patch_failed=1
        fi
        ;;
    esac
  done

  if ! [ -z "$_patch_failed" ]; then
    error "The following patches failed:"
    cat failed
    return 1
  fi

  rm -f localversion*

  sed -i -e '/BRCM_WLAN_IFNAME/s/eth/wlan/' src/wl/sys/wl_linux.c
  sed -i '/GE_49 :=/s|:= .*|:= 1|' Makefile
}

build() {
  make KBASE="$_kbase"
}

package() {
  make install -C "$srcdir" KBASE="$pkgdir$_kbase"
  find "$pkgdir" -name "*.ko" -exec xz {} +
  install -Dm644 "$srcdir"/broadcom-wl.conf \
    "$pkgdir"/etc/modprobe.d/broadcom-wl.conf
  install -Dm644 "$srcdir"/lib/LICENSE.txt \
    "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE.txt
}

sha512sums="
98d0ed53e9fabba0b9ebd36ad7c67b1c50233de857759328bed7b790cdc5db675d5c23739384dd8c4e05f5969bf1c633f5028901508e596665d9ab028b42aebb  broadcom-wl.conf
9ac01eb67bd29573007e878a33207f9f335b85dd7ffa995020157228adfe4234e3febb6582cb25e315392933b3e2d53fd137032db7bda46c265740190d1c49c7  Makefile.patch
6bd2dbfd65930397f01861d5acfcdb9e89286f4b930756759667e67ee6cf11b0229466751442654d2ac4ccf4aaafd5d30435ebc9ab93ace21c372fe605bd3837  msi_support.patch
4403cad0360b01f8e88faccb77e6239865e9cc2b68dac62896153ab37957f1e73e5e4c95d3e81dac334106a2cd4ef0784955a5fefd8abc6e793a68f182bbffe4  001-null-pointer-fix.patch
b483a4fd5fbb5a4697365b6ddcd8034b4d90ddee9bf2aecf003b0fd6838a708d3e84be33b08acdbe165d440480da25fdf0dfff0d2fe12fa2c5271c51d6ac74c0  002-rdtscl.patch
f61ecfb6b8c5a377c7a4da7549c9ec75677782fa2f97e64de0df1259e0ec3b993cfa3eaa4ff50331703ee18ef28f2af0d09839dd3b63ed994e6b29cbfe8ed73f  003-linux47.patch
e5959921b6f0cd5d61d7ed568f549b0920f394458c28257c05064b89d7067ce11c8e44ed0e5a48a65bd041c6193d9ae2d02fca2f5efbfb787d3f9001786a4578  004-linux48.patch
6209a0a5a46a3efcede3cb1e263467173153d779b6267ba4c20f46421a9abd8743a7068527ace350a3da3ef3046b0399e09b37aba917fabe020c8c2600b60fdf  005-debian-fix-kernel-warnings.patch
b7db17e30731a9cbc940b83f7b62f059529cff6c134e47e2176cd7c6fcd8d028334ed4fe1fdce7cf1aef87590f9664b463383ae3302a6e2aabe1baa79fbc5c95  006-linux411.patch
d4acd891023ff8d4b9308afdd55c4e971cdf7773570c8e3a545400ed9e414eeca5016ebc8a530002e7858fd44f1fd5b0ae70c0d0a3cdbbffd5bd9abb702b2cde  007-linux412.patch
2fb5c3eebd48b6099fb87a9fd92545c17b2abf318b040a434c1b0bdd75a7a682b6e7ec9f80245c198f1c306bbaef35a2488123c5ba8764d5a83eb18132c0857b  008-linux415.patch
97d34398d18ac9a7943233c12e01cf7006bf0648938303100932cabf5000c346f1a852978e3c8c48bb6e8652177e625ce1190047d580624319e680a13802ce92  009-fix_mac_profile_discrepancy.patch
8fb320c1272246c91fdd99cade2fb67a6ecd924a132c1b9432fa1ff0338444700451ffc6a1cb35e07188c58c5bd1ccaf59ebf014c49f44cb6ba33d1ec732859d  010-linux56.patch
b9a0193ab604da92c99051e2a4fd91e43c3b6aeea7dbda15635b43eabd35b414e197bf5f25ac0d4ec905a1cb75abc15f165428470bc788dbefd73f178d165099  011-linux59.patch
ec34a2800d7a70a7a1ff8a96ba87c2327f68066addf5adc9f60ba303cfda9cee39159f110013f075e357988f92efe802010e9c1d7884a5dfb1908df1489bd608  012-linux517.patch
b815a4ff9289d81ddbe7f76553b092df19ee137438c9e33811c3a8b15e8a3896763715975b42391b4edfb60cfb0db46b71f4fee0f33a7b07f8d45cc4608d3faa  013-linux518.patch
30207d8872ee8925a7c7412184e3b4fd6935f8017fb46e1173aca77333c99fb4316ef1511a83e345593c369210d4cbf976eea53995e229b4d856d97662c98961  014-linux414.patch
21cf9b0b01ad4b30fa8541638e9a8428c8c68c89992b7e15c19f8526e8df6f8c5ff20de5ae2759b36fead07deacd1805749a9ed82611d15fb75dc94812e4941e  015-linux600.patch
8879aeb0a79b7e82ca5e70fd33acefda1733594d7e78940932d2c220cad48b643fc2c0cb8e79f1fc3ebaaa5a4383a0caf6798214f911c2f5859c8fab1c8532e8  016-linux601.patch
6855781f7c69a9aecb9461932423688964879d5a4df571f01ae7adaa7bf21a410bef839605d555afb6c8f4eec92fe8510af6cb120930095617ff6cdcccedaf17  hybrid-v35_64-nodebug-pcoem-6_30_223_271.tar.gz
"