updated on Sat Jan 14 00:11:12 UTC 2012
[aur-mirror.git] / libftd2xx / PKGBUILD
blob2a01bac5be737f2178dff33da72831f3706c5ec6
1 # Maintainer: Olivier EBLE <olivier.eble at gmail com>
2 # Contributor: Laszlo Papp <djszapi2 at gmail com>
3 pkgname=libftd2xx
4 pkgver=1.0.4
5 pkgrel=1
6 pkgdesc="Library that allows a direct access to a USB FTDI2XX chip based device"
7 arch=('i686' 'x86_64')
8 url="http://www.ftdichip.com/"
9 license=('GPL')
10 depends=('libusb>=1.0.8')
11 if [ "$CARCH" = "x86_64" ]; then
12         depends=("${depends[@]}" 'lib32-glibc' 'lib32-libusb>=1.0.8')
13 else
14         depends=("${depends[@]}" 'glibc')
16 options=(!strip)
17 install=libftd2xx.install
18 source=(http://www.ftdichip.com/Drivers/D2XX/Linux/${pkgname}${pkgver}.tar.gz
19         55-ft2232.rules)
20 md5sums=('348bc4e27783cba67d0a8bf80ab280c4'
21          '51861263902e6220c17d8241030fec29')
23 package() {
24   cd "${srcdir}/${pkgname}${pkgver}"
25   install -d "${pkgdir}/usr/local/lib"
26   install -d ${pkgdir}/usr/{lib,include}
27   if [ "$CARCH" = "x86_64" ]; then
28         cd build/x86_64
29   else
30         cd build/i386
31   fi
32   
33   install -Dm755 ${pkgname}.so.${pkgver} ${pkgdir}/usr/lib/${pkgname}.so.${pkgver}
34   ln -sf /usr/lib/${pkgname}.so.${pkgver} ${pkgdir}/usr/lib/${pkgname}.so
35   
36   install -Dm644 ${pkgname}.a ${pkgdir}/usr/lib/${pkgname}.a
37   
38   cd ../..
39   install -m644 {ftd2xx,WinTypes}.h ${pkgdir}/usr/include/
40   install -D -m755 ${srcdir}/55-ft2232.rules ${pkgdir}/etc/udev/rules.d/55-ft2232.rules