DIST usb-modeswitch-2.1.1.tar.bz2 261358 SHA256 5ad1134e142502f52f034c1e3f148386d334ddb70e744be96a5174d303dc2542 SHA512 582323b27d875bfe05f0337f2548b77e4b3cc9ab2b644eecefd377f021e2cb1283aae3100f8fba6dccb5f9172ee57cd2d2175d3ff6e17744f18b0e2df0a24d89 WHIRLPOOL f7b279a9c127319bfb56ba99cd82941f9e1dc32a181d2b3c536f4cb55bf114bed200f27064dacaaa3128becaedf637158fc3911aa3b887ba98ef1bb026b1a7e2
DIST usb-modeswitch-2.2.0.tar.bz2 261888 SHA256 2752103de171ed5f6c8d6a6e3e73e16c9ee3e8e394dd39c5991f7680eb908a3a SHA512 1311365c580035361e961ffefb84acf88771aae17d4b084733f2e0d10ac2ad770cf7d3b64c1c6cc400f19082530b425714f3afb88d10d6023e3798261a982e67 WHIRLPOOL 0e9e2bca6e72c9f34a18c82ba52d02b3281f3a016a5fdab251f7556b4d4aa04936c22a08e97d13985e2cf2d416ee0d51a5cf9494d0e9a449022259025b9d187c
DIST usb-modeswitch-2.2.3.tar.bz2 263038 SHA256 d1a0d9a9e7411f07796611881a8f264daa946e2a28418abed34639b3583d7593 SHA512 f6d30e251bd4a1d6459cb7ac3594d204c21e0ca22ab0fa44ea675176751e4a2f08a4f42ce2ec0d2caf0bbca56438800327f7e5e16832e383263a4002941fa869 WHIRLPOOL c8a0c1c7bad335da8a9c2d87202ba5ac897d1d469c95c45c1677c41d04256dd97a4577eafd48104d135c5d15cda7c9bc287ecf38b457d4b2d4cce29471931a6e
+DIST usb-modeswitch-2.2.5.tar.bz2 263335 SHA256 8b2340303732aabc8c8e1cdd7d4352f61dcb942839f58ce22ba0ecfa122426d5 SHA512 007c14fbf64b17b422be4e54baa0f345f03dd322871886d1200e76d3af623fa78b130f66869be1e8e8f2a16f0350b4be8b9e8d7ea416af0b4c2730ab440d7023 WHIRLPOOL 0a6723f4a08293a366f3a063fe045224ca802b4c2cb8b9f7ae431fa41249a6ba937669a273ab6cd2e989e8a977ffaea386d2c7285289ca140c0619c5d75be0ea
DIST usb-modeswitch-data-20130807.tar.bz2 23890 SHA256 a3114e2c1f38eed3ad0067df30e53a96313908a9539a8ea5d94a4d35651699eb SHA512 179669c3ac9077d1727298f55500e886386bb4b01d4f8fe6425bde2ec4f1f394fa0a16a4cc8e91a6a5a82e804b5fa10af2009db1bc7c34bfb759202e63574cd9 WHIRLPOOL 0794dd0a90104425a8cc790d9059f4fc3c874819c67663f7e541bac165b2420c20acca1b9e5275acb68d091c0c493f32934acb75a0a5993cd1e6fdc364065308
DIST usb-modeswitch-data-20140129.tar.bz2 24189 SHA256 1ce641a76ab01b155beeec9ead3427a5f52b798af197024fdfb3d0190f5feb0d SHA512 74bf90f69ea4e5c1b94de0629e82c1bdf056afec96f152ac35874beafd4cbd0d6b6a0868a6aa72e3064a87fc7e3a58ff56f477649cd6e570782290191accaf2c WHIRLPOOL 86651bc9055e8c4107ce72bf5d54820aa09cc5b1cf51daebca6c5b817ea255b070d9249744f07b03306940259e93a57a91c74dcecc63195f33dbb2db0e6d70f5
DIST usb-modeswitch-data-20140327.tar.bz2 24273 SHA256 8f9f53c0871239b41d9cf377f528c9de8feddc31c391bd2ed903e17a28e983c7 SHA512 de499f3381a470d73c4781f2f24e0c9d9e059a6f3dd3a73a72125719bb8ce6b687d611f6300531407d2815ea10867cd3a3d2b99bfbf489bc6ac47a0665f8d0fd WHIRLPOOL b4ebca281c626a762c040b15b131b43fbb9732b550620619af418781ea1242ea8e57fa4fb8de36d6c992ebdf8a78f973d1d7fb41482d179d5da88b0c5380071c
--- /dev/null
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils linux-info toolchain-funcs udev systemd
+
+MY_PN=${PN/_/-}
+MY_P=${MY_PN}-${PV/_p*}
+#DATA_VER=${PV/*_p}
+DATA_VER="20150627"
+
+DESCRIPTION="USB_ModeSwitch is a tool for controlling 'flip flop' (multiple devices) USB gear like UMTS sticks"
+HOMEPAGE="http://www.draisberghof.de/usb_modeswitch/ http://www.draisberghof.de/usb_modeswitch/device_reference.txt"
+SRC_URI="http://www.draisberghof.de/${PN}/${MY_P}.tar.bz2
+ http://www.draisberghof.de/${PN}/${MY_PN}-data-${DATA_VER}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="jimtcl"
+
+COMMON_DEPEND="
+ virtual/udev
+ virtual/libusb:1
+"
+RDEPEND="${COMMON_DEPEND}
+ jimtcl? ( dev-lang/jimtcl )
+ !jimtcl? ( dev-lang/tcl:0 )" # usb_modeswitch script is tcl
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig
+"
+
+S=${WORKDIR}/${MY_P}
+
+CONFIG_CHECK="~USB_SERIAL"
+
+src_prepare() {
+ sed -i -e '/install.*BIN/s:-s::' Makefile || die
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ SYSDIR="${D}/$(systemd_get_unitdir)" \
+ UDEVDIR="${D}/$(get_udevdir)" \
+ $(usex jimtcl install-shared install)
+
+ # Even if we set SYSDIR above, the Makefile is causing automagic detection of `systemctl` binary,
+ # which is why we need to force the .service file to be installed:
+ systemd_dounit ${PN}@.service
+
+ dodoc ChangeLog README
+
+ pushd ../${MY_PN}-data-${DATA_VER} >/dev/null
+ emake \
+ DESTDIR="${D}" \
+ RULESDIR="${D}/$(get_udevdir)/rules.d" \
+ files-install db-install
+ docinto data
+ dodoc ChangeLog README
+ popd >/dev/null
+}