Luna/ports/nasm/package.sh

41 lines
659 B
Bash
Raw Normal View History

2022-10-30 17:14:57 +00:00
pkgname="nasm"
pkgver="2.15.05"
pkgurl="https://www.nasm.us/pub/nasm/releasebuilds/$pkgver/nasm-$pkgver.tar.gz"
pkgmode="web"
setupdir="$workdir"
builddir="$workdir/build"
installdir="$workdir/build"
srcdir="$workdir/nasm-$pkgver"
port_unpack()
{
tar xvf nasm-$pkgver.tar.gz
}
port_patch()
{
patch -u -i $portdir/nasm.patch -p 1 -d $workdir
}
port_configure()
{
$srcdir/configure --host=x86_64-luna --prefix=""
}
port_build()
{
make -j$(nproc)
}
port_install()
{
make install
$STRIP $DESTDIR/bin/{nasm,ndisasm}
}
port_uninstall() # nasm's Makefile does not provide an uninstall target.
{
rm -f $DESTDIR/bin/{nasm,ndisasm}
2022-10-30 17:14:57 +00:00
}