updated on Tue Jan 10 04:01:21 UTC 2012
[aur-mirror.git] / adept-runtime / PKGBUILD
bloba0916c13783f76abe7edacd43216b32153bd72dd
1 # Maintainer: fishfish <chiizufish of the gmail variety>
2 pkgname=adept-runtime
3 pkgver=2.8.2
4 pkgrel=4
5 pkgdesc="core runtime necessary to communicate with Digilent system boards"
6 arch=('i686' 'x86_64')
7 url="http://www.digilentinc.com/Products/Detail.cfm?NavPath=2,66,828&Prod=ADEPT2"
8 license=('custom')
9 depends=('libusb>=1.0' 'libftd2xx')
10 install=adept-runtime.install
12 # hack to make sure a valid URL shows up
13 # on the AUR page - taken from the Dropbox PKGBUILD
14 _arch=i686
15 [[ $CARCH == x86_64 ]] && _arch=x86_64
16 source=("http://www.digilentinc.com/Data/Products/ADEPT2/digilent.adept.runtime_2.8.2-$_arch.tar.gz")
18 md5sums=('900ca1fac221b72ba89ff0ea2ac71d0c')
19 [[ $CARCH == x86_64 ]] && md5sums[0]='382f05e5ad9a38f70ecdd60fa05da645'
21 package() {
22   cd "$srcdir/digilent.adept.runtime_$pkgver-$CARCH"
24   # shared libraries
25   mkdir -p "$pkgdir/usr/lib/digilent/adept"
26   if [[ $CARCH == i686 ]]; then
27     cp -d lib/* "$pkgdir/usr/lib/digilent/adept"
28   elif [[ $CARCH == x86_64 ]]; then
29     cp -d lib64/* "$pkgdir/usr/lib/digilent/adept"
30   fi
31   chmod -R 755 "$pkgdir/usr/lib/digilent/adept"
33   # firmware images
34   mkdir -p "$pkgdir/usr/share/digilent/data/firmware"
35   install -m 644 data/firmware/*.HEX "$pkgdir/usr/share/digilent/data/firmware"
37   # JTSC device list
38   install -m 644 data/jtscdvclist.txt "$pkgdir/usr/share/digilent/data"
40   # CoolRunner support files
41   mkdir "$pkgdir/usr/share/digilent/data/xpla3"
42   install -m 644 data/xpla3/*.map "$pkgdir/usr/share/digilent/data/xpla3"
44   # CoolRunner 2 support files
45   mkdir "$pkgdir/usr/share/digilent/data/xbr"
46   install -m 644 data/xbr/*.map "$pkgdir/usr/share/digilent/data/xbr"
48   # Adept runtime configuration file
49   mkdir "$pkgdir/etc"
50   sed -i 's_usr/local/share_usr/share_' digilent-adept.conf
51   install -m 644 digilent-adept.conf "$pkgdir/etc"
53   # module unloader binary
54   # ("This application detaches any kernel drivers that are attached
55   #   to the interfaces of the device, ensuring that the Runtime will
56   #   be able to communicate with the device using libusb.")
57   mkdir "$pkgdir/usr/sbin"
58   if [[ $CARCH == i686 ]]; then
59     install -m 755 bin/dftdrvdtch "$pkgdir/usr/sbin"
60   elif [[ $CARCH == x86_64 ]]; then
61     install -m 755 bin64/dftdrvdtch "$pkgdir/usr/sbin"
62   fi
64   # udev rules
65   mkdir -p "$pkgdir/etc/udev/rules.d"
66   # the udev script uses the legacy SYSFS attribute; replace it with
67   # the newer ATTR syntax
68   sed -i 's_usr/local/sbin_usr/sbin_; s_SYSFS_ATTR_g' 52-digilent-usb.rules
69   install -m 644 52-digilent-usb.rules "$pkgdir/etc/udev/rules.d"
71   # library configuration file
72   mkdir "$pkgdir/etc/ld.so.conf.d"
73   sed -i -e 's_local/lib_lib_' -e '/lib64/,$d' digilent-adept-libraries.conf
74   if [[ $CARCH == x86_64 ]]; then
75     sed -i 's_32-bit_64-bit_' digilent-adept-libraries.conf
76   fi
77   install -m 644 digilent-adept-libraries.conf "$pkgdir/etc/ld.so.conf.d"
79   # EULA
80   mkdir -p "$pkgdir/usr/share/licenses/adept-runtime"
81   install -m 644 EULA "$pkgdir/usr/share/licenses/adept-runtime"
84 # vim:set ts=2 sw=2 et: