blob: 517af45f83744ae96e712dae9b626dc0501591a5 (
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=usb-modeswitch
pkgver=2.5.0
pkgrel=0
_pkgdata=20140529
pkgdesc="A mode switching tool for controlling flip flop (multiple device) USB gear"
url="http://www.draisberghof.de/usb_modeswitch/"
arch="all"
license="GPL2+"
depends=""
makedepends="libusb-compat-dev coreutils tcl"
install=
subpackages="$pkgname-doc $pkgname-udev"
source="http://www.draisberghof.de/usb_modeswitch/${pkgname}-${pkgver}.tar.bz2
http://www.draisberghof.de/usb_modeswitch/${pkgname}-data-${_pkgdata}.tar.bz2
usb_modeswitch.setup"
_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
cd "$_builddir"
make clean || return 1
sed -i -e 's/--mode=/-m/' Makefile || return 1
cd ../${pkgname}-data-${_pkgdata}
# sed -i -e 's%install -m644 -t $(PREFIX)/share/usb_modeswitch ./usb_modeswitch.d/*%cp -R $(PREFIX)/share/usb_modeswitch/* ./usb_modeswitch.d/%' Makefile || return 1
sed -i -e 's/--mode=/-m/' Makefile || return 1
}
build() {
cd "$_builddir"
make || return 1
}
package() {
cd "$_builddir"
make DESTDIR="$pkgdir" install || return 1
# adjusting the tcl script location
# mv ${pkgdir}/lib/udev/usb_modeswitch/usb_modeswitch.tcl \
# ${pkgdir}/lib/udev/usb_modeswitch.tcl || return 1
# rmdir ${pkgdir}/lib/udev/usb_modeswitch || return 1
# mv ${pkgdir}/lib/udev/usb_modeswitch.tcl \
# ${pkgdir}/lib/udev/usb_modeswitch || return 1
# installing data
cd $srcdir/usb-modeswitch-data-${_pkgdata} || return 1
make DESTDIR=$pkgdir install || return 1
# installing config
cp $srcdir/usb_modeswitch.setup $pkgdir/etc/ || return 1
}
udev() {
pkgdesc="udev support for usb-modeswitch"
depends="tcl eudev $pkgname=$pkgver-r$pkgrel"
mkdir -p "$subpkgdir"/usr/sbin
mv "$pkgdir"/lib "$subpkgdir"/ || return 1
mv "$pkgdir"/usr/sbin/usb_modeswitch_dispatcher \
"$subpkgdir"/usr/sbin/
}
md5sums="38ad5c9d70e06227a00361bdc2b1e568 usb-modeswitch-2.5.0.tar.bz2
dff94177781298aaf0b3c2a3c3dea6b2 usb-modeswitch-data-20140529.tar.bz2
9a25756669937ac86774bb55733f09cd usb_modeswitch.setup"
sha256sums="31c0be280d49a99ec3dc0be3325bef320d9c04b50714ef0ce1e36a614d687633 usb-modeswitch-2.5.0.tar.bz2
53889157937109e04dafe897c098ec94f3f44f9c0c83fc6ec8417aa9a587e536 usb-modeswitch-data-20140529.tar.bz2
76c0fd9138a6d4a09d6bcee27feeb144c431aed163d556ef60a9c39352ec7f26 usb_modeswitch.setup"
sha512sums="df8e7174cdc072d9280cfeecf74ca482b6523636b6d2e2834016c1aa972f71d63fba4bd33f0d58bca22a27f73cb7f028cb0d080760d88983ca40f328b2e35314 usb-modeswitch-2.5.0.tar.bz2
e0ac311ae09dcf41b45e9434bf43e7964ec0a32ac68024216ddfb6d6fd9d3b484cbe663ec081841e11a4af80e50fce12f1a06e0249aa229558085886c0f25809 usb-modeswitch-data-20140529.tar.bz2
48bc921849c529059c35f00e9cb10e92fee32622d63291bbd7184039bbe4c4324591b4011b24cf9b6c4ed2a7ad90fe0d5287a58631de5114b36f70d4f6f3c250 usb_modeswitch.setup"
|