2 # Copyright (C) 2010-2012 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
15 PKG_SOURCE_URL:=@GNU/grep
16 PKG_MD5SUM:=d4a3f03849d1e17ce56ab76aa5a24cab
18 include $(INCLUDE_DIR)/package.mk
23 TITLE:=grep search utility - full version
25 URL:=http://www.gnu.org/software/grep/
28 define Package/grep/description
29 The grep command searches one or more input files for lines
30 containing a match to a specified pattern. By default, grep
31 prints the matching lines.
34 define Package/grep/install
35 $(INSTALL_DIR) $(1)/usr/bin
36 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/grep $(1)/usr/bin/grep
39 define Package/grep/postinst
41 [ -L "$${IPKG_INSTROOT}/bin/grep" ] && rm -f "$${IPKG_INSTROOT}/bin/grep"
45 define Package/grep/prerm
46 $${IPKG_INSTROOT}/bin/busybox grep -h 2>&1 | grep -q BusyBox && \
47 ln -sf busybox $${IPKG_INSTROOT}/bin/grep
51 $(eval $(call BuildPackage,grep))