Makefile 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #
  2. # Copyright (C) 2006 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=sed
  9. PKG_VERSION:=4.1.2
  10. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  11. PKG_SOURCE_URL:=ftp://ftp.gnu.org/gnu/$(PKG_NAME)
  12. PKG_MD5SUM:=928f0e06422f414091917401f1a834d0
  13. PKG_CAT:=zcat
  14. PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
  15. include $(INCLUDE_DIR)/host-build.mk
  16. define Build/Configure
  17. (cd $(PKG_BUILD_DIR); rm -rf config.cache; \
  18. SHELL="$(BASH)" \
  19. ./configure \
  20. --prefix=$(STAGING_DIR) \
  21. --prefix=/usr \
  22. );
  23. endef
  24. define Build/Compile
  25. $(MAKE) -C $(PKG_BUILD_DIR) SHELL="$(BASH)"
  26. endef
  27. define Build/Install
  28. @if [ -L $(STAGING_DIR)/bin/sed ] ; then \
  29. rm -f $(STAGING_DIR)/bin/sed; fi;
  30. @if [ ! -f $(STAGING_DIR)/bin/sed -o $(STAGING_DIR)/bin/sed -ot $(PKG_BUILD_DIR)/sed/sed ]; then \
  31. set -x; \
  32. mkdir -p $(STAGING_DIR)/bin; \
  33. $(MAKE) DESTDIR=$(STAGING_DIR) -C $(PKG_BUILD_DIR) install; \
  34. mv $(STAGING_DIR)/usr/bin/sed $(STAGING_DIR)/bin/; \
  35. rm -rf $(STAGING_DIR)/share/locale $(STAGING_DIR)/usr/info \
  36. $(STAGING_DIR)/usr/man $(STAGING_DIR)/usr/share/doc; \
  37. fi
  38. endef
  39. $(eval $(call HostBuild))