summaryrefslogtreecommitdiff
path: root/pcr/flashprog/PKGBUILD
blob: 8c270fd11f6da6a33611e758a610545d15f28d84 (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
# Maintainer (aur): Nico Huber <nico.h@gmx.de>
# Maintainer: Wael Karram <wael AT waelk.tech>


# Parabola Changes and Rationale
# 1) Clarified license version (GPLv2 only).
# 2) Dropped unsupported architectures.
# 3) removed support for incompatible 'libgpiod'


pkgname="flashprog"
pkgdesc="utility which can be used to detect, read, erase, or write BIOS chips (DIP, PLCC, SPI)"
pkgver=1.0.1
pkgrel=1
url="https://flashprog.org/"
license=('GPL2')
source=(http://flashprog.org/releases/flashprog-v1.0.1.tar.bz2{,.asc})
validpgpkeys=('2853079C9C66AB7E82C64966A5C163B7E557CAEB')
sha256sums=('888863dfc254a9dd7c00dfdac8a31a74879c31db5c16375fb3f216347c03cc71'
            'SKIP')
depends=('pciutils' 'libusb' 'libftdi' 'libjaylink' 'libgpiod')
depends=( ${depends[*]/libgpiod/} ) # libgpiod >=2.0 is incompatible
optdepends=("dmidecode: for SMBIOS/DMI table decoder support")
arch=('riscv64' 'aarch64' 'armv6h' 'armv7h' 'i686' 'x86_64')
arch=( ${arch[*]/armv6h/} )


build() {
	cd "${srcdir}/${pkgname}-v${pkgver}"
	make CONFIG_LINUX_GPIO_SPI=no
}

package() {
	cd "${srcdir}/${pkgname}-v${pkgver}"
	install -d "${pkgdir}/usr/bin"
	install -d "${pkgdir}/usr/man/man8"
	install -m 0755 flashprog "${pkgdir}/usr/bin/"
	install -m 0644 flashprog.8 "${pkgdir}/usr/man/man8/"

	# armv7h fails to build 'ich_descriptors_tool'
	[[ "${CARCH}" == armv7h ]] ||
	install -m 0755 util/ich_descriptors_tool/ich_descriptors_tool "${pkgdir}/usr/bin/"
}