archrelease: copy trunk to community-any
[ArchLinux/community.git] / libftdi / repos / community-x86_64 / PKGBUILD
blob248f58c2222525ad411750c581ca3595a0ed7d74
1 # Maintainer: Kyle Keen <keenerd@gmail.com>
3 pkgname=libftdi
4 pkgver=1.5
5 pkgrel=5
6 pkgdesc="A library to talk to FTDI chips, optional python bindings."
7 arch=('x86_64')
8 url="https://www.intra2net.com/en/developer/libftdi/download.php"
9 license=('GPL2' 'LGPL2.1')
10 depends=('libusb' 'confuse')
11 optdepends=('python: library bindings')
12 makedepends=('boost' 'cmake' 'python' 'swig')
13 # doxygen for docs, confuse for eeprom
14 source=(https://www.intra2net.com/en/developer/libftdi/download/${pkgname}1-$pkgver.tar.bz2{,.sig}
15         fix_includes_path.patch)
16 sha256sums=('7c7091e9c86196148bd41177b4590dccb1510bfe6cea5bf7407ff194482eb049'
17             'SKIP'
18             '065a157326f28c61d1ec470a3064b0cb2fd3c13497a9b496ca76a9dac573de07')
19 validpgpkeys=('3CEA9B8868BC3852618EB5B4707F91A424F006F5')  # Intra2net open source
21 prepare() {
22   cd "${pkgname}1-$pkgver"
23   sed -i 's|LIB_SUFFIX 64|LIB_SUFFIX ""|' CMakeLists.txt
24   sed -i "s|MODE=\"0664\", GROUP=\"plugdev\"|TAG+=\"uaccess\"|g" packages/99-libftdi.rules
26   patch -p1 < ../fix_includes_path.patch
29 build() {
30   cd "$srcdir/${pkgname}1-$pkgver"
31   mkdir -p build
32   cd build
33   cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_SKIP_BUILD_RPATH=ON \
34     -DCMAKE_BUILD_TYPE=Release -DEXAMPLES=OFF -DFTDI_EEPROM=ON \
35     -DFTDIPP=ON -DPYTHON_BINDINGS=ON -DLINK_PYTHON_LIBRARY=ON
36   make
39 # needs yet unknown dependencies
40 #check() {
41 #  cd "$srcdir/${pkgname}1-$pkgver/build"
42 #  make check
45 package() {
46   cd "${pkgname}1-$pkgver/build"
48   make DESTDIR="$pkgdir" install
49   install -Dm644 "../packages/99-libftdi.rules" "$pkgdir/usr/lib/udev/rules.d/69-libftdi.rules"
50   # FS#45053
51   install -d "$pkgdir/usr/share/libftdi/examples" 
52   cp -r ../examples/* "$pkgdir/usr/share/libftdi/examples"