summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1de3870f2e694362201dc539be5633e2a79e87a9 (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
# Maintainer: rouhannb <rouhannb@gmail.com>
_basename=joycon
pkgname="$_basename-git"
pkgver=r99.144b22d
pkgrel=4
pkgdesc='Joy-Con input driver'
arch=('x86_64')
url="https://github.com/riking/$_basename"
license=('unknown')
depends=('libsystemd')
makedepends=('go' 'git')
provides=("$_basename")
conflicts=("$_basename")
source=("git+https://github.com/riking/$_basename.git")
md5sums=('SKIP')

prepare() {
    cd "$srcdir/$_basename/prog4/jcdriver"
    GOPATH="$(pwd)" go get -d 
}

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

build() {
    cd "$srcdir/$_basename/prog4/jcdriver"
    GOPATH="$(pwd)" go build
}

package() {
    install -Dm755 "$srcdir/$_basename/prog4/jcdriver/jcdriver" "$pkgdir/usr/bin/jcdriver"
}