summaryrefslogtreecommitdiff
path: root/community/usb_modeswitch
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-07-19 01:10:32 -0700
committerroot <root@rshg054.dnsready.net>2013-07-19 01:10:32 -0700
commit8fbc0076a4827ddc6af92e0b9daa4c4c31450808 (patch)
tree03fd0e2921ebd53228d9a93e32ed3976b636cbea /community/usb_modeswitch
parente445a313723389ba9ee1fded025c567dae5b21ea (diff)
Fri Jul 19 01:09:18 PDT 2013
Diffstat (limited to 'community/usb_modeswitch')
-rw-r--r--community/usb_modeswitch/PKGBUILD46
1 files changed, 46 insertions, 0 deletions
diff --git a/community/usb_modeswitch/PKGBUILD b/community/usb_modeswitch/PKGBUILD
new file mode 100644
index 000000000..738b08c0c
--- /dev/null
+++ b/community/usb_modeswitch/PKGBUILD
@@ -0,0 +1,46 @@
+# $Id: PKGBUILD 93095 2013-06-24 09:56:58Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+
+pkgname=usb_modeswitch
+pkgver=1.2.6
+pkgrel=1
+_pkgdata=20130610
+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=('3cd804ad2dd4cb61fbd77a5cc033496c'
+ '52dff3f54e0c01dad02639d642e089e0'
+ '13f239816d7c4add8113179f4fb3543c')
+
+prepare() {
+ cd $srcdir/usb-modeswitch-$pkgver/
+ sed -i 's|/usr/sbin/usb_mode|/usr/bin/usb_mode|g' usb_modeswitch.{conf,tcl,sh}
+}
+
+build() {
+ cd $srcdir/usb-modeswitch-$pkgver/
+ make clean
+ make SBINDIR=/usr/bin
+}
+
+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 SBINDIR=$pkgdir/usr/bin 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
+}