summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorSteven Honeyman2015-06-09 19:10:24 +0100
committerSteven Honeyman2015-06-09 19:10:24 +0100
commitd9eb2019a05b15b3f87d8c3783fedfede88c5478 (patch)
tree61eb01ec1b1ddd81d6888e753ec3c9823b0f9035 /PKGBUILD
downloadaur-asmutils.tar.gz
Initial import
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD43
1 files changed, 43 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..8fff63096e6
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,43 @@
+# Maintainer: Steven Honeyman <stevenhoneyman at gmail com>
+
+pkgname=asmutils
+pkgver=0.18
+pkgrel=3
+pkgdesc="A 32-bit *NIX userland written in assembly"
+arch=('i686' 'x86_64')
+license=('GPLv2')
+url="http://asm.sourceforge.net/asmutils.html"
+makedepends=("nasm")
+options=('docs' 'staticlibs' '!strip')
+source=("http://asm.sourceforge.net/asmutils/asmutils-${pkgver}.tar.gz")
+md5sums=('a11c8fea347026449ecd2e5807e77d64')
+
+prepare() {
+ cd "$srcdir/$pkgname-$pkgver"
+ sed -i 's/24$/31/' MCONFIG
+ sed -i 's/gmake/make/' MCONFIG
+ sed -i 's/static //' lib/libm.c
+ if test "$CARCH" == x86_64; then
+ sed -i 's/LD := ld/& -melf_i386/' MCONFIG
+ sed -i 's/CC := gcc/& -m32/' MCONFIG
+ fi
+}
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ find . -name "*.asm" -delete
+ find . -name "*.o" -delete
+ find . -name "*.h" -delete
+ find . -name "*.c" -delete
+ find . -name "Makefile" -delete
+
+ mkdir -p "$pkgdir"/opt/asmutils/{bin,lib,doc}
+ cp -ar src/* "$pkgdir"/opt/asmutils/bin/
+ cp -ar lib "$pkgdir"/opt/asmutils/
+ cp -ar doc "$pkgdir"/opt/asmutils/
+}