summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Löthberg2015-08-10 05:15:51 +0200
committerJohannes Löthberg2015-08-10 05:15:51 +0200
commit55cce324f93493e42e3220209ccf15befe7777b3 (patch)
treee3f4b73dcc69bc6ac0abb29e533370c0b2d4a399
parente2d05106d9792740d300ae19b1fb944308d3d8ec (diff)
downloadaur-55cce324f93493e42e3220209ccf15befe7777b3.tar.gz
Clean up PKGBUILD, use proper arch-specific variables
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD38
-rw-r--r--install8
3 files changed, 27 insertions, 29 deletions
diff --git a/.SRCINFO b/.SRCINFO
index bafbc129f53e..be8d1858d1e4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
-# Generated by makepkg 4.2.1
-# Mon Apr 13 11:27:02 UTC 2015
+# Generated by makepkg 4.2.1-193-g5780
+# Mon Aug 10 03:15:20 UTC 2015
pkgbase = broadcom-wl
pkgdesc = Broadcom 802.11abgn hybrid Linux networking device driver
pkgver = 6.30.223.248
@@ -11,16 +11,18 @@ pkgbase = broadcom-wl
license = custom
makedepends = linux-headers
depends = linux
- source = http://www.broadcom.com/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-6_30_223_248.tar.gz
source = modprobe.d
source = license.patch
source = linux-recent.patch
source = gcc.patch
- sha256sums = 3d994cc6c05198f4b6f07a213ac1e9e45a45159899e6c4a7feca5e6c395c3022
sha256sums = b4aca51ac5ed20cb79057437be7baf3650563b7a9d5efc515f0b9b34fbb9dc32
sha256sums = 2f70be509aac743bec2cc3a19377be311a60a1c0e4a70ddd63ea89fae5df08ac
sha256sums = 922a5b183643db256d03b147f051fbf2032be8104412a661296efe4f781f2e59
sha256sums = b07ce80f2e079cce08c8ec006dda091f6f73f158c8a62df5bac2fbabb6989849
+ source_i686 = http://www.broadcom.com/docs/linux_sta/hybrid-v35-nodebug-pcoem-6_30_223_248.tar.gz
+ sha256sums_i686 = b196543a429c22b2b8d75d0c1d9e6e7ff212c3d3e1f42cc6fd9e4858f01da1ad
+ source_x86_64 = http://www.broadcom.com/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-6_30_223_248.tar.gz
+ sha256sums_x86_64 = 3d994cc6c05198f4b6f07a213ac1e9e45a45159899e6c4a7feca5e6c395c3022
pkgname = broadcom-wl
diff --git a/PKGBUILD b/PKGBUILD
index ebdb4477d1c4..f742ef264cf4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,38 +1,40 @@
-# Maintainer: Armin K. <krejzi at email dot com>
+# Maintainer: Johannes Löthberg <johannes@kyriasis.com>
+# Contributor: Armin K. <krejzi at email dot com>
# Contributor: Austin ( doorknob60 [at] gmail [dot] com )
# Contributor: Gaetan Bisson <bisson@archlinux.org>
pkgname=broadcom-wl
pkgver=6.30.223.248
pkgrel=6
+
pkgdesc='Broadcom 802.11abgn hybrid Linux networking device driver'
url='http://www.broadcom.com/support/802.11/linux_sta.php'
arch=('i686' 'x86_64')
license=('custom')
+
depends=('linux')
makedepends=('linux-headers')
-[[ $CARCH = x86_64 ]] && _arch=_64 || _arch=
-source=("http://www.broadcom.com/docs/linux_sta/hybrid-v35${_arch}-nodebug-pcoem-${pkgver//./_}.tar.gz"
- 'modprobe.d'
+
+source=('modprobe.d'
'license.patch'
'linux-recent.patch'
'gcc.patch')
-sha256sums=('b196543a429c22b2b8d75d0c1d9e6e7ff212c3d3e1f42cc6fd9e4858f01da1ad'
- 'b4aca51ac5ed20cb79057437be7baf3650563b7a9d5efc515f0b9b34fbb9dc32'
+source_i686=("http://www.broadcom.com/docs/linux_sta/hybrid-v35-nodebug-pcoem-${pkgver//./_}.tar.gz")
+source_x86_64=("http://www.broadcom.com/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-${pkgver//./_}.tar.gz")
+
+sha256sums=('b4aca51ac5ed20cb79057437be7baf3650563b7a9d5efc515f0b9b34fbb9dc32'
'2f70be509aac743bec2cc3a19377be311a60a1c0e4a70ddd63ea89fae5df08ac'
'922a5b183643db256d03b147f051fbf2032be8104412a661296efe4f781f2e59'
'b07ce80f2e079cce08c8ec006dda091f6f73f158c8a62df5bac2fbabb6989849')
-[[ $CARCH = x86_64 ]] && sha256sums[0]='3d994cc6c05198f4b6f07a213ac1e9e45a45159899e6c4a7feca5e6c395c3022'
+sha256sums_i686=('b196543a429c22b2b8d75d0c1d9e6e7ff212c3d3e1f42cc6fd9e4858f01da1ad')
+sha256sums_x86_64=('3d994cc6c05198f4b6f07a213ac1e9e45a45159899e6c4a7feca5e6c395c3022')
install=install
-_kernmajor="$(pacman -Q linux | awk '{print $2}' | cut -d - -f1 | cut -d . -f1,2)"
-_extramodules="extramodules-${_kernmajor}-ARCH"
-_kernver="$(cat /usr/lib/modules/${_extramodules}/version)"
+_kernmajor="$(pacman -Q linux | sed -r 's/linux ([0-9]*.[0-9]*).*/\1/')"
+_kernver="$(</usr/lib/modules/extramodules-"$_kernmajor"-ARCH/version)"
prepare() {
- cd "${srcdir}"
-
patch -p1 -i linux-recent.patch
patch -p1 -i license.patch
patch -p1 -i gcc.patch
@@ -42,17 +44,13 @@ prepare() {
}
build() {
- cd "${srcdir}"
-
make -C /usr/lib/modules/${_kernver}/build M=`pwd`
}
package() {
- cd "${srcdir}"
-
- install -Dm644 wl.ko "${pkgdir}/usr/lib/modules/${_extramodules}/wl.ko"
- gzip "${pkgdir}/usr/lib/modules/${_extramodules}/wl.ko"
+ install -Dm644 wl.ko "$pkgdir"/usr/lib/modules/extramodules-"$_kernmajor"-ARCH/wl.ko
+ gzip "$pkgdir"/usr/lib/modules/extramodules-"$_kernmajor"-ARCH/wl.ko
- install -Dm644 lib/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
- install -Dm644 modprobe.d "${pkgdir}/usr/lib/modprobe.d/broadcom-wl.conf"
+ install -Dm644 lib/LICENSE.txt "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE
+ install -Dm644 modprobe.d "$pkgdir"/usr/lib/modprobe.d/broadcom-wl.conf
}
diff --git a/install b/install
index 8daceacbb2b7..a2e1f9037c59 100644
--- a/install
+++ b/install
@@ -1,9 +1,7 @@
post_upgrade() {
- for i in /usr/lib/modules/extramodules-*
- do
- if [ -f "$i/version" ]
- then
- depmod $(cat "$i/version")
+ for i in /usr/lib/modules/extramodules-*; do
+ if [[ -f "$i/version" ]]; then
+ depmod "$(cat "$i"/version)"
fi
done
}