add a patch to use target optimization flags, use PKG_UNPACK instead of overriding...
authorNicolas Thill <nico@openwrt.org>
Mon, 30 Oct 2006 09:47:22 +0000 (09:47 +0000)
committerNicolas Thill <nico@openwrt.org>
Mon, 30 Oct 2006 09:47:22 +0000 (09:47 +0000)
SVN-Revision: 5339

utils/microcom/Makefile
utils/microcom/patches/01-cross_compile.patch [new file with mode: 0644]

index 874afda..3a30441 100644 (file)
@@ -10,41 +10,37 @@ 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
 
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_UNPACK:=zcat $(DL_DIR)/$(PKG_SOURCE) | $(TAR) -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
+
 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.
+  TITLE:=A serial terminal emulation program
+  DESCRIPTION:=\
+       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
+define Build/Compile
+       $(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 -m0755 $(PKG_BUILD_DIR)/microcom $(1)/usr/bin/
 endef
 
 $(eval $(call BuildPackage,microcom))
diff --git a/utils/microcom/patches/01-cross_compile.patch b/utils/microcom/patches/01-cross_compile.patch
new file mode 100644 (file)
index 0000000..f6e44a8
--- /dev/null
@@ -0,0 +1,29 @@
+diff -ruN microcom-1.02-old/Makefile microcom-1.02-new/Makefile
+--- microcom-1.02-old/Makefile 2006-10-29 21:55:45.000000000 +0100
++++ microcom-1.02-new/Makefile 2006-10-29 22:00:09.000000000 +0100
+@@ -19,19 +19,19 @@
+ #** Rev. 0.91 - Jan. 2000 - minor fixes, compiled under Mandrake 6.0
+ #****************************************************************************/
+ microcom: microcom.o mux.o script.o help.o autodet.o
+-      gcc -o microcom microcom.o mux.o script.o help.o autodet.o
++      $(CC) -o microcom microcom.o mux.o script.o help.o autodet.o
+ autodet.o: autodet.c microcom.h
+-      gcc -O -c autodet.c
++      $(CC) $(CFLAGS)  -c autodet.c
+ script.o: script.c script.h microcom.h
+-      gcc -O -c script.c
++      $(CC) $(CFLAGS) -c script.c
+ mux.o: mux.c microcom.h
+-      gcc -O -c mux.c
++      $(CC) $(CFLAGS) -c mux.c
+ microcom.o: microcom.c microcom.h
+-      gcc -O -c microcom.c
++      $(CC) $(CFLAGS) -c microcom.c
+ help.o: help.c microcom.h
+-      gcc -O -c help.c
++      $(CC) $(CFLAGS) -c help.c