Skip to content

Commit

Permalink
sys-apps/usbutils: add 017
Browse files Browse the repository at this point in the history
Signed-off-by: Sam James <[email protected]>
  • Loading branch information
thesamesam committed Nov 25, 2023
1 parent 34f8ce2 commit 4d60bf1
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
1 change: 1 addition & 0 deletions sys-apps/usbutils/Manifest
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
DIST usbutils-015.tar.xz 167472 BLAKE2B 1074c7159e9e6729f03f98e1f38fa0b3fef3e744b5297e6d97a5fc44ea374e2d5a0c481e14b2a034bca201048b1305c3877dbb15e3c4c04b228b4036048d8904 SHA512 cda0070138400703d7429d39dee49130aedaa704292531e6af57b347cc62422ca609540650926e74335f71d67d7d4655418be4824e1eb8a2b065c7b395feaa87
DIST usbutils-016.tar.xz 169000 BLAKE2B 2f3af61e5a7abf48cdf0a4aebc901ca1570007b54d11ae74572e16bdeb2d8e73844d76af54bd812d6d4b84ddaf6e956132ecc9a8a2849a7bffc0643e29115a49 SHA512 4483038bf91c056cd2977f5e7f449c0a62d9152d6f5d64ab7bde438ab9c1c56fe524ba10b35781c2828edd0fe89379dbaed78fa7ffe78903cae0c4e3c460f9a0
DIST usbutils-017.tar.xz 168820 BLAKE2B 868c646ed6d38a38b9bd3ab85ba3a5e9362a97e476aeed6576c1b175caaf4ee688cb2c33756f02c9bf0aef9e7d58657331fc1c3b3314d86145b3d4f37124537e SHA512 eaebbc82eee4d940898f7a8de95ca49846c7c964e65c3d866b38735f8f3c8ccfed2b3a536bf2ef39a835a40a34c2273ac4d82b1012d0c693d4863cff14870d95
66 changes: 66 additions & 0 deletions sys-apps/usbutils/usbutils-017.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

PYTHON_COMPAT=( python3_{10..11} )
inherit python-single-r1

DESCRIPTION="USB enumeration utilities"
HOMEPAGE="
https://www.kernel.org/pub/linux/utils/usb/usbutils/
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usbutils.git/
"
SRC_URI="https://www.kernel.org/pub/linux/utils/usb/${PN}/${P}.tar.xz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
IUSE="python"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"

DEPEND="
virtual/libusb:1=
virtual/libudev:=
"
RDEPEND="
${DEPEND}
python? (
${PYTHON_DEPS}
sys-apps/hwdata
)
"
BDEPEND="
virtual/pkgconfig
python? ( ${PYTHON_DEPS} )
"

pkg_setup() {
use python && python-single-r1_pkg_setup
}

src_prepare() {
default

use python && python_fix_shebang lsusb.py.in
}

src_configure() {
local myeconfargs=(
--cache-file="${S}"/config.cache
--datarootdir="${EPREFIX}/usr/share"
--datadir="${EPREFIX}/usr/share/hwdata"
)
econf "${myeconfargs[@]}"
}

src_install() {
default

newdoc usbhid-dump/NEWS NEWS.usbhid-dump
dobin usbreset # noinst_PROGRAMS, but installed by other distros

if ! use python ; then
rm -f "${ED}"/usr/bin/lsusb.py || die
fi
}

0 comments on commit 4d60bf1

Please sign in to comment.