Makefile 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #
  2. # Copyright (C) 2010-2016 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:=3.8
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@GNU/grep
  13. PKG_HASH:=498d7cc1b4fb081904d87343febb73475cf771e424fb7e6141aff66013abc382
  14. PKG_MAINTAINER:=Julen Landa Alustiza <julen@zokormazo.info>
  15. PKG_LICENSE:=GPL-3.0-or-later
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_CPE_ID:=cpe:/a:gnu:grep
  18. PKG_INSTALL:=1
  19. PKG_BUILD_PARALLEL:=1
  20. MAKE_FLAGS += SHELL="/bin/sh"
  21. include $(INCLUDE_DIR)/package.mk
  22. define Package/grep
  23. SECTION:=utils
  24. CATEGORY:=Utilities
  25. TITLE:=grep search utility - full version
  26. DEPENDS:=+libpcre2
  27. URL:=https://www.gnu.org/software/grep/
  28. ALTERNATIVES:=\
  29. 300:/bin/egrep:/usr/libexec/egrep-gnu \
  30. 300:/bin/fgrep:/usr/libexec/fgrep-gnu \
  31. 300:/bin/grep:/usr/libexec/grep-gnu
  32. endef
  33. define Package/grep/description
  34. The grep command searches one or more input files for lines
  35. containing a match to a specified pattern. By default, grep
  36. prints the matching lines.
  37. endef
  38. define Package/grep/install
  39. $(INSTALL_DIR) $(1)/usr/libexec
  40. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/egrep $(1)/usr/libexec/egrep-gnu
  41. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fgrep $(1)/usr/libexec/fgrep-gnu
  42. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/grep $(1)/usr/libexec/grep-gnu
  43. endef
  44. $(eval $(call BuildPackage,grep))