Add firmwarehotplug (#1094)
[openwrt/svn-archive/archive.git] / utils / firmwarehotplug / Makefile
1 #
2 # Copyright (C) 2006 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:=firmwarehotplug
11 PKG_VERSION:=0.1
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/linux-hotplug
16 PKG_MD5SUM:=unknown
17 PKG_CAT:=zcat
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/firmwarehotplug
25 SECTION:=utils
26 CATEGORY:=Utilities
27 DEPENDS:=@USB_SUPPORT +fxload
28 TITLE:=Hotplug firmware for EZ-USB microcontrollers
29 URL:=http://linux-hotplug.sourceforge.net/
30 endef
31
32 define Build/Compile
33 $(call Build/Compile/Default, \
34 -C $(PKG_BUILD_DIR)/ezusb/midi/original \
35 DESTDIR="$(PKG_INSTALL_DIR)" \
36 all install
37 )
38 endef
39
40 define Package/firmwarehotplug/install
41 $(INSTALL_DIR) $(1)/etc/hotplug.d/usb
42 install -m755 $(PKG_BUILD_DIR)/ezusb/midi/original/Hotplug/ezusbmidi $(1)/etc/hotplug.d/usb
43 install -m644 $(PKG_BUILD_DIR)/ezusb/midi/original/Hotplug/ezusbmidi.usermap $(1)/etc/hotplug.d
44 $(INSTALL_DIR) $(1)/usr/share/usb/ezusbmidi
45 install -m644 $(PKG_BUILD_DIR)/ezusb/midi/original/ezusbmidi1x1.ihx $(1)/usr/share/usb/ezusbmidi
46 install -m644 $(PKG_BUILD_DIR)/ezusb/midi/original/ezusbmidi2x2.ihx $(1)/usr/share/usb/ezusbmidi
47 endef
48
49 $(eval $(call BuildPackage,firmwarehotplug))
50
51 $(eval $(call RequireCommand,sdcc, \
52 $(PKG_NAME) requires sdcc. \
53 ))