# Maintainer: Martell Malone <martellmalone@gmail.com>

pkgname="fcode-utils"
pkgver=1.0.2
pkgrel=1
pkgdesc="The OpenBIOS FCODE suite"
arch=('i686' 'x86_64')
url="https://www.openbios.org/"
license=('GPL2')
makedepends=('make')
source=("${pkgname}-${pkgver}.tar.gz"::"https://github.com/openbios/fcode-utils/archive/v${pkgver}.tar.gz")
sha256sums=('8d9979c269a60a6e2b9dcfb50d1515d0e750e95d7d2690b36620a614b0c163bc')

build() {
  cd ${srcdir}/${pkgname}-${pkgver}
  make -j1
}

package() {
  cd ${srcdir}/${pkgname}-${pkgver}
  mkdir -p ${pkgdir}/usr/bin

  cp -rf ${srcdir}/${pkgname}-${pkgver}/toke/toke.exe ${pkgdir}/usr/bin/
  cp -rf ${srcdir}/${pkgname}-${pkgver}/detok/detok.exe ${pkgdir}/usr/bin/
  cp -rf ${srcdir}/${pkgname}-${pkgver}/romheaders/romheaders.exe ${pkgdir}/usr/bin/
}
