summaryrefslogtreecommitdiff
path: root/community/usb_modeswitch/PKGBUILD
blob: 2105464b3feb4e4aaed3216164ecc114a376e6b8 (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
42
43
44
# $Id: PKGBUILD 51652 2011-07-12 14:14:50Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=usb_modeswitch
pkgver=1.1.8
pkgrel=1
_pkgdata=20110705
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"
	"http://www.draisberghof.de/usb_modeswitch/device_reference.txt")
md5sums=('1aaaa45e0465843e4973d7778bfbafbb'
         '5046e7be8d10d2fe699f9af21a0c3769'
         'c441eb16a3901052ce882ca844be2a20')

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

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

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

  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 $srcdir/device_reference.txt $pkgdir/etc/usb_modeswitch.setup

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