summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0012407355275f24998a9fcd37188087d1b62575 (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
# Maintainer: Hanna Reitz <hanna at xanclic dot moe>
pkgname=leddy-git
pkgver=r37.af5e28a
pkgrel=1
pkgdesc="Linux LED controller for the fnatic miniSTREAK keyboard"
arch=('x86_64' 'i686' 'arm' 'armv6h' 'armv7h' 'aarch64')
url="https://github.com/XanClic/leddy"
license=('GPL3')
depends=('libusb')
makedepends=('rust'
             'cargo'
             'git'
             'pkgconf')
provides=('leddy')
conflicts=('leddy')
source=("$pkgname::git://github.com/XanClic/leddy.git")
md5sums=('SKIP')

build() {
    cd "$pkgname"
    cargo build --release --locked --all-features
}

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

package() {
    cd "$pkgname"
    install -Dm 755 "target/release/leddy" -t "${pkgdir}/usr/bin"
}