updated on Tue Jan 17 08:05:08 UTC 2012
[aur-mirror.git] / agena / PKGBUILD
blob77b555677807f3573a37b0cdf0476fcc6fc169c9
1 # Contributor: Alexander Rødseth <rodseth@gmail.com>
2 pkgname=agena
3 pkgver=1.4.1
4 pkgrel=1
5 pkgdesc="A procedural programming language based on Lua"
6 arch=('x86_64' 'i686')
7 url="http://agena.sourceforge.net/"
8 license=('LGPL')
9 depends=('readline')
10 optdeps=("gnumeric: for reading /usr/share/doc/$pkgname/$pkgname.xls")
11 source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver-src.tar.gz"
12         "arch.patch")
13 md5sums=('b28b1d1d146791d0644300ba01049c4b'
14          'fa431cc8c7171ace90809cd2c1dbfa3d')
16 build() {
17   cd "$srcdir/$pkgname-$pkgver-src"
19   msg2 "Patching..."
20   patch -p1 < ../arch.patch
22   msg2 "Compiling..."
23   make -C src config
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
30   echo 'else' >> run
31   echo '  agena.elf $*' >> run
32   echo 'fi' >> run
34   msg2 "Creating script for /etc/profile.d..."
35   echo "export AGENAPATH=/usr/lib/agena" > $pkgname.sh
38 package() {
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: