]> git.ipfire.org Git - ipfire-3.x.git/blob - lfs/grep
Renamed some fields...
[ipfire-3.x.git] / lfs / grep
1 ###############################################################################
2 # #
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007, 2008, 2009 Michael Tremer & Christian Schmidt #
5 # #
6 # This program is free software: you can redistribute it and/or modify #
7 # it under the terms of the GNU General Public License as published by #
8 # the Free Software Foundation, either version 3 of the License, or #
9 # (at your option) any later version. #
10 # #
11 # This program is distributed in the hope that it will be useful, #
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14 # GNU General Public License for more details. #
15 # #
16 # You should have received a copy of the GNU General Public License #
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
18 # #
19 ###############################################################################
20
21 ###############################################################################
22 # Definitions
23 ###############################################################################
24
25 include Config
26
27 PKG_NAME = grep
28 PKG_VER = 2.5.3
29 PKG_REL = 0
30
31 THISAPP = $(PKG_NAME)-$(PKG_VER)
32 DL_FILE = $(THISAPP).tar.bz2
33 DIR_APP = $(DIR_SRC)/$(THISAPP)
34
35 OBJECT = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP)
36
37
38 MAINTAINER =
39 GROUP = Applications/Text
40 EXTRA = no
41 DEBUG = no
42 DEPS =
43
44 URL = http://www.gnu.org/software/grep/
45 LICENSE = GPLv3+
46 SHORT_DESC = A pattern matching utilities.
47
48 define LONG_DESC
49 The GNU versions of commonly used grep utilities. Grep searches through \
50 textual input for lines which contain a match to a specified pattern and then \
51 prints the matching lines. GNU's grep utilities include grep, egrep and fgrep.
52 endef
53
54 ###############################################################################
55 # Top-level Rules
56 ###############################################################################
57
58 objects = $(DL_FILE) \
59 $(THISAPP)-upstream_fixes-1.patch \
60 $(THISAPP)-debian_fixes-1.patch
61
62 download: $(objects)
63
64 info:
65 $(DO_PKG_INFO)
66
67 install: $(OBJECT)
68
69 package:
70 @$(DO_PACKAGE)
71
72 $(objects):
73 @$(LOAD)
74
75 ###############################################################################
76 # Installation Details
77 ###############################################################################
78
79 $(OBJECT): $(objects)
80 @$(PREBUILD)
81 @rm -rf $(DIR_APP) && cd $(DIR_SRC) && $(EXTRACTOR) $(DIR_DL)/$(DL_FILE)
82
83 ifeq "$(STAGE)" "toolchain"
84 # --without-included-regex makes Grep use libc for regex. This gets rid of
85 # some compiler warnings, and I can't imagine why it's unsafe.
86 cd $(DIR_APP) && \
87 ./configure \
88 $(CONFIGURE_ARCH) \
89 --prefix=$(TOOLS_DIR) \
90 --disable-perl-regexp \
91 --without-included-regex
92 cd $(DIR_APP) && make $(PARALLELISMFLAGS)
93 cd $(DIR_APP) && make install
94 endif
95
96 ifeq "$(STAGE)" "base"
97 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-debian_fixes-1.patch
98 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-upstream_fixes-1.patch
99 cd $(DIR_APP) && \
100 ./configure \
101 $(CONFIGURE_ARCH) \
102 --prefix=/usr \
103 --bindir=/bin \
104 --without-included-regex
105 cd $(DIR_APP) && make $(PARALLELISMFLAGS)
106 cd $(DIR_APP) && make install
107 endif
108
109 @rm -rf $(DIR_APP)
110 @$(POSTBUILD)