summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9be45806f399192e5dba248a366feedbc2b87a14 (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
# Maintainer: Rafael Silva <perigoso@riseup.net>

_pkgname='bmpflash'
pkgname="${_pkgname}-git"
pkgver=r240.33192d1
pkgrel=1
pkgdesc='A command line utility for setting up the on-board Flash of BMP v2.3+ hardware for use in standalone mode'
arch=('any')
url="https://github.com/blackmagic-debug/${_pkgname}"
license=('BSD-3-Clause')
depends=('libusb')
makedepends=('git' 'meson')
source=("git+https://github.com/blackmagic-debug/${_pkgname}.git")
b2sums=('SKIP')

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

prepare() {
	cd "${_pkgname}"

	meson subprojects download
}

build() {
	arch-meson "${_pkgname}" build
	meson compile -C build
}

package() {
	# Not currently supported by upstream
	# meson install -C build --destdir "${pkgdir}"
	install -Dm755 "build/src/${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}"
	install -Dm644 "${_pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
}