aboutsummaryrefslogtreecommitdiffstats
path: root/main/usb-modeswitch/APKBUILD
blob: 13320446739127bd78e79acea892281a89540d36 (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
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=usb-modeswitch
pkgver=2.0.1
pkgrel=0
_pkgdata=20131113
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="tcl"
makedepends="libusb-compat-dev coreutils"
install=
subpackages="$pkgname-doc"
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
}

md5sums="e48d4419d0574d342bb183f7465556d0  usb-modeswitch-2.0.1.tar.bz2
7b5ac1226b360ddc366c286e62b3c3a4  usb-modeswitch-data-20131113.tar.bz2
9a25756669937ac86774bb55733f09cd  usb_modeswitch.setup"
sha256sums="4706c9cfe825263e189f55730ea3d1d8634aeb15645a1098532e946e770f7f95  usb-modeswitch-2.0.1.tar.bz2
b3213a460837bd52dad6c8675eda348347f65a034da53a1eaebdaeabf17e2137  usb-modeswitch-data-20131113.tar.bz2
76c0fd9138a6d4a09d6bcee27feeb144c431aed163d556ef60a9c39352ec7f26  usb_modeswitch.setup"
sha512sums="31d7db9a1c52eab8ee86836deae72fdd1007533ed5a3073964c42b9c354647fede2ab9ab1986bbac18e48ba1b73973c51df1e5c691880fdc073d8226075462c1  usb-modeswitch-2.0.1.tar.bz2
2814baa93d17658b614b68e3878927a558668d2b13a1e04e2a5c01464e2f226176e8fd32e12d028f6cbeec603f8f710cecfc68300d77b0741e5cd77305f12ff6  usb-modeswitch-data-20131113.tar.bz2
48bc921849c529059c35f00e9cb10e92fee32622d63291bbd7184039bbe4c4324591b4011b24cf9b6c4ed2a7ad90fe0d5287a58631de5114b36f70d4f6f3c250  usb_modeswitch.setup"