summaryrefslogtreecommitdiff
path: root/community/usb_modeswitch/PKGBUILD
blob: 3458739e9c728ca2710c055ab825b13f088f002c (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
41
# $Id: PKGBUILD 75530 2012-08-26 20:12:19Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=usb_modeswitch
pkgver=1.2.4
pkgrel=1
_pkgdata=20120815
pkgdesc="Activating switchable USB devices on Linux."
arch=('i686' 'x86_64')
url="http://www.draisberghof.de/usb_modeswitch/"
license=('GPL')
depends=('libusb-compat' 'tcl')
makedepends=('gcc' 'make')
backup=("etc/$pkgname.conf")
source=("http://www.draisberghof.de/usb_modeswitch/usb-modeswitch-${pkgver}.tar.bz2"
	"http://www.draisberghof.de/usb_modeswitch/usb-modeswitch-data-${_pkgdata}.tar.bz2"
	"usb-modeswitch-${pkgver}-device_reference.txt::http://www.draisberghof.de/usb_modeswitch/device_reference.txt")
md5sums=('dbd4ce7966d7b4a5a0604a8280f7164d'
         '12d7de3210e45ad6f48791d12bbdbf61'
         '3588e76bf08f6c9ed51a1de4d086795e')

build() {
  cd $srcdir/usb-modeswitch-$pkgver/
  make clean
  make
}

package() {
  cd $srcdir/usb-modeswitch-$pkgver/

  mkdir -p $pkgdir/usr/lib/udev
  mkdir -p $pkgdir/etc
  mkdir -p $pkgdir/usr/share/man/man1

  make DESTDIR=${pkgdir} UDEVDIR=${pkgdir}/usr/lib/udev install

  cp $srcdir/usb-modeswitch-${pkgver}-device_reference.txt $pkgdir/etc/usb_modeswitch.setup

  cd $srcdir/usb-modeswitch-data-${_pkgdata}
  make DESTDIR=$pkgdir install RULESDIR=${pkgdir}/usr/lib/udev/rules.d
}