summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5a79f8a90b47071b5dda1cfc4e5fc67d1a1b5806 (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
# Maintainer: Hugo Osvaldo Barrera <hugo@barrera.io>

pkgname="bcwc-pcie-git"
pkgver=latest
pkgrel=1
pkgdesc="Reverse engineered Linux driver for the Broadcom 1570 PCIe webcam."
arch=('x86_64')
url="https://github.com/patjak/bcwc_pcie"
license=('unknown')
depends=('kmod' 'bcwc-pcie-firmware')
makedepends=('linux' 'linux-headers' 'git')
install="$pkgname.install"

source=("$pkgname::git+https://github.com/patjak/bcwc_pcie.git"
        "bcwc-pcie.modprobe.conf")
md5sums=('SKIP'
         '7531f220d5c3dd0ab5c31c445d526d7f')

pkgver() {
  cd "$srcdir/$pkgname"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd "$srcdir/$pkgname"
  make

  gzip -9f "facetimehd.ko"
}

package() {
  cd "$srcdir/$pkgname"

  KERNEL_VERSION=$(uname -r | cut -d '.' -f 1,2)
  install -Dm 644 facetimehd.ko.gz \
    "$pkgdir/usr/lib/modules/extramodules-${KERNEL_VERSION}-ARCH/facetimehd.ko.gz"
  install -Dm 644 "$srcdir/bcwc-pcie.modprobe.conf" \
    "$pkgdir/etc/modprobe.d/bcwc-pcie.conf"
}