summaryrefslogtreecommitdiff
path: root/community/usb_modeswitch/PKGBUILD
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-08-13 01:33:19 -0700
committerroot <root@rshg054.dnsready.net>2013-08-13 01:33:19 -0700
commit7a65a910b77ad191d69881098c47f9b0c852d92e (patch)
tree9564e611af1442f8952a8cbddb3b0ad25ed71aab /community/usb_modeswitch/PKGBUILD
parent60da6abff6c9577a783d72865f11de7a585e912e (diff)
Tue Aug 13 01:31:08 PDT 2013
Diffstat (limited to 'community/usb_modeswitch/PKGBUILD')
-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..f4229bc84
--- /dev/null
+++ b/community/usb_modeswitch/PKGBUILD
@@ -0,0 +1,46 @@
+# $Id: PKGBUILD 95443 2013-08-12 08:50:29Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+
+pkgname=usb_modeswitch
+pkgver=1.2.7
+pkgrel=1
+_pkgdata=20130807
+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=('18d889d72195534ae9133a8181cad42b'
+ '91feff51deba6e48e78506b8f4db2274'
+ 'dd14f254f6c3642ce16fd7c2f43ee112')
+
+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
+}