summaryrefslogtreecommitdiff
path: root/core/usbutils/PKGBUILD
blob: 2edabc2f0f776134d4ae506d39335e6023adb975 (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
37
38
39
40
# $Id: PKGBUILD 123172 2011-05-09 02:20:17Z allan $
# Maintainer: Judd Vinet <jvinet@zeroflux.org>
# Contributor: Curtis Campbell <curtisjamescampbell@hotmail.com>
pkgname=usbutils
pkgver=002
pkgrel=3
_usb_ids_date=2011.04.14
pkgdesc="USB Device Utilities"
arch=(i686 x86_64)
license=('GPL')
groups=('base')
makedepends=('wget')
depends=('glibc' 'libusb')
optdepends=('python2: for lsusb.py usage'
           'coreutils: for lsusb.py usage')
url="http://linux-usb.sourceforge.net/"
source=(http://www.kernel.org/pub/linux/utils/usb/$pkgname/$pkgname-$pkgver.tar.gz
        fix-python2.patch
        usb.ids-${_usb_ids_date})  # from http://linux-usb.sourceforge.net/usb.ids
md5sums=('05610d15c3c8c8ada3d691c320ca784a'
         '45766196895b4cc50b53cd56e1bbf3d1'
         'd64f120c208ca742d3a1d05d84e3f531')

build() {
  cd $srcdir/$pkgname-$pkgver
  rm usb.ids
  cp $srcdir/usb.ids-${_usb_ids_date} usb.ids
  # patch lsusb.py to use correct usb.ids file and python2 interpreter
  patch -Np1 -i $srcdir/fix-python2.patch
  ./configure --prefix=/usr --datadir=/usr/share/hwdata --disable-zlib
  make
}

package() {
  cd $srcdir/$pkgname-$pkgver
  make DESTDIR=$pkgdir install
  # fix pkgconfig file
  install -dm755 $pkgdir/usr/lib
  mv $pkgdir/usr/share/pkgconfig $pkgdir/usr/lib/
}