From 59888f9da03b94b1621257b7ad6a3040b64f453c Mon Sep 17 00:00:00 2001
From: nico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Date: Mon, 24 Jul 2006 19:04:37 +0000
Subject: [PATCH] port microcom to buildroot-ng

git-svn-id: svn://svn.openwrt.org/openwrt/packages@4271 3c298f89-4303-0410-b956-a3cf2f4a3e73
---
 utils/microcom/Makefile | 54 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 utils/microcom/Makefile

diff --git a/utils/microcom/Makefile b/utils/microcom/Makefile
new file mode 100644
index 000000000..c75cf67f0
--- /dev/null
+++ b/utils/microcom/Makefile
@@ -0,0 +1,54 @@
+# 
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id$
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=microcom
+PKG_VERSION:=1.02
+PKG_XVERSION:=102
+PKG_RELEASE:=1
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE:=m$(PKG_XVERSION).tar.gz
+PKG_SOURCE_URL:=http://microcom.port5.com/
+PKG_MD5SUM:=c7817035dc41cb02e7cfb565cf9b7401
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/microcom
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=A serial terminal  emulation program
+  DESCRIPTION:=A serial terminal  emulation program.\\\
+    microcom is a minicom-like serial terminal emulator with scripting \\\
+    support.
+  URL:=http://microcomlinux.homestead.com/
+endef
+
+define Build/Prepare
+	rm -rf $(PKG_BUILD_DIR)
+	mkdir -p $(PKG_BUILD_DIR)
+	# the .tar.gz is different - no subdirectory, so do this manually
+	zcat $(DL_DIR)/$(PKG_SOURCE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS) -
+endef
+
+define Build/Configure
+	$(CP) $(PKG_BUILD_DIR)/Makefile  $(PKG_BUILD_DIR)/Makefile.tmp
+	sed 's~gcc~$$(CC)~' $(PKG_BUILD_DIR)/Makefile.tmp > $(PKG_BUILD_DIR)/Makefile
+endef
+
+define Build/Compile
+	$(MAKE) -C $(PKG_BUILD_DIR) CC=$(TARGET_CC)
+endef
+
+define Package/microcom/install
+	install -d -m0755 $(1)/usr/bin
+	install -m0755 $(PKG_BUILD_DIR)/microcom $(1)/usr/bin
+endef
+
+$(eval $(call BuildPackage,microcom))