summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0383c734c7e49aef97a10e1dd0b3a34bc9559c4f (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: Gabriel-Andrew Pollo-Guilbert <gabrielpolloguilbert@gmail.com>

pkgname=beagle-logic-firmware-git
pkgver=r216.c52845a
pkgrel=1
pkgdesc='A logic analyzer for the PRUs on the BeagleBone / BeagleBone Black'
arch=('armv7h')
url='http://www.beaglelogic.net'
license=('custom')
makedepends=('git' 'cmake' 'ti-pru-cgt' 'ti-pru-swpkg')
provides=('beagle-logic-firmware')

source=('beagle-logic::git+https://github.com/gpollo/BeagleLogic#branch=cmake')
md5sums=('SKIP')

pkgver() {
    cd "${srcdir}/beagle-logic"

    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
    mkdir -p "${srcdir}/beagle-logic/firmware/build"
    cd "${srcdir}/beagle-logic/firmware/build"

    unset CFLAGS
    unset LDFLAGS

    cmake -DCMAKE_BUILD_TYPE=Release ..
    make
}

package() {
    mkdir -p "${pkgdir}/lib/firmware/"
    cd "${srcdir}/beagle-logic/firmware/build"

    install -Dm644 "beaglelogic-pru0" "${pkgdir}/lib/firmware/beaglelogic-pru0-fw"
    install -Dm644 "beaglelogic-pru1" "${pkgdir}/lib/firmware/beaglelogic-pru1-fw"
}