updated on Wed Jan 11 00:07:16 UTC 2012
[aur-mirror.git] / saleae-logic / PKGBUILD
blob8103353422ea116eee548a058150844d0b5ea7c0
1 # Contributor: Kyle Keen <keenerd@gmail.com>
2 pkgname=saleae-logic
3 pkgver=1.1.15
4 pkgrel=1
5 pkgdesc="High speed USB logic analyzer."
6 arch=(i686 x86_64)
7 url="http://www.saleae.com/"
8 license=('unknown')  # closed source, none given
9 depends=('fontconfig' 'gtk2' 'libpng' 'libsm' 'libxau' 'libxdmcp' 'pixman' 'util-linux-ng' 'xcb-util')  # scary list courtesty of ldd
10 makedepends=()
12 case $CARCH in
13   'i686')
14     source=("http://www.saleae.com/downloads/logic/Logic $pkgver (32-bit).zip" \
15             "http://www.saleae.com/downloads/logic/Logic Guide.pdf")
16     md5sums=('70f5cf72c77d9d54777e419fe84e2c21'
17              'bf4b871b45c18a108c00c5fc710a3a99')
18     __arch='' ;;
19   'x86_64')
20     source=("http://www.saleae.com/downloads/logic/Logic $pkgver (64-bit).zip" \
21             "http://www.saleae.com/downloads/logic/Logic Guide.pdf")
22     md5sums=('99f709c340e2e0872e02534e2ec6ca77'
23              'bf4b871b45c18a108c00c5fc710a3a99')
24     __arch=' (64-bit)' ;;
25 esac
27 package() {
28   # for now, it needs /opt
29   cd "$srcdir/Logic $pkgver$__arch"
30   install -d "$pkgdir/opt/saleae-logic"
31   install -d "$pkgdir/usr/share/doc/saleae-logic"
32   cp -r ./ "$pkgdir/opt/saleae-logic/"
33   touch "$pkgdir/opt/saleae-logic/Settings/settings.xml"
34   chmod 0666 "$pkgdir/opt/saleae-logic/Settings/settings.xml"
35   # docs
36   install -Dm644 ../../*.pdf "$pkgdir/usr/share/doc/saleae-logic/"
37   # udev
38   install -Dm644 Drivers/99-SaleaeLogic.rules "$pkgdir/etc/udev/rules.d/99-SaleaeLogic.rules" 
39   # launch script
40   install -d "$pkgdir/usr/bin"
41   touch "$pkgdir/usr/bin/logic"
42   echo -e "#!/bin/sh\n/opt/saleae-logic/Logic > /dev/null 2>&1" > "$pkgdir/usr/bin/logic"
43   chmod +x "$pkgdir/usr/bin/logic"