No Description

Makefile 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #
  2. # Copyright (C) 2010-2012 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:=grep
  9. PKG_VERSION:=2.20
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@GNU/grep
  13. PKG_MD5SUM:=2cbea44a4f1548aee20b9ff2d3076908
  14. include $(INCLUDE_DIR)/package.mk
  15. define Package/grep
  16. SECTION:=utils
  17. CATEGORY:=Utilities
  18. TITLE:=grep search utility - full version
  19. DEPENDS:=+libpcre
  20. URL:=http://www.gnu.org/software/grep/
  21. endef
  22. define Package/grep/description
  23. The grep command searches one or more input files for lines
  24. containing a match to a specified pattern. By default, grep
  25. prints the matching lines.
  26. endef
  27. define Package/grep/install
  28. $(INSTALL_DIR) $(1)/usr/bin
  29. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/grep $(1)/usr/bin/grep
  30. endef
  31. define Package/grep/postinst
  32. #!/bin/sh
  33. [ -L "$${IPKG_INSTROOT}/bin/grep" ] && rm -f "$${IPKG_INSTROOT}/bin/grep"
  34. exit 0
  35. endef
  36. define Package/grep/prerm
  37. $${IPKG_INSTROOT}/bin/busybox grep -h 2>&1 | grep -q BusyBox && \
  38. ln -sf busybox $${IPKG_INSTROOT}/bin/grep
  39. exit 0
  40. endef
  41. $(eval $(call BuildPackage,grep))