[packages] lcd4linux: rework drivers/plugins configuration and dependencies (closes...
[openwrt/svn-archive/archive.git] / utils / microcom / Makefile
index c75cf67f03110e771588dfe931004a3d2ced4b6a..17c7e047c94b1fb56634b1bfffcf9a653204252e 100644 (file)
@@ -4,51 +4,44 @@
 # 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:=m102.tar.gz
 PKG_SOURCE_URL:=http://microcom.port5.com/
 PKG_MD5SUM:=c7817035dc41cb02e7cfb565cf9b7401
 
 include $(INCLUDE_DIR)/package.mk
 
+PKG_UNPACK:=zcat $(DL_DIR)/$(PKG_SOURCE) | $(TAR) -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
+
 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.
+  TITLE:=A serial terminal emulation program
   URL:=http://microcomlinux.homestead.com/
+  SUBMENU:=terminal
 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
+define Package/microcom/description
+       microcom is a minicom-like serial terminal emulator with scripting 
+       support.
 endef
 
 define Build/Compile
-       $(MAKE) -C $(PKG_BUILD_DIR) CC=$(TARGET_CC)
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               $(TARGET_CONFIGURE_OPTS) \
+               CFLAGS="$(TARGET_CFLAGS)" \
+               microcom
 endef
 
 define Package/microcom/install
-       install -d -m0755 $(1)/usr/bin
-       install -m0755 $(PKG_BUILD_DIR)/microcom $(1)/usr/bin
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/microcom $(1)/usr/bin/
 endef
 
 $(eval $(call BuildPackage,microcom))