# Maintainer: Alexey Pavlov <alexpux@gmail.com>

pkgname=nasm
pkgver=2.16.03
pkgrel=1
pkgdesc="An 80x86 assembler designed for portability and modularity"
arch=('i686' 'x86_64')
url="https://www.nasm.us/"
msys2_repository_url="https://github.com/netwide-assembler/nasm"
msys2_changelog_url="https://nasm.us/doc/nasmdocc.html"
msys2_references=(
  'cpe: cpe:/a:nasm:netwide_assembler'
)
license=('spdx:BSD-2-Clause')
makedepends=('perl-Font-TTF' 'perl-Sort-Versions' 'autotools' 'gcc')
source=("https://www.nasm.us/pub/nasm/releasebuilds/${pkgver}/${pkgname}-${pkgver}.tar.xz")
sha256sums=('1412a1c760bbd05db026b6c0d1657affd6631cd0a63cddb6f73cc6d4aa616148')

build() {
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr
  make all -j1
}

package() {
  cd ${pkgname}-${pkgver}

  make DESTDIR="${pkgdir}" install
  install -D -m644 LICENSE "${pkgdir}"/usr/share/licenses/nasm/LICENSE
}
