Add new usb_modeswitch package
authorGustavo Zacarias <gustavo@zacarias.com.ar>
Tue, 1 Sep 2009 16:04:17 +0000 (13:04 -0300)
committerPeter Korsgaard <jacmet@sunsite.dk>
Thu, 29 Oct 2009 21:59:22 +0000 (22:59 +0100)
Closes #511.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
CHANGES
package/Config.in
package/usb_modeswitch/Config.in [new file with mode: 0644]
package/usb_modeswitch/usb_modeswitch-nostrip.patch [new file with mode: 0644]
package/usb_modeswitch/usb_modeswitch.mk [new file with mode: 0644]

diff --git a/CHANGES b/CHANGES
index d3af70ac47dcab6e7a6702942d2d0192a6d569c0..2f9f81b81759af9e85d46d63fba65888ba509354 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -21,6 +21,7 @@
        #303: add gvfs package
        #477: Add sdl_sound package
        #487: Make kismet package sexier
+       #511: New package usb_modeswitch
        #527: misc fixes for dnsmasq package
        #565: libevent: Bump version and clean up makefile
        #587: Use iptables multipurpose binaries and bump to 1.4.4
index 6afa2118df9fdbd5ea0b3ffde2dd0d885de2ed64..84492a85aa7d3272d5a747ffc77402662c18d3d4 100644 (file)
@@ -270,6 +270,7 @@ if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 # mdev
 source "package/udev/Config.in"
 endif
+source "package/usb_modeswitch/Config.in"
 source "package/usbmount/Config.in"
 source "package/usbutils/Config.in"
 source "package/wipe/Config.in"
diff --git a/package/usb_modeswitch/Config.in b/package/usb_modeswitch/Config.in
new file mode 100644 (file)
index 0000000..41cd3a0
--- /dev/null
@@ -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 (file)
index 0000000..3bb8e8d
--- /dev/null
@@ -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 (file)
index 0000000..fc5d2f6
--- /dev/null
@@ -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)