summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d343ff780b544a4b5ea82757b280b75a2e0d1d7c (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: Luke Street <luke.street@encounterpc.com>
# Contributor: David Manouchehri
# Contributor: anatolik
# Contributor: fill <mailbox@fillo.ru>

_gitname=flashrom
pkgname="${_gitname}-git"
_gitbranch=master
_gitauthor=flashrom
pkgdesc="A utility to detect, read, erase, or write BIOS chips (DIP, PLCC, SPI)"
url="https://github.com/${_gitauthor}/${_gitname}"
license=('GPL-2.0-only')
source=("git+https://github.com/${_gitauthor}/${_gitname}#branch=${_gitbranch}")
depends=('libftdi' 'pciutils')
makedepends=('git' 'meson' 'cmocka' 'python-sphinx')
optdepends=("dmidecode: for SMBIOS/DMI table decoder support")
conflicts=("${_gitname}")
provides=("${_gitname}")
sha512sums=('SKIP')
arch=('aarch64' 'armv6h' 'armv7h' 'i686' 'x86_64')
pkgver=1.2.1355.g9ccbf1cf
pkgrel=1

pkgver() {
  cd "${srcdir}/${_gitname}"
  (
    set -o pipefail
    git describe --long 2>/dev/null | sed 's/v\(.*\)/\1/;s/-/./g' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

build() {
  cd "${srcdir}/${_gitname}"
  export CFLAGS="-Wno-error=calloc-transposed-args $CFLAGS"
  arch-meson ../build
  ninja -v -C ../build
}

package() {
  cd "${srcdir}"
  DESTDIR="${pkgdir}" ninja -C build install
}

# vim:set et sw=2 sts=2 tw=80: