1 # Contributor: Alexander Rødseth <rodseth@gmail.com>
5 pkgdesc="A procedural programming language based on Lua"
7 url="http://agena.sourceforge.net/"
10 optdeps=("gnumeric: for reading /usr/share/doc/$pkgname/$pkgname.xls")
11 source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver-src.tar.gz"
13 md5sums=('b28b1d1d146791d0644300ba01049c4b'
14 'fa431cc8c7171ace90809cd2c1dbfa3d')
17 cd "$srcdir/$pkgname-$pkgver-src"
20 patch -p1 < ../arch.patch
24 make CFLAGS+="-fPIC" -C src linux
26 msg2 "Creating wrapperscript..."
27 echo '#!/bin/sh' > run
28 echo 'if [ ! -f $AGENAPATH/library.agn ]; then' >> run
29 echo ' AGENAPATH=/usr/lib/agena agena.elf $*' >> run
31 echo ' agena.elf $*' >> run
34 msg2 "Creating script for /etc/profile.d..."
35 echo "export AGENAPATH=/usr/lib/agena" > $pkgname.sh
39 cd "$srcdir/$pkgname-$pkgver-src"
41 msg2 "Packaging scripts..."
42 install -Dm755 $pkgname.sh "$pkgdir/etc/profile.d/$pkgname.sh"
43 install -Dm755 run "$pkgdir/usr/bin/$pkgname"
45 msg2 "Packaging include files..."
46 mkdir -p "$pkgdir/usr/include/"
47 cp include/*.h "$pkgdir/usr/include"
49 msg2 "Packaging executables..."
50 install -Dm755 src/$pkgname "$pkgdir/usr/bin/$pkgname.elf"
51 install -Dm644 src/lib$pkgname.so "$pkgdir/usr/lib/lib$pkgname.so"
53 msg2 "Packaging library files..."
54 mkdir -p "$pkgdir/usr/lib/$pkgname/"
55 cp lib/* "$pkgdir/usr/lib/$pkgname/"
57 msg2 "Packaging documentation..."
58 mkdir -p "$pkgdir/usr/share/doc/$pkgname/"
59 cp doc/$pkgname* "$pkgdir/usr/share/doc/$pkgname/"
61 msg2 "Packaging icons..."
62 mkdir -p "$pkgdir/usr/share/pixmaps/"
63 cp share/*.png "$pkgdir/usr/share/pixmaps/"
64 cp share/*.gif "$pkgdir/usr/share/pixmaps/"
66 msg2 "Packaging license..."
67 install -Dm644 src/licence \
68 "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
71 # vim:set ts=2 sw=2 et: