summaryrefslogtreecommitdiff
path: root/extra/libftdi/PKGBUILD
blob: 76e3f588b2fbeefb3c6cff3d1e41e94c12762437 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# $Id: PKGBUILD 200729 2013-12-03 16:51:00Z eric $
# Maintainer:

pkgname=libftdi
pkgver=1.0
pkgrel=2
pkgdesc="A library to talk to FTDI chips"
arch=('i686' 'x86_64')
url="http://www.intra2net.com/en/developer/libftdi/download.php"
license=('GPL2' 'LGPL2.1')
depends=('libusbx')
makedepends=('boost' 'cmake')
source=(http://www.intra2net.com/en/developer/libftdi/download/${pkgname}1-$pkgver.tar.bz2{,.sig})
sha1sums=('5be76cfd7cd36c5291054638f7caf4137303386f'
          'SKIP')

prepare() {
  cd ${pkgname}1-$pkgver
  sed -i 's|LIB_SUFFIX 64|LIB_SUFFIX ""|' CMakeLists.txt
}

build() {
  cd ${pkgname}1-$pkgver
  mkdir build
  cd build
  cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_SKIP_BUILD_RPATH=ON -DCMAKE_BUILD_TYPE=Release
  make
}

package() {
  cd ${pkgname}1-$pkgver/build
  make DESTDIR="$pkgdir" install
  find examples -type f -perm -755 -exec install {} "$pkgdir/usr/bin" \;
  # Remove eepreom (conflict with i2c-tools FS#37925)
  rm "$pkgdir/usr/bin/eeprom"
}