summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0e7dd1782fb134e3bac6efbe4a2b6b078511bd33 (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: Marco Pompili <marco@mg.odd.red>
# Contributor: Gautham Velchuru <gvelchuru@gmail.com>

pkgname=kiibohd-configurator-git
_pkgname=kiibohd-configurator
pkgver=r271.18ac1cd
pkgrel=2
pkgdesc="Client Side Configuration & Flashing Software for Kiibohd compatible keyboards"
arch=('x86_64')
url="https://github.com/kiibohd/configurator"
license=('GPL3')
depends=('dfu-util')
makedepends=('yarn' 'nodejs-lts-erbium')
conflicts=("${_pkgname}")
provides=("${_pkgname}")
source=("${pkgname}::git+https://github.com/kiibohd/configurator.git")
sha256sums=('SKIP')

#_pkg="${srcdir}/${pkgname}"
#cd "${_pkg}"
#cp -R * "${pkgdir}/usr/share/${_pkgname}"

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

build() {
  cd ${pkgname}
  yarn
  yarn dist:dir
}

package() {
  mkdir -p "${pkgdir}/opt"
  mv "${pkgname}/output/linux-unpacked" "${pkgdir}/opt/${pkgname}/"
  install -d "${pkgdir}/usr/bin"
  ln -s "/opt/${pkgname}/${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}"
}