pkgname=nasm
pkgver=3.01
pkgdesc='80x86 assembler designed for portability and modularity'
arch=(x86_64)
homepage='https://www.nasm.us'
license=(BSD-2-Clause)
depends=(glibc zlib)
makedepends=(
  diffutils
)
sources=("${pkgname}-${pkgver}.tar.xz")
urls=("https://www.nasm.us/pub/nasm/releasebuilds/${pkgver}/${sources[0]}")
md5sums=("8414016d6ad0e113958c29066dfcc550")

src_prepare() {
  tar -xf ${distdir}/${sources[0]} --strip-components=1
}

src_build() {
  ./configure \
    --prefix=/usr \
    --docdir=/usr/share/doc/${pkgname} \
    --htmldir=/usr/share/doc/${pkgname}/html

  make
}

src_check() {
  make -j1 -C test
}

src_install() {
  make DESTDIR="${pkgdir}" install
  install -Dm 644 LICENSE -t "${pkgdir}"/usr/share/licenses/nasm
}

# vim:ft=sh syn=sh et sw=2:
