summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3c0cfab70ec9ec0d2c42c9fd064ccc835ed1c232 (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
40
41
42
43
44
45
# Maintainer: Thomas Krug <t.krug@elektronenpumpe.de>
# Contributor: Thomas Krug <t.krug@elektronenpumpe.de>

pkgname=pinephone-keyboard-git
_pkgname=pinephone-keyboard
pkgver=r89.024d522
pkgrel=1
pkgdesc='FOSS Pinephone Keyboard Firmware and Tools'
url='https://xff.cz/git/pinephone-keyboard/about/'
license=('GPL')
arch=('i686' 'x86_64' 'aarch64')
makedepends=('php' 'sdcc')
#depends=()
source=("$_pkgname"::'git+https://xff.cz/git/pinephone-keyboard/')
conflicts=("$_pkgname")
provides=("$_pkgname")
sha256sums=('SKIP')

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

prepare() {
  cd "$srcdir/$_pkgname"

  # hack, don't build selftest
  mkdir -p build
  touch build/ppkb-i2c-selftest
}

build() {
  cd "$srcdir/$_pkgname"

  make
}

package() {
  cd "$srcdir/$_pkgname"

  mkdir -p "$pkgdir/usr/bin"
  cp build/ppkb* "$pkgdir/usr/bin/"

  rm "$pkgdir/usr/bin/ppkb-i2c-selftest"
}