svn commit: trunk/buildroot/package: usbutils

vapier at uclibc.org vapier at uclibc.org
Tue Dec 13 05:01:01 UTC 2005


Author: vapier
Date: 2005-12-12 21:00:58 -0800 (Mon, 12 Dec 2005)
New Revision: 12854

Log:
import usbutils

Added:
   trunk/buildroot/package/usbutils/
   trunk/buildroot/package/usbutils/Config.in
   trunk/buildroot/package/usbutils/usbutils.mk

Modified:
   trunk/buildroot/package/Config.in


Changeset:
Modified: trunk/buildroot/package/Config.in
===================================================================
--- trunk/buildroot/package/Config.in	2005-12-13 05:00:18 UTC (rev 12853)
+++ trunk/buildroot/package/Config.in	2005-12-13 05:00:58 UTC (rev 12854)
@@ -119,6 +119,7 @@
 source "package/ttcp/Config.in"
 source "package/udev/Config.in"
 source "package/udhcp/Config.in"
+source "package/usbutils/Config.in"
 source "package/util-linux/Config.in"
 source "package/valgrind/Config.in"
 source "package/vtun/Config.in"

Added: trunk/buildroot/package/usbutils/Config.in
===================================================================
--- trunk/buildroot/package/usbutils/Config.in	2005-12-13 05:00:18 UTC (rev 12853)
+++ trunk/buildroot/package/usbutils/Config.in	2005-12-13 05:00:58 UTC (rev 12854)
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_USBUTILS
+	bool "usbutils"
+	default n
+	help
+	  USB enumeration utilities
+
+	  http://linux-usb.sourceforge.net/

Added: trunk/buildroot/package/usbutils/usbutils.mk
===================================================================
--- trunk/buildroot/package/usbutils/usbutils.mk	2005-12-13 05:00:18 UTC (rev 12853)
+++ trunk/buildroot/package/usbutils/usbutils.mk	2005-12-13 05:00:58 UTC (rev 12854)
@@ -0,0 +1,58 @@
+#############################################################
+#
+# usbutils
+#
+#############################################################
+USBUTILS_VER:=0.71
+USBUTILS_SOURCE:=usbutils-$(USBUTILS_VER).tar.gz
+USBUTILS_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/linux-usb/
+USBUTILS_DIR:=$(BUILD_DIR)/usbutils-$(USBUTILS_VER)
+USBUTILS_CAT:=zcat
+USBUTILS_BINARY:=lsusb
+USBUTILS_TARGET_BINARY:=usr/bin/lsusb
+
+$(DL_DIR)/$(USBUTILS_SOURCE):
+	$(WGET) -P $(DL_DIR) $(USBUTILS_SITE)/$(USBUTILS_SOURCE)
+
+usbutils-unpacked: $(USBUTILS_DIR)/.unpacked
+$(USBUTILS_DIR)/.unpacked: $(DL_DIR)/$(USBUTILS_SOURCE)
+	$(USBUTILS_CAT) $(DL_DIR)/$(USBUTILS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+	touch $(USBUTILS_DIR)/.unpacked
+
+$(USBUTILS_DIR)/.configured: $(USBUTILS_DIR)/.unpacked
+	(cd $(USBUTILS_DIR); rm -rf config.cache; \
+		$(TARGET_CONFIGURE_OPTS) CC_FOR_BUILD=$(HOSTCC) \
+		CFLAGS="$(TARGET_CFLAGS) -I$(TARGET_DIR)/usr/include" \
+		LDFLAGS="-L$(TARGET_DIR)/usr/lib" \
+		ac_cv_func_malloc_0_nonnull=yes \
+		./configure \
+		--target=$(GNU_TARGET_NAME) \
+		--host=$(GNU_TARGET_NAME) \
+		--build=$(GNU_HOST_NAME) \
+		--prefix=/usr \
+	);
+	touch $(USBUTILS_DIR)/.configured
+
+$(USBUTILS_DIR)/$(USBUTILS_BINARY): $(USBUTILS_DIR)/.configured
+	$(TARGET_CONFIGURE_OPTS) $(MAKE) CC=$(TARGET_CC) -C $(USBUTILS_DIR)
+
+$(TARGET_DIR)/$(USBUTILS_TARGET_BINARY): $(USBUTILS_DIR)/$(USBUTILS_BINARY)
+	make -C $(USBUTILS_DIR) DESTDIR=$(TARGET_DIR) install
+	rm -rf $(TARGET_DIR)/usr/man
+
+usbutils: uclibc libusb $(TARGET_DIR)/$(USBUTILS_TARGET_BINARY)
+
+usbutils-clean:
+	rm -f $(TARGET_DIR)/$(USBUTILS_TARGET_BINARY)
+	-$(MAKE) -C $(USBUTILS_DIR) clean
+
+usbutils-dirclean:
+	rm -rf $(USBUTILS_DIR)
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_USBUTILS)),y)
+TARGETS+=usbutils
+endif




More information about the uClibc-cvs mailing list