#!/bin/bash # Slackware build script for fasm # Written by B. Watson (urchlay@slackware.uk) # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. # Note: the source archive includes the full source plus prebuilt 32- # and 64-bit binaries. This SlackBuild uses the prebuilt binary to # bootstrap the binary it's going to install. # I almost didn't bother with an x86_64 option. The assembler is # 32-bit but fully static, will run fine on 64-bit without multilib, # and there doesn't seem to be any advantage to using the 64-bit # native binary... but upstream provides it, so I do too. Plus the # tools need help on Slackware64 due to lack of multilib. # 20240208 bkw: updated for v1.73.32. # 20230822 bkw: updated for v1.73.31. # 20230102 bkw: updated for v1.73.30. cd $(dirname $0) ; CWD=$(pwd) PRGNAM=fasm VERSION=${VERSION:-1.73.32} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac fi # Build will fail on non-x86/x86_64. Let's fail ASAP though, not # bother to extract the source. case "$ARCH" in i?86|x86_64) ;; # OK *) cat < $PKG/usr/man/man1/$PRGNAM.1.gz PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION mkdir -p $PKGDOC mv tools/readme.txt tools-readme.txt cp -a *.txt tools/*.txt examples $PKGDOC cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE