]>
Commit | Line | Data |
---|---|---|
cd1a2927 | 1 | ############################################################################### |
cd1a2927 | 2 | # # |
70df8302 | 3 | # IPFire.org - A linux based firewall # |
d6228ba1 | 4 | # Copyright (C) 2007, 2008, 2009 Michael Tremer & Christian Schmidt # |
70df8302 MT |
5 | # # |
6 | # This program is free software: you can redistribute it and/or modify # | |
cd1a2927 | 7 | # it under the terms of the GNU General Public License as published by # |
70df8302 | 8 | # the Free Software Foundation, either version 3 of the License, or # |
cd1a2927 MT |
9 | # (at your option) any later version. # |
10 | # # | |
70df8302 | 11 | # This program is distributed in the hope that it will be useful, # |
cd1a2927 MT |
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 # | |
70df8302 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. # |
cd1a2927 | 18 | # # |
cd1a2927 MT |
19 | ############################################################################### |
20 | ||
21 | ############################################################################### | |
22 | # Definitions | |
23 | ############################################################################### | |
24 | ||
25 | include Config | |
26 | ||
be472d5a | 27 | PKG_NAME = grep |
64d53008 | 28 | VER = 2.5.3 |
d6228ba1 | 29 | PKG_VER = 0 |
cd1a2927 | 30 | |
be472d5a | 31 | THISAPP = $(PKG_NAME)-$(VER) |
cd1a2927 | 32 | DL_FILE = $(THISAPP).tar.bz2 |
cd1a2927 MT |
33 | DIR_APP = $(DIR_SRC)/$(THISAPP) |
34 | ||
6679675b | 35 | OBJECT = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP) |
cd1a2927 | 36 | |
d6228ba1 MT |
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 | ||
cd1a2927 MT |
54 | ############################################################################### |
55 | # Top-level Rules | |
56 | ############################################################################### | |
57 | ||
64d53008 MT |
58 | objects = $(DL_FILE) \ |
59 | $(THISAPP)-upstream_fixes-1.patch \ | |
60 | $(THISAPP)-debian_fixes-1.patch | |
cd1a2927 | 61 | |
d6228ba1 MT |
62 | download: $(objects) |
63 | ||
64 | info: | |
65 | $(DO_PKG_INFO) | |
66 | ||
67 | install: $(OBJECT) | |
cd1a2927 | 68 | |
d6228ba1 MT |
69 | package: |
70 | @$(DO_PACKAGE) | |
cd1a2927 | 71 | |
d6228ba1 | 72 | $(objects): |
cd1a2927 MT |
73 | @$(LOAD) |
74 | ||
cd1a2927 MT |
75 | ############################################################################### |
76 | # Installation Details | |
77 | ############################################################################### | |
78 | ||
d6228ba1 | 79 | $(OBJECT): $(objects) |
cd1a2927 | 80 | @$(PREBUILD) |
d6228ba1 | 81 | @rm -rf $(DIR_APP) && cd $(DIR_SRC) && $(EXTRACTOR) $(DIR_DL)/$(DL_FILE) |
0e61af85 MT |
82 | |
83 | ifeq "$(STAGE)" "toolchain" | |
88068980 MT |
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. | |
865f651f MT |
86 | cd $(DIR_APP) && \ |
87 | ./configure \ | |
88068980 | 88 | $(CONFIGURE_ARCH) \ |
865f651f MT |
89 | --prefix=$(TOOLS_DIR) \ |
90 | --disable-perl-regexp \ | |
91 | --without-included-regex | |
3d84c75d | 92 | cd $(DIR_APP) && make $(PARALLELISMFLAGS) |
be472d5a | 93 | cd $(DIR_APP) && make install |
0e61af85 MT |
94 | endif |
95 | ||
96 | ifeq "$(STAGE)" "base" | |
64d53008 MT |
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 | |
865f651f MT |
99 | cd $(DIR_APP) && \ |
100 | ./configure \ | |
e61eefe1 | 101 | $(CONFIGURE_ARCH) \ |
865f651f MT |
102 | --prefix=/usr \ |
103 | --bindir=/bin \ | |
104 | --without-included-regex | |
3d84c75d | 105 | cd $(DIR_APP) && make $(PARALLELISMFLAGS) |
0e61af85 MT |
106 | cd $(DIR_APP) && make install |
107 | endif | |
108 | ||
cd1a2927 MT |
109 | @rm -rf $(DIR_APP) |
110 | @$(POSTBUILD) |