updated on Tue Jan 10 12:02:00 UTC 2012
[aur-mirror.git] / pyusb-svn / PKGBUILD
blob9bb6664a08d2a49af1eb3f3752914e7d909fb29f
1 # Maintainer: Tim Hatch <tim@timhatch.com>
2 # Contributor: Jason Giangrande <jgiangrande@clarku.edu>
4 pkgname=pyusb-svn
5 pkgver=svn
6 pkgrel=1
7 pkgdesc="A native Python module written in C which provides USB access. (SVN Version)"
8 arch=('i686' 'x86_64')
9 url="http://pyusb.berlios.de/"
10 license=('GPL')
11 depends=('python' 'libusb')
12 conflicts=('pyusb' 'pyusb10')
13 source=()
14 md5sums=()
17 _svntrunk="https://pyusb.svn.sourceforge.net/svnroot/pyusb/"
18 _svnmod="pyusb-svn"
20 build() {
22         cd ${srcdir}
24         if [ -d $_svnmod/.svn ]; then
25                 (cd $_svnmod && svn up -r $pkgver)
26         else
27                 svn co https://pyusb.svn.sourceforge.net/svnroot/pyusb $_svnmod
28         fi
30         cd ${srcdir}/${_svnmod}/trunk/
32         # python2 fix
33         for file in `find ./ -name "*.py"`; do
34             sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' $file
35             sed -i 's_#!/usr/bin/python_#!/usr/bin/python2_' $file
36         done
38         python2 setup.py install --root=${pkgdir} || return 1