# Maintainer (aur): Jean Lucas <jean@4ray.co>
# Maintainer: Parabola Hackers <dev@lists.parabola.nu>

# parabola changes and rationale:
# - Updated to version 1.0.3
# - Added armv7h support

pkgname=fcode-utils
pkgver=1.0.3
pkgrel=1
pkgdesc="Utilities to process FCODE, OpenFirmware's byte code"
arch=(armv7h i686 x86_64)
url=https://www.openfirmware.info/FCODE_suite
license=(GPL2)
depends=(glibc)
provides=(romheaders)
conflicts=(fcode-utils-git)
source=(https://github.com/openbios/fcode-utils/archive/v$pkgver.tar.gz)
sha512sums=('7f64d3ac5c10184efc0993a748a5dcbf9aa0b71dee059c9b97b3656e61cdd7ed9395e830435eab5878ece80df001cf9420065b1611e8bb011274e26aad20f3f0')

build() {
  cd $pkgname-$pkgver
  make
}

package() {
  cd $pkgname-$pkgver
  install -D detok/detok romheaders/romheaders toke/toke -t "$pkgdir"/usr/bin
  install -Dm 644 README -t "$pkgdir"/usr/share/doc/fcode-utils
  install -Dm 644 COPYING "$pkgdir"/usr/share/licenses/fcode-utils/LICENSE
}
