summaryrefslogtreecommitdiffstats
path: root/package/usb_modeswitch
diff options
context:
space:
mode:
authorGustavo Zacarias <gustavo@zacarias.com.ar>2009-09-01 13:04:17 -0300
committerPeter Korsgaard <jacmet@sunsite.dk>2009-10-29 22:59:22 +0100
commitbdf41d6c8c59146511a5553845cd2358ff524fe0 (patch)
tree93afeebda17bfcf41e8dfe3520922dbc0e427aae /package/usb_modeswitch
parent69ec17cd8d9140d50d5a28ee4e7ada527e9a3a06 (diff)
downloadbuildroot-novena-bdf41d6c8c59146511a5553845cd2358ff524fe0.tar.gz
buildroot-novena-bdf41d6c8c59146511a5553845cd2358ff524fe0.zip
Add new usb_modeswitch package
Closes #511. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/usb_modeswitch')
-rw-r--r--package/usb_modeswitch/Config.in8
-rw-r--r--package/usb_modeswitch/usb_modeswitch-nostrip.patch11
-rw-r--r--package/usb_modeswitch/usb_modeswitch.mk28
3 files changed, 47 insertions, 0 deletions
diff --git a/package/usb_modeswitch/Config.in b/package/usb_modeswitch/Config.in
new file mode 100644
index 000000000..41cd3a065
--- /dev/null
+++ b/package/usb_modeswitch/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_USB_MODESWITCH
+ bool "usb_modeswitch"
+ select BR2_PACKAGE_LIBUSB
+ help
+ USB mode switcher.
+ Used to switch mode on multiple-function devices
+
+ http://www.draisberghof.de/usb_modeswitch/
diff --git a/package/usb_modeswitch/usb_modeswitch-nostrip.patch b/package/usb_modeswitch/usb_modeswitch-nostrip.patch
new file mode 100644
index 000000000..3bb8e8d38
--- /dev/null
+++ b/package/usb_modeswitch/usb_modeswitch-nostrip.patch
@@ -0,0 +1,11 @@
+diff -Nura usb_modeswitch-1.0.1/Makefile usb_modeswitch-1.0.1.nostrip/Makefile
+--- usb_modeswitch-1.0.1/Makefile 2009-04-15 16:15:17.000000000 -0300
++++ usb_modeswitch-1.0.1.nostrip/Makefile 2009-06-10 10:02:05.000000000 -0300
+@@ -13,7 +13,6 @@
+ all: $(PROG)
+ $(PROG): $(OBJS)
+ $(CC) $(CCFLAGS) -o $(PROG) $(OBJS)
+- $(STRIP) $(PROG)
+
+ clean:
+ $(RM) ./usb_modeswitch
diff --git a/package/usb_modeswitch/usb_modeswitch.mk b/package/usb_modeswitch/usb_modeswitch.mk
new file mode 100644
index 000000000..fc5d2f6d9
--- /dev/null
+++ b/package/usb_modeswitch/usb_modeswitch.mk
@@ -0,0 +1,28 @@
+#############################################################
+#
+# usb_modeswitch
+#
+#############################################################
+
+USB_MODESWITCH_VERSION = 1.0.5
+USB_MODESWITCH_SOURCE = usb_modeswitch-$(USB_MODESWITCH_VERSION).tar.bz2
+USB_MODESWITCH_SITE = http://www.draisberghof.de/usb_modeswitch
+USB_MODESWITCH_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install
+USB_MODESWITCH_DEPENDENCIES = libusb
+USB_MODESWITCH_MAKE_OPT = CC="$(TARGET_CC)" OPTS="$(TARGET_CFLAGS)"
+
+$(eval $(call AUTOTARGETS,package,usb_modeswitch))
+
+$(USB_MODESWITCH_TARGET_CONFIGURE):
+ rm -f $(USB_MODESWITCH_DIR)/usb_modeswitch
+ touch $@
+
+$(USB_MODESWITCH_HOOK_POST_INSTALL):
+ chmod a-x $(TARGET_DIR)/etc/usb_modeswitch.conf
+ touch $@
+
+$(USB_MODESWITCH_TARGET_UNINSTALL):
+ $(call MESSAGE,"Uninstalling")
+ rm -f $(TARGET_DIR)/usr/sbin/usb_modeswitch
+ rm -f $(TARGET_DIR)/etc/usb_modeswitch.conf
+ rm -f $(USB_MODESWITCH_TARGET_INSTALL_TARGET) $(USB_MODESWITCH_HOOK_POST_INSTALL)