strip quotes in gcc version check
[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:=e5cf352b172f498e27b160167b981f24
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 OPT="$(TARGET_CFLAGS)" \
35 -C $(PKG_BUILD_DIR)/ezusb/midi/original \
36 DESTDIR="$(PKG_INSTALL_DIR)" \
37 all install \
38 )
39 endef
40
41 define Package/firmwarehotplug/install
42 $(INSTALL_DIR) $(1)/etc/hotplug.d/usb
43 install -m755 $(PKG_BUILD_DIR)/ezusb/midi/original/Hotplug/ezusbmidi $(1)/etc/hotplug.d/usb
44 install -m644 $(PKG_BUILD_DIR)/ezusb/midi/original/Hotplug/ezusbmidi.usermap $(1)/etc/hotplug.d
45 $(INSTALL_DIR) $(1)/usr/share/usb/ezusbmidi
46 install -m644 $(PKG_BUILD_DIR)/ezusb/midi/original/ezusbmidi1x1.ihx $(1)/usr/share/usb/ezusbmidi
47 install -m644 $(PKG_BUILD_DIR)/ezusb/midi/original/ezusbmidi2x2.ihx $(1)/usr/share/usb/ezusbmidi
48 endef
49
50 $(eval $(call BuildPackage,firmwarehotplug))
51
52 $(eval $(call RequireCommand,sdcc, \
53 Please install the SDCC Cross Compiler (sdcc). \
54 ))