summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f6bfa7f1abf11fe4b6d09b3e9cb1d5c5f0034a6c (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: Massimo Pavoni <real.damax@gmail.com>

_pkgname=wb32-dfu-updater_cli
pkgname="$_pkgname-git"
pkgver=1.0.0.r16.g76ce8d2
pkgrel=1
pkgdesc="USB programmer for downloading and uploading firmware to/from USB devices."
arch=(x86_64 aarch64)
url="https://github.com/WestberryTech/wb32-dfu-updater"
license=('Apache-2.0')
makedepends=(
  'cmake'
  'libusb'
)
provides=("$_pkgname")
_pkgsrc="wb32-dfu-updater"
source=("git+https://github.com/WestberryTech/wb32-dfu-updater.git")
sha256sums=('SKIP')

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

build() {
  local _cmake_options=(
    -B build
    -S "$_pkgsrc"
    -G Ninja
    -DCMAKE_BUILD_TYPE=None
    -Wno-dev
  )
  cmake "${_cmake_options[@]}"
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
}