62444f1d475aa026dca3b02b5dac7f52c82bc25c
[openwrt/svn-archive/archive.git] / utils / usb-modeswitch / Makefile
1 #
2 # Copyright (C) 2008-2011 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=usb-modeswitch
11 PKG_VERSION:=1.2.0
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=http://www.draisberghof.de/usb_modeswitch
16 PKG_MD5SUM:=1932ab96d6e3c5e0a6bdfac863338627
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/usb-modeswitch
21 SECTION:=utils
22 CATEGORY:=Utilities
23 DEPENDS:=+libusb
24 TITLE:=USB ModeSwitch
25 URL:=http://www.draisberghof.de/usb_modeswitch/
26 endef
27
28 define Package/usb-modeswitch/description
29 A mode switching tool for controlling
30 "flip flop" (multiple device) USB gear.
31 endef
32
33 define 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
38 endef
39
40 define 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
45 endef
46
47 $(eval $(call BuildPackage,usb-modeswitch))