1 # Maintainer: Peter Hatina <phatina@gmail.com>
6 pkgdesc="A new AVR simulator for linux, or any platform that uses avr-gcc"
8 url="http://gitorious.org/simavr"
10 depends=('gcc-avr' 'binutils-avr')
11 makedepends=('git' 'patch' 'make' 'gcc' 'elfutils' 'avr-libc' 'gcc-avr' 'binutils-avr')
12 source=('makefile.patch' 'avrgpp.patch')
13 md5sums=('5c1bcfa867a90bf03dcae1df4260018a'
14 'cee65ff88740cb75669b83b46a85846e')
17 _gitroot="git://gitorious.org/simavr/simavr.git"
22 msg "Connecting to GIT server...."
24 if [ -d $_gitname ] ; then
25 cd $_gitname && git pull origin
26 msg "The local files are updated."
28 git clone $_gitroot $_gitname
31 msg "GIT checkout done or server timeout"
32 msg "Starting make..."
34 rm -rf "$srcdir/$_gitname-build"
35 git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
36 cd "$srcdir/$_gitname-build"
38 # patching the makefile to find arch's avr root
39 patch -p1 -i $startdir/makefile.patch
40 patch -p1 -i $startdir/avrgpp.patch
46 # installing simavr binary
47 install -m755 -D $srcdir/$_gitname-build/simavr/run_avr $pkgdir/usr/bin/simavr
49 install -m755 -d -D $srcdir/$_gitname-build/tests $pkgdir/usr/share/simavr/tests
51 install -m755 -d -D $srcdir/$_gitname-build/include $pkgdir/usr/avr/include/simavr
52 cp -a $srcdir/$_gitname-build/include/* $pkgdir/usr/avr/include/simavr
53 # since the package doesn't provide a make install...
54 cp -a $srcdir/$_gitname-build/tests/* $pkgdir/usr/share/simavr/tests
56 install -m755 -d -D $srcdir/$_gitname-build/examples $pkgdir/usr/share/simavr/examples
58 cp -a $srcdir/$_gitname-build/examples/* $pkgdir/usr/share/simavr/examples