Import usbutils-005
Utility used to display information about USB devices. ok sthen@, ajacoutot@ (on a previous diff)
This commit is contained in:
parent
1eff428b0f
commit
6bb73d53eb
49
sysutils/usbutils/Makefile
Normal file
49
sysutils/usbutils/Makefile
Normal file
@ -0,0 +1,49 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2012/05/15 13:44:52 mpi Exp $
|
||||
|
||||
COMMENT = utility used to display information about USB devices
|
||||
|
||||
VERSION = 005
|
||||
DISTNAME = usbutils_${VERSION}.orig
|
||||
PKGNAME = usbutils-${VERSION}
|
||||
|
||||
CATEGORIES = sysutils
|
||||
HOMEPAGE = http://www.linux-usb.org
|
||||
|
||||
MAINTAINER = Martin Pieuchot <mpi@openbsd.org>
|
||||
|
||||
# GPLv2
|
||||
PERMIT_PACKAGE_CDROM = Yes
|
||||
PERMIT_PACKAGE_FTP = Yes
|
||||
PERMIT_DISTFILES_CDROM =Yes
|
||||
PERMIT_DISTFILES_FTP = Yes
|
||||
|
||||
MASTER_SITES = http://ftp.de.debian.org/debian/pool/main/u/usbutils/
|
||||
|
||||
WANTLIB = c usb-1.0 pthread z
|
||||
LIB_DEPENDS = devel/libusb1
|
||||
|
||||
AUTOMAKE_VERSION = 1.11
|
||||
AUTOCONF_VERSION = 2.68
|
||||
|
||||
BUILD_DEPENDS += ${MODGNU_AUTOCONF_DEPENDS} \
|
||||
${MODGNU_AUTOMAKE_DEPENDS}
|
||||
# autogen.sh need libtoolize
|
||||
BUILD_DEPENDS += devel/libtool
|
||||
|
||||
WRKDIST = ${WRKDIR}/usbutils-${VERSION}
|
||||
|
||||
USE_GMAKE = Yes
|
||||
USE_LIBTOOL = Yes
|
||||
CONFIGURE_STYLE = gnu
|
||||
CONFIGURE_ENV += CPPFLAGS="-I${LOCALBASE}/include" \
|
||||
LDFLAGS="-L${LOCALBASE}/lib" \
|
||||
LIBS="-L${LOCALBASE}/lib -pthread"
|
||||
CONFIGURE_ARGS += --datarootdir=${LOCALBASE}/lib \
|
||||
--datadir=${LOCALBASE}/share/usbutils
|
||||
|
||||
pre-configure:
|
||||
cd ${WRKSRC} && ${SETENV} AUTOMAKE_VERSION=${AUTOMAKE_VERSION} \
|
||||
AUTOCONF_VERSION=${AUTOCONF_VERSION} \
|
||||
autoreconf --install
|
||||
|
||||
.include <bsd.port.mk>
|
5
sysutils/usbutils/distinfo
Normal file
5
sysutils/usbutils/distinfo
Normal file
@ -0,0 +1,5 @@
|
||||
MD5 (usbutils_005.orig.tar.gz) = LpkCZdRy4vbwZiNW1lRoOw==
|
||||
RMD160 (usbutils_005.orig.tar.gz) = UP7nRFbOxj1u4l5pQxATWm5k1nQ=
|
||||
SHA1 (usbutils_005.orig.tar.gz) = 5nri5uCxT7d4srV2yPswK/pD0K8=
|
||||
SHA256 (usbutils_005.orig.tar.gz) = KlM+WNWaojWGEOQPgHQowxiYSEWGT5QnukjSs06dXRc=
|
||||
SIZE (usbutils_005.orig.tar.gz) = 234751
|
21
sysutils/usbutils/patches/patch-Makefile_am
Normal file
21
sysutils/usbutils/patches/patch-Makefile_am
Normal file
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-Makefile_am,v 1.1.1.1 2012/05/15 13:44:52 mpi Exp $
|
||||
|
||||
No usbhid-dump(1) nor 'lsusb -t' option under OpenBSD
|
||||
|
||||
--- Makefile.am.orig Sun Oct 30 20:35:50 2011
|
||||
+++ Makefile.am Tue May 15 14:28:34 2012
|
||||
@@ -1,6 +1,3 @@
|
||||
-SUBDIRS = \
|
||||
- usbhid-dump
|
||||
-
|
||||
AM_LDFLAGS = \
|
||||
-Wl,--as-needed
|
||||
|
||||
@@ -19,7 +16,6 @@ bin_SCRIPTS = \
|
||||
|
||||
lsusb_SOURCES = \
|
||||
lsusb.c lsusb.h \
|
||||
- lsusb-t.c \
|
||||
list.h \
|
||||
names.c names.h \
|
||||
devtree.c devtree.h \
|
19
sysutils/usbutils/patches/patch-lsusb_8_in
Normal file
19
sysutils/usbutils/patches/patch-lsusb_8_in
Normal file
@ -0,0 +1,19 @@
|
||||
$OpenBSD: patch-lsusb_8_in,v 1.1.1.1 2012/05/15 13:44:52 mpi Exp $
|
||||
|
||||
No '-t' under OpenBSD
|
||||
|
||||
--- lsusb.8.in.orig Tue May 15 14:27:23 2012
|
||||
+++ lsusb.8.in Tue May 15 14:27:43 2012
|
||||
@@ -41,12 +41,6 @@ The device file should be something like /dev/bus/usb/
|
||||
This option displays detailed information like the \fBv\fP option;
|
||||
you must be root to do this.
|
||||
.TP
|
||||
-.B \-t
|
||||
-Tells
|
||||
-.I lsusb
|
||||
-to dump the physical USB device hierarchy as a tree. This overrides the
|
||||
-\fBv\fP option.
|
||||
-.TP
|
||||
.B \-V, \-\-version
|
||||
Print version information on standard output,
|
||||
then exit successfully.
|
72
sysutils/usbutils/patches/patch-lsusb_c
Normal file
72
sysutils/usbutils/patches/patch-lsusb_c
Normal file
@ -0,0 +1,72 @@
|
||||
$OpenBSD: patch-lsusb_c,v 1.1.1.1 2012/05/15 13:44:52 mpi Exp $
|
||||
|
||||
Disable unsupported '-t' option.
|
||||
|
||||
--- lsusb.c.orig Sun Oct 30 20:35:50 2011
|
||||
+++ lsusb.c Tue May 15 14:36:50 2012
|
||||
@@ -3902,6 +3902,7 @@ void devtree_devdisconnect(struct usbdevnode *dev)
|
||||
dev = dev; /* reduce compiler warnings */
|
||||
}
|
||||
|
||||
+#ifndef __OpenBSD__
|
||||
static int treedump(void)
|
||||
{
|
||||
int fd;
|
||||
@@ -3919,6 +3920,7 @@ static int treedump(void)
|
||||
devtree_dump(verblevel);
|
||||
return 0;
|
||||
}
|
||||
+#endif
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@@ -3937,7 +3939,7 @@ int main(int argc, char *argv[])
|
||||
char *cp;
|
||||
int status;
|
||||
|
||||
- while ((c = getopt_long(argc, argv, "D:vxtP:p:s:d:V",
|
||||
+ while ((c = getopt_long(argc, argv, "D:vxP:p:s:d:V",
|
||||
long_options, NULL)) != EOF) {
|
||||
switch (c) {
|
||||
case 'V':
|
||||
@@ -3951,11 +3953,11 @@ int main(int argc, char *argv[])
|
||||
case 'x':
|
||||
allowctrlmsg = 1;
|
||||
break;
|
||||
-
|
||||
+#ifndef __OpenBSD__
|
||||
case 't':
|
||||
treemode = 1;
|
||||
break;
|
||||
-
|
||||
+#endif
|
||||
case 's':
|
||||
cp = strchr(optarg, ':');
|
||||
if (cp) {
|
||||
@@ -4006,8 +4008,10 @@ int main(int argc, char *argv[])
|
||||
" product ID numbers (in hexadecimal)\n"
|
||||
" -D device\n"
|
||||
" Selects which device lsusb will examine\n"
|
||||
+#ifndef __OpenBSD__
|
||||
" -t\n"
|
||||
" Dump the physical USB device hierarchy as a tree\n"
|
||||
+#endif
|
||||
" -V, --version\n"
|
||||
" Show version of program\n"
|
||||
);
|
||||
@@ -4033,11 +4037,14 @@ int main(int argc, char *argv[])
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
+#ifndef __OpenBSD__
|
||||
if (treemode) {
|
||||
/* treemode requires at least verblevel 1 */
|
||||
verblevel += 1 - VERBLEVEL_DEFAULT;
|
||||
status = treedump();
|
||||
- } else if (devdump)
|
||||
+ } else
|
||||
+#endif
|
||||
+ if (devdump)
|
||||
status = dump_one_device(ctx, devdump);
|
||||
else
|
||||
status = list_devices(ctx, bus, devnum, vendor, product);
|
1
sysutils/usbutils/pkg/DESCR
Normal file
1
sysutils/usbutils/pkg/DESCR
Normal file
@ -0,0 +1 @@
|
||||
Utility used to display information about USB devices.
|
12
sysutils/usbutils/pkg/PLIST
Normal file
12
sysutils/usbutils/pkg/PLIST
Normal file
@ -0,0 +1,12 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2012/05/15 13:44:52 mpi Exp $
|
||||
@bin bin/lsusb
|
||||
@comment bin/lsusb.py
|
||||
@comment bin/usb-devices
|
||||
lib/pkgconfig/
|
||||
lib/pkgconfig/usbutils.pc
|
||||
@comment man/man1/usb-devices.1
|
||||
@man man/man8/lsusb.8
|
||||
@comment sbin/update-usbids.sh
|
||||
share/usbutils/
|
||||
share/usbutils/usb.ids
|
||||
share/usbutils/usb.ids.gz
|
Loading…
Reference in New Issue
Block a user