2 # Copyright (C) 2006-2009 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
10 PKG_NAME
:=firmwarehotplug
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=@SF
/linux-hotplug
16 PKG_MD5SUM
:=e5cf352b172f498e27b160167b981f24
21 include $(INCLUDE_DIR
)/package.mk
23 # workaround for fedora sdcc naming changes
24 ifneq ($(wildcard /usr
/libexec
/sdcc
),)
25 export PATH
:=$(PATH
):/usr
/libexec
28 define Package
/firmwarehotplug
31 DEPENDS
:=@USB_SUPPORT
+fxload
32 TITLE
:=Hotplug firmware for EZ-USB microcontrollers
33 URL
:=http
://linux-hotplug.sourceforge.net
/
36 MAKE_PATH
:=ezusb
/midi
/original
39 OPT
="$(TARGET_CFLAGS)"
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
50 define Require
/working-sdcc
51 sdcc
-v
2>&1 | awk
'($$$$1 == "SDCC") && ($$$$3 ~ "mcs51/gbz80/z80" && $$$$3 ~ "/ds390/pic16/pic14/TININative") { print "ok" }' | grep ok
> /dev
/null
54 $(eval
$(call RequireCommand
,sdcc
, \
55 $(PKG_NAME
) requires the SDCC Cross Compiler
(sdcc
). \
58 $(eval
$(call Require
,working-sdcc
, \
59 $(PKG_NAME
) requires a SDCC Cross Compiler
(sdcc
) that supports the following targets
: \
60 mcs51
/gbz80
/z80
/avr
/ds390
/pic16
/pic14
/TININative
/xa51
/ds400
/hc08. You might consider \
61 installing the non-free version. \
64 $(eval
$(call BuildPackage
,firmwarehotplug
))