blob: 9f1eb0b6629cf588ba26308983be4bb678f06375 (
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.4.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="6e1640db47768bb9012f91b7593116ef usb-modeswitch-2.4.0.tar.bz2
dff94177781298aaf0b3c2a3c3dea6b2 usb-modeswitch-data-20140529.tar.bz2
9a25756669937ac86774bb55733f09cd usb_modeswitch.setup"
sha256sums="17dc32bf10df8e370f2369b5137d34dfd8f2347faaa51524c5f21c922f42e212 usb-modeswitch-2.4.0.tar.bz2
53889157937109e04dafe897c098ec94f3f44f9c0c83fc6ec8417aa9a587e536 usb-modeswitch-data-20140529.tar.bz2
76c0fd9138a6d4a09d6bcee27feeb144c431aed163d556ef60a9c39352ec7f26 usb_modeswitch.setup"
sha512sums="cf232b8333509012415fe9afbd1becbf54bbf7ebbb6cd450d16546840afc2dbdbc253f8ae6ae294c1e3a490d935e675b984a02ddbe243b57d80443f5d265117c usb-modeswitch-2.4.0.tar.bz2
e0ac311ae09dcf41b45e9434bf43e7964ec0a32ac68024216ddfb6d6fd9d3b484cbe663ec081841e11a4af80e50fce12f1a06e0249aa229558085886c0f25809 usb-modeswitch-data-20140529.tar.bz2
48bc921849c529059c35f00e9cb10e92fee32622d63291bbd7184039bbe4c4324591b4011b24cf9b6c4ed2a7ad90fe0d5287a58631de5114b36f70d4f6f3c250 usb_modeswitch.setup"
|