From f9cd962a177963870a1e2685ce4bf7531d673956 Mon Sep 17 00:00:00 2001 From: Manuel Palenzuela Date: Tue, 15 Oct 2019 14:08:48 +0100 Subject: Almost final fix pkbuild --- PKGBUILD | 19 +++++++++++++++++-- aasm/PKGBUILD | 18 +++++++++++++++--- hello.s | 7 ------- patch_aasm.patch | 0 4 files changed, 32 insertions(+), 12 deletions(-) delete mode 100644 hello.s delete mode 100644 patch_aasm.patch diff --git a/PKGBUILD b/PKGBUILD index ce4a370..ebe8be7 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -19,16 +19,31 @@ md5sums=( ) prepare() { + mkdir -p "$pkgdir/usr/local/kmd" cd "KMD-$pkgver" } build() { cd "KMD-$pkgver" - ./configure --prefix=/usr --build=i386 + ./configure --prefix=/usr/local/kmd --build=i386 make + +cat << EOS > kmd_run +#!/bin/sh +KMD_DIR=/usr/local/kmd +CURR_DIR=\$(pwd) +cd "\$KMD_DIR" +./kmd -e jimulator +cd "\$CURR_DIR" +EOS } package() { cd "KMD-$pkgver" - make DESTDIR="$pkgdir/" install + install -Dm755 kmd_run "$pkgdir/usr/bin/kmd" + make DESTDIR="$pkgdir" install + mv "$pkgdir/usr/local/kmd/bin/kmd" "$pkgdir/usr/local/kmd/" + mv "$pkgdir/usr/local/kmd/bin/jimulator" "$pkgdir/usr/local/kmd/" + mv "$pkgdir/usr/local/kmd/bin/flash" "$pkgdir/usr/local/kmd/" + rm -rf "$pkgdir/usr/local/kmd/bin" } diff --git a/aasm/PKGBUILD b/aasm/PKGBUILD index 6480123..0297477 100644 --- a/aasm/PKGBUILD +++ b/aasm/PKGBUILD @@ -1,4 +1,4 @@ -# Maintainer: bill +#Maintainer: bill pkgname=kmd-compile-aasm pkgver=20120816 pkgrel=1 @@ -20,13 +20,25 @@ build() { #!/bin/sh FNAME=\$(echo "\$1" | sed s/.s//g) aasm -lk "\$FNAME.kmd" "\$1" +EOS + cat << EOS > kmd_compile_script +#!/bin/sh +KMD_DIR=/usr/local/kmd +CURR_DIR=\$(pwd) +FILE=\$(realpath \$1) +cd "\$KMD_DIR" +./kmd_compile \$FILE + cd "\$CURR_DIR" EOS } package() { + mkdir -p "$pkgdir/usr/local/kmd" cd "$srcdir/aasm" + cp aasm "$pkgdir/usr/local/kmd/aasm" + install -Dm755 kmd_compile_script "$pkgdir/usr/bin/kmd_compile" install -Dm755 aasm "$pkgdir/usr/bin/aasm" - install -Dm755 kmd_compile "$pkgdir/usr/bin/kmd_compile" - #install -Dm755 mnemonics "$pkgdir/usr/bin/mnemonics" + install -Dm755 kmd_compile "$pkgdir/usr/local/kmd/kmd_compile" + install -Dm755 mnemonics "$pkgdir/usr/local/kmd/mnemonics" } diff --git a/hello.s b/hello.s deleted file mode 100644 index 0349994..0000000 --- a/hello.s +++ /dev/null @@ -1,7 +0,0 @@ - B main -hello DEFB "HELLO\n",0 - - ALIGN -main ADR R0, hello - SWI 3 - SWI 2 diff --git a/patch_aasm.patch b/patch_aasm.patch deleted file mode 100644 index e69de29..0000000 -- cgit 1.4.1