summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ea1b32724aed4a757df6849d8bbf7dede601e814 (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
_pkgbase=bcm2079x-i2c
pkgname=${_pkgbase}
pkgver=1
pkgrel=1
pkgdesc="DKMS module for bcm2079x-i2c NFC driver used in Lenovo ThinkPad T440s. Not useful as-is, because the userspace portion is only make for Android so far."
arch=('i686' 'x86_64')
url="https://patchwork.kernel.org/patch/2847848/"
license=('GPL2')
depends=('dkms')
conflicts=("${_pkgbase}")
#install=${pkgname}.install
source=("${_pkgbase}.c"
        'bcm2079x.h'
        'dkms.conf'
        'Makefile')
md5sums=(SKIP SKIP SKIP SKIP)

build() {
  mkdir -p include/linux/platform_data/
  mv bcm2079x.h include/linux/platform_data/
}

package() {
    find
  # Copy dkms.conf
  install -Dm644 dkms.conf "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/dkms.conf

  # Set name and version
  sed -e "s/@_PKGBASE@/${_pkgbase}/" \
      -e "s/@PKGVER@/${pkgver}/" \
      -i "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/dkms.conf

  # Copy sources (including Makefile)
  cp -r * "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/
}