summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: df576bc77516e9d8d8eb0760cb535b9a98912694 (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
# Maintainer: Aetf <aetf@unlimitedcodeworks.xyz>
# Co-Maintainer: Hugo Osvaldo Barrera <hugo@barrera.io>
# Co-Maintainer: Christoph Gysin <christoph.gysin@gmail.com>

pkgname="bcwc-pcie-git"
pkgver=r254.a22f248
pkgrel=3
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' 'facetimehd-firmware' 'dkms')
makedepends=('linux-headers' 'git')
optdepends=('linux-headers: Building with the stock kernel')
provides=('bcwc-pcie' 'bcwc-pcie-dkms')
replaces=('bcwc-pcie' 'bcwc-pcie-dkms')

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

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

package() {
  cd $srcdir/$pkgname

  for FILE in dkms.conf Makefile *.[ch]; do
    install -Dm 644 "$FILE" "$pkgdir/usr/src/${pkgname/-git/}-${pkgver}/$FILE"
  done

  install -Dm 644 "$srcdir/bcwc-pcie.modprobe.conf" \
    "$pkgdir/etc/modprobe.d/bcwc-pcie.conf"
  install -Dm 644 "$srcdir/bcwc-pcie.modules-load.conf" \
    "${pkgdir}/etc/modules-load.d/bcwc-pcie.conf"
}