source: packages/utils/usb-modeswitch/Makefile @ 22062

Last change on this file since 22062 was 22062, checked in by jow, 6 years ago

[packages] usb-modeswitch: add hotplug handler to invoke usb_modeswitch when a flip flop dongle is detected, the handler should be 100% compatible to Debian usb-modeswitch-data config collection

File size: 1.2 KB
Line 
1#
2# Copyright (C) 2008-2010 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=usb-modeswitch
11PKG_VERSION:=1.1.2
12PKG_RELEASE:=2
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15PKG_SOURCE_URL:=http://www.draisberghof.de/usb_modeswitch
16PKG_MD5SUM:=071cb300d00938bfe20025c654303d92
17
18include $(INCLUDE_DIR)/package.mk
19
20define Package/usb-modeswitch
21  SECTION:=utils
22  CATEGORY:=Utilities
23  DEPENDS:=+libusb
24  TITLE:=USB ModeSwitch
25  URL:=http://www.draisberghof.de/usb_modeswitch/
26endef
27
28define Package/usb-modeswitch/description
29  A mode switching tool for controlling
30  "flip flop" (multiple device) USB gear.
31endef
32
33define Build/Compile
34        $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS) \
35                -lusb \
36                -o $(PKG_BUILD_DIR)/usb_modeswitch-OpenWrt \
37                                $(PKG_BUILD_DIR)/usb_modeswitch.c
38endef
39
40define Package/usb-modeswitch/install
41        $(INSTALL_DIR) $(1)/usr/bin
42        $(INSTALL_BIN) $(PKG_BUILD_DIR)/usb_modeswitch-OpenWrt $(1)/usr/bin/usb_modeswitch
43        $(INSTALL_DIR) $(1)/etc/hotplug.d/usb
44        $(INSTALL_DATA) ./files/modeswitch.hotplug $(1)/etc/hotplug.d/usb/20-modeswitch
45endef
46
47$(eval $(call BuildPackage,usb-modeswitch))
Note: See TracBrowser for help on using the repository browser.