summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6e26aae0d8509cea10406f5d1ff17f555ddd29ac (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
# Maintainer: hexchain <arch at hexchain dot org>

_pkgbase=apple-ib-drv
pkgname=${_pkgbase}-dkms-git
pkgver=r305.fc9aefa
pkgrel=1
pkgdesc="Apple iBridge devices support (Touchbar/ALS) for MacBook Pro 2018 and onward"
url="https://github.com/t2linux/apple-ib-drv"
license=('GPL2')
arch=('x86_64')
groups=('apple-t2')
depends=('dkms' 'pahole')
source=("git+https://github.com/t2linux/apple-ib-drv#branch=mbp15")
sha256sums=('SKIP')

pkgver() {
    cd "$_pkgbase"
    (
        set -o pipefail
        git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
        printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
    )
}

package() {
    cd "$_pkgbase"

    install -dm755 "$pkgdir/usr/src/$_pkgbase-$pkgver"
    cp -rv --no-preserve=ownership * "$pkgdir/usr/src/$_pkgbase-$pkgver/"
}