summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 58ac1da6027387aa80dc273ed33be8c0623b3404 (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: yjun <jerrysteve1101 at gmail dot com>

pkgname=sonix-flasher-c-git
_gitname=SonixFlasherC
pkgver=1.1.0.r9.g548174b
pkgrel=1
pkgdesc="A CLI-based Flasher for Sonix 24x/26x MCUs."
arch=('x86_64' 'aarch64')
url="https://github.com/SonixQMK/SonixFlasherC"
license=('GPL-3.0')
depends=('glibc'
         'hidapi'
         'libudev.so=1')
source=("git+https://github.com/SonixQMK/SonixFlasherC")
provides=("sonix-flasher-c" "sonixflasher")
conflicts=("sonix-flasher-c" "sonixflasher")
sha256sums=('SKIP')

pkgver() {
  cd "$_gitname"
  git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "${_gitname}"
  make sonixflasher
}

package() {
  cd "${_gitname}"
  
  install -Dm755 sonixflasher -t "$pkgdir/usr/bin"
}
# vim: ts=2 sw=2 et: