|
@@ -0,0 +1,51 @@
|
|
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
|
+
|
|
8
|
+include $(TOPDIR)/rules.mk
|
|
9
|
+
|
|
10
|
+PKG_NAME:=grep
|
|
11
|
+PKG_VERSION:=2.20
|
|
12
|
+PKG_RELEASE:=1
|
|
13
|
+
|
|
14
|
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
|
15
|
+PKG_SOURCE_URL:=@GNU/grep
|
|
16
|
+PKG_MD5SUM:=2cbea44a4f1548aee20b9ff2d3076908
|
|
17
|
+
|
|
18
|
+include $(INCLUDE_DIR)/package.mk
|
|
19
|
+
|
|
20
|
+define Package/grep
|
|
21
|
+ SECTION:=utils
|
|
22
|
+ CATEGORY:=Utilities
|
|
23
|
+ TITLE:=grep search utility - full version
|
|
24
|
+ DEPENDS:=+libpcre
|
|
25
|
+ URL:=http://www.gnu.org/software/grep/
|
|
26
|
+endef
|
|
27
|
+
|
|
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.
|
|
32
|
+endef
|
|
33
|
+
|
|
34
|
+define Package/grep/install
|
|
35
|
+ $(INSTALL_DIR) $(1)/usr/bin
|
|
36
|
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/grep $(1)/usr/bin/grep
|
|
37
|
+endef
|
|
38
|
+
|
|
39
|
+define Package/grep/postinst
|
|
40
|
+#!/bin/sh
|
|
41
|
+[ -L "$${IPKG_INSTROOT}/bin/grep" ] && rm -f "$${IPKG_INSTROOT}/bin/grep"
|
|
42
|
+exit 0
|
|
43
|
+endef
|
|
44
|
+
|
|
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
|
|
48
|
+exit 0
|
|
49
|
+endef
|
|
50
|
+
|
|
51
|
+$(eval $(call BuildPackage,grep))
|