mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-28 09:01:55 +02:00
Upgraded the libusb, usbutils Portage packages
Upgraded dev-libs/libusb to version 1.0.8 on arm, x86 Upgraded sys-apps/usbutils to version 001 on arm, x86 usbutils was the last user of libusb-0.1.x, now everything should use libusb-1.x API and we can remove the former. BUG=chromium-os:21264 chromium-os:21265 TEST=./run_remote_tests.sh --board=x86-alex hardware_USB20 ./lab_test.py --board=x86-alex --platforms=netbook_ALEX,netbook_ALEX_CDMA_GOBI3K suite_Smoke manually inspect lsusb output Change-Id: I2ff9be2add7b43cdbcf535b1a6441efdd9a5c4b0 Reviewed-on: http://gerrit.chromium.org/gerrit/10020 Commit-Ready: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Matt Tennant <mtennant@chromium.org> Reviewed-by: Jason Glasgow <jglasgow@chromium.org>
This commit is contained in:
parent
2c7e6f2e88
commit
464e01bf8c
45
sdk_container/src/third_party/portage-stable/dev-libs/libusb/libusb-1.0.8.ebuild
vendored
Normal file
45
sdk_container/src/third_party/portage-stable/dev-libs/libusb/libusb-1.0.8.ebuild
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-libs/libusb/libusb-1.0.8.ebuild,v 1.11 2011/09/28 13:03:27 ssuominen Exp $
|
||||
|
||||
EAPI="2"
|
||||
|
||||
DESCRIPTION="Userspace access to USB devices"
|
||||
HOMEPAGE="http://libusb.org/"
|
||||
SRC_URI="mirror://sourceforge/libusb/${P}.tar.bz2"
|
||||
LICENSE="LGPL-2.1"
|
||||
SLOT="1"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 -x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
IUSE="debug doc static-libs"
|
||||
|
||||
DEPEND="doc? ( app-doc/doxygen )"
|
||||
RDEPEND=""
|
||||
|
||||
src_configure() {
|
||||
econf \
|
||||
$(use_enable static-libs static) \
|
||||
$(use_enable debug debug-log)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
default
|
||||
|
||||
if use doc ; then
|
||||
cd doc
|
||||
emake docs || die "making docs failed"
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install || die "emake install failed"
|
||||
dodoc AUTHORS ChangeLog NEWS PORTING README THANKS TODO
|
||||
|
||||
if use doc ; then
|
||||
insinto /usr/share/doc/${PF}/examples
|
||||
doins examples/*.c
|
||||
|
||||
dohtml doc/html/*
|
||||
fi
|
||||
|
||||
rm -f "${D}"/usr/lib*/libusb*.la
|
||||
}
|
55
sdk_container/src/third_party/portage-stable/sys-apps/usbutils/files/usbmodules.sh
vendored
Executable file
55
sdk_container/src/third_party/portage-stable/sys-apps/usbutils/files/usbmodules.sh
vendored
Executable file
@ -0,0 +1,55 @@
|
||||
#!/bin/sh
|
||||
|
||||
usage() {
|
||||
cat <<-EOF
|
||||
List relevant kernel modules for USB devices currently plugged in. The
|
||||
module list is taken from the modules installed in /lib/modules/<ver>/.
|
||||
|
||||
Usage: usbmodules [options] [kernel version]
|
||||
|
||||
Options:
|
||||
-m, --map <map> Specify usbmap (default: /lib/modules/<ver>/modules.usbmap)
|
||||
-h, --help This help screen
|
||||
EOF
|
||||
if [ -n "$*" ] ; then
|
||||
echo
|
||||
echo "Error: $*" 1>&2
|
||||
exit 1
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
|
||||
map=""
|
||||
|
||||
while [ -n "$1" ] ; do
|
||||
case $1 in
|
||||
-m|--map) map=$2; shift;;
|
||||
-h|--help) usage;;
|
||||
--) break;;
|
||||
-*) usage "unknown option '$1'";;
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
ver=${1:-$(uname -r)}
|
||||
map=${map:-/lib/modules/${ver}/modules.usbmap}
|
||||
|
||||
for dev in $(lsusb | awk '{print $6}') ; do
|
||||
[ "${dev}" = "0000:0000" ] && continue
|
||||
|
||||
IFS=:
|
||||
set -- ${dev}
|
||||
vendor=$1
|
||||
product=$2
|
||||
unset IFS
|
||||
|
||||
awk \
|
||||
-v vendor="0x${vendor}" \
|
||||
-v product="0x${product}" \
|
||||
'vendor == $3 && product == $4 {print $1}' \
|
||||
${map}
|
||||
done
|
||||
|
||||
exit 0
|
2
sdk_container/src/third_party/portage-stable/sys-apps/usbutils/files/usbutils.cron
vendored
Executable file
2
sdk_container/src/third_party/portage-stable/sys-apps/usbutils/files/usbutils.cron
vendored
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
exec /usr/sbin/update-usbids -q
|
37
sdk_container/src/third_party/portage-stable/sys-apps/usbutils/usbutils-001.ebuild
vendored
Normal file
37
sdk_container/src/third_party/portage-stable/sys-apps/usbutils/usbutils-001.ebuild
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/usbutils/usbutils-001.ebuild,v 1.10 2011/08/24 17:35:46 radhermit Exp $
|
||||
|
||||
EAPI="2"
|
||||
|
||||
DESCRIPTION="USB enumeration utilities"
|
||||
HOMEPAGE="http://linux-usb.sourceforge.net/"
|
||||
SRC_URI="mirror://kernel/linux/utils/usb/usbutils/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
|
||||
IUSE="network-cron zlib"
|
||||
|
||||
RDEPEND="virtual/libusb:1
|
||||
zlib? ( sys-libs/zlib )"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-util/pkgconfig"
|
||||
|
||||
src_configure() {
|
||||
econf \
|
||||
--datarootdir=/usr/share \
|
||||
--datadir=/usr/share/misc \
|
||||
$(use_enable zlib)
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install || die
|
||||
mv "${D}"/usr/sbin/update-usbids{.sh,} || die
|
||||
newbin "${FILESDIR}"/usbmodules.sh usbmodules || die
|
||||
dodoc AUTHORS ChangeLog NEWS README
|
||||
|
||||
use network-cron || return 0
|
||||
exeinto /etc/cron.monthly
|
||||
newexe "${FILESDIR}"/usbutils.cron update-usbids || die
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user