summaryrefslogtreecommitdiff
path: root/community/usb_modeswitch/PKGBUILD
blob: 5846f71ab6d5c6b300a531b78b46b10390ec5a9f (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
# $Id: PKGBUILD 42961 2011-03-22 21:16:11Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=usb_modeswitch
pkgver=1.1.7
pkgrel=1
_pkgdata=20110227
pkgdesc="Activating switchable USB devices on Linux."
arch=('i686' 'x86_64' 'mips64el')
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")
md5sums=('b75e42b7b2d30e9d4cbd5c159f925247'
         '2f5e5bfa21a97b705a22f95bec367793')

build() {
  cd $srcdir

  cd $srcdir/usb-modeswitch-$pkgver/
  mkdir -p $pkgdir/lib/udev/usb_modeswitch
  mkdir -p $pkgdir/etc
  mkdir -p $pkgdir/usr/share/man/man1

  make clean
  make
  make DESTDIR=${pkgdir} install

  mv ${pkgdir}/lib/udev/usb_modeswitch/usb_modeswitch.sh ${pkgdir}/lib/udev/usb_modeswitch.sh
  rmdir ${pkgdir}/lib/udev/usb_modeswitch
  mv ${pkgdir}/lib/udev/usb_modeswitch.sh ${pkgdir}/lib/udev/usb_modeswitch
  cp device_reference.txt $pkgdir/etc/usb_modeswitch.setup

  cd $srcdir/usb-modeswitch-data-${_pkgdata}
  make DESTDIR=$pkgdir install
}