summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: dd28802a93a0ce9c07292d08d657c78b9d0ac328 (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
42
43
44
45
46
47
# Maintainer: Kye Hunter <kye(dot)evan(dot)hunter(at)gmail(dot)com>
# TODO needs a .install file, but I'll to see how things perform when upgrading kernel

pkgname=snd-hda-macbookpro-dkms-git
pkgver=0.1
pkgver() {
    sed -nr '/PACKAGE_VERSION/s/^.*="(.*)"$/\1/p' ${srcdir}/snd_hda_macbookpro/dkms.conf
}
pkgrel=1
pkgdesc="Kernel driver for sound on Macs with Cirrus 8409 HDA chips"
arch=(any)
url="https://github.com/davidjo/snd_hda_macbookpro"
license=('unknown')
install='snd_hda_macbookpro.install'
depends=(
    'git'
    'gcc'
    'make'
    'patch'
    'wget'
    'dkms'
)
makedepends=()
source=('git+https://github.com/davidjo/snd_hda_macbookpro.git')
sha256sums=('SKIP')

package() {
    for file in $(ls -p ${srcdir}/snd_hda_macbookpro | grep -v '/$') ; do 
        install -D -m0644 -t \
            "${pkgdir}"/usr/src/snd-hda-macbookpro-${pkgver} \
            ${srcdir}/snd_hda_macbookpro/"$file"
    done
    for file in $(ls -p ${srcdir}/snd_hda_macbookpro/patches | grep -v '/$') ; do
        install -D -m0644 -t \
            "${pkgdir}"/usr/src/snd-hda-macbookpro-${pkgver}/patches \
            ${srcdir}/snd_hda_macbookpro/patches/"$file"
    done
    for file in $(ls -p ${srcdir}/snd_hda_macbookpro/patch_cirrus | grep -v '/$') ; do
        install -D -m0644 -t \
            "${pkgdir}"/usr/src/snd-hda-macbookpro-${pkgver}/patch_cirrus \
            ${srcdir}/snd_hda_macbookpro/patch_cirrus/"$file"
    done
    install -D -m0755 -t \
        "${pkgdir}"/usr/src/snd-hda-macbookpro-${pkgver} \
        "${srcdir}/snd_hda_macbookpro/install.cirrus.driver.sh"
}