updated on Tue Jan 24 16:10:37 UTC 2012
[aur-mirror.git] / python2-ftdi / PKGBUILD
blob552f8a291ae571a02dd7d29ae2966124ec2bb3ef
1 #Maintainer: Randy Heydon <randy.heydon at clockworklab dot net>
2 #Based on the PKGBUILD created for libftdi.
3 pkgname=python2-ftdi
4 pkgver=0.19
5 pkgrel=1
6 pkgdesc="Python bindings to libftdi"
7 arch=("i686" "x86_64")
8 url="http://www.intra2net.com/en/developer/libftdi/download.php"
9 license=("GPL2" "LGPL2.1")
10 depends=("libftdi" "python2")
11 makedepends=("swig")
12 options=('!libtool')
13 source=("http://www.intra2net.com/en/developer/libftdi/download/libftdi-$pkgver.tar.gz")
14 md5sums=('e6e25f33b4327b1b7aa1156947da45f3')
15 sha1sums=('0f08caf8e754ace69cd682489fae3f7f09920fe1')
17 build() {
18   cd "$srcdir/libftdi-$pkgver"
19   sed -i '/no-install/d' examples/Makefile.in
20   #Have configure look for the python2 executable first.
21   #Many more changes are needed to make it work with python3.
22   sed -i 's/python python2/python2/' configure
23   ./configure --prefix=/usr --enable-python-binding
24   make
27 package() {
28   cd "$srcdir/libftdi-$pkgver"
29   make DESTDIR="$pkgdir" install
31   #Strip out all non-python components
32   cd $pkgdir
33   #rm -r `ls --hide=usr`
34   cd usr
35   rm -r `ls --hide=lib`
36   cd lib
37   rm -r `ls --hide=python2.[0-9]`