krb5: Remove leftover manual patching
[openwrt/svn-archive/archive.git] / utils / firmwarehotplug / Makefile
index 2ad31dc1c261ab82a8987a0f33549abb6d82c442..62bab09f03fec4cc71e12908b53be99b2ec402d7 100644 (file)
@@ -1,5 +1,5 @@
-# 
-# Copyright (C) 2006 OpenWrt.org
+#
+# Copyright (C) 2006-2009 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -14,13 +14,14 @@ PKG_RELEASE:=1
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/linux-hotplug
 PKG_MD5SUM:=e5cf352b172f498e27b160167b981f24
-PKG_CAT:=zcat
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
 
 include $(INCLUDE_DIR)/package.mk
 
+# workaround for fedora sdcc naming changes
+ifneq ($(wildcard /usr/libexec/sdcc),)
+  export PATH:=$(PATH):/usr/libexec
+endif
+
 define Package/firmwarehotplug
   SECTION:=utils
   CATEGORY:=Utilities
@@ -47,33 +48,19 @@ define Package/firmwarehotplug/install
        install -m644 $(PKG_BUILD_DIR)/ezusb/midi/original/ezusbmidi2x2.ihx $(1)/usr/share/usb/ezusbmidi
 endef
 
-$(eval $(call BuildPackage,firmwarehotplug))
-
 define Require/working-sdcc
-        echo 'int main() { return 0; }' >$(TMP_DIR)/a.c; \
-        sdcc -o $(TMP_DIR)/a.out $(TMP_DIR)/a.c; \
-       rm -f $(TMP_DIR)/a.*
+       sdcc -v 2>&1 | awk '($$$$1 == "SDCC") && ($$$$3 == "mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08") { print "ok" }' | grep ok > /dev/null
 endef
 
+$(eval $(call RequireCommand,sdcc, \
+        $(PKG_NAME) requires the SDCC Cross Compiler (sdcc). \
+))
+
 $(eval $(call Require,working-sdcc, \
-        Please install the SDCC Cross Compiler (sdcc). \
+        $(PKG_NAME) requires a SDCC Cross Compiler (sdcc) that supports the following targets : \
+       mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08. You might consider \
+       installing the non-free version. \
 ))
 
-define Require/working-sgml2html
-       echo >$(TMP_DIR)/test.sgml ' \
-<!doctype linuxdoc system> \
-<article> \
-<!-- Title information --> \
-<title>test \
-<author>test \
-<htmlurl url="localhost"> \
-<date>test \
-<sect>test \
-</article>' ; \
-        sgml2html $(TMP_DIR)/test.sgml >$(TMP_DIR)/test.html; \
-       rm -f $(TMP_DIR)/test.*
-endef
+$(eval $(call BuildPackage,firmwarehotplug))
 
-$(eval $(call Require,working-sgml2html, \
-        Please install the sgml-common package (sgml2html). \
-))