2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR)/rules.mk
12 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
13 PKG_SOURCE_URL:=ftp://ftp.gnu.org/gnu/$(PKG_NAME)
14 PKG_MD5SUM:=928f0e06422f414091917401f1a834d0
17 PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
19 include $(INCLUDE_DIR)/host-build.mk
21 override SHELL:=$(BASH)
23 define Build/Configure
24 (cd $(PKG_BUILD_DIR); rm -rf config.cache; \
26 --prefix=$(STAGING_DIR) \
32 $(MAKE) -C $(PKG_BUILD_DIR)
36 @if [ -L $(STAGING_DIR)/bin/sed ] ; then \
37 rm -f $(STAGING_DIR)/bin/sed; fi;
38 @if [ ! -f $(STAGING_DIR)/bin/sed -o $(STAGING_DIR)/bin/sed -ot $(PKG_BUILD_DIR)/sed/sed ]; then \
40 mkdir -p $(STAGING_DIR)/bin; \
41 $(MAKE) DESTDIR=$(STAGING_DIR) -C $(PKG_BUILD_DIR) install; \
42 mv $(STAGING_DIR)/usr/bin/sed $(STAGING_DIR)/bin/; \
43 rm -rf $(STAGING_DIR)/share/locale $(STAGING_DIR)/usr/info \
44 $(STAGING_DIR)/usr/man $(STAGING_DIR)/usr/share/doc; \
48 $(eval $(call HostBuild))