updated on Thu Jan 12 08:01:00 UTC 2012
[aur-mirror.git] / arduino / PKGBUILD
blob1ffe69deb2d12d5d02b1c3377c634711d62eeb54
1 # Maintainer: PyroPeter <googlemail.com@abi1789>
3 pkgname=arduino
4 epoch=1
5 pkgver=1.0
6 pkgrel=2
7 pkgdesc="Arduino SDK (includes patched avrdude and librxtx)"
8 arch=('i686' 'x86_64')
9 url="http://arduino.cc/en/Main/Software"
10 options=(!strip)
11 license=('GPL')
12 depends=('avr-libc' 'libusb-compat' 'java-runtime')
13 install="arduino.install"
14 source=("http://arduino.googlecode.com/files/arduino-$pkgver-linux.tgz"
15         "http://arduino.googlecode.com/files/arduino-$pkgver-linux64.tgz"
16         'arduino'
17         'arduino.png'
18         'arduino.desktop')
19 md5sums=('dc5085c25aab1dcb267e0f0fa4af468e' '14336316af4cc4aef5f879afed9dd7ea' '551304dc658224c867513f6099075f0e' '9e36d33891d5e68d38ec55d1494499a5' 'eebc4d6495864bea99ad057af801afb9')
21 if   [ "$CARCH" == 'i686' ]; then
22   unset source[1]
23   unset md5sums[1]
24 elif [ "$CARCH" == 'x86_64' ]; then
25   unset source[0]
26   unset md5sums[0]
29 package() {
30   cd "$srcdir/arduino-$pkgver"
31   mkdir -p "$pkgdir"/usr/{bin,share/{doc,applications,pixmaps}}
32   
33   # arduino excutable should accept arguments
34   sed -i 's/^java .* processing.app.Base$/\0 "$*"/' arduino
35   
36   # remove the ugly __MACOSX folder
37   rm -r ./__MACOSX
39   # copy the whole SDK to /usr/share/arduino/
40   cp -r . "$pkgdir/usr/share/arduino"
41   
42   # at least support the FHS a little bit:
43   install -m755 "$srcdir/arduino" "$pkgdir/usr/bin/arduino"
44   ln -s /usr/share/arduino/reference "$pkgdir/usr/share/doc/arduino"
45   
46   # desktop icon
47   install -m644 "$srcdir/arduino.desktop" "$pkgdir/usr/share/applications/"
48   install -m644 "$srcdir/arduino.png" "$pkgdir/usr/share/pixmaps/"