]> git.ipfire.org Git - ipfire-3.x.git/blob - lfs/flex
Renamed some fields...
[ipfire-3.x.git] / lfs / flex
1 ###############################################################################
2 # #
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007, 2008 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 = flex
28 PKG_VER = 2.5.35
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 MAINTAINER =
38 GROUP = Development/Tools
39 EXTRA = no
40 DEBUG = no
41 DEPS = m4
42
43 URL = http://flex.sourceforge.net/
44 LICENSE = BSD
45 SHORT_DESC = A tool for creating scanners (text pattern recognizers).
46
47 define LONG_DESC
48 The flex program generates scanners. Scanners are programs which can \
49 recognize lexical patterns in text. Flex takes pairs of regular \
50 expressions and C code as input and generates a C source file as \
51 output. The output file is compiled and linked with a library to \
52 produce an executable. The executable searches through its input for \
53 occurrences of the regular expressions. When a match is found, it \
54 executes the corresponding C code. Flex was designed to work with \
55 both Yacc and Bison, and is used by many programs as part of their \
56 build process.
57 endef
58
59 ###############################################################################
60 # Top-level Rules
61 ###############################################################################
62
63 objects = $(DL_FILE)
64
65 download: $(objects)
66
67 info:
68 $(DO_PKG_INFO)
69
70 install: $(OBJECT)
71
72 package:
73 @$(DO_PACKAGE)
74
75 $(objects):
76 @$(LOAD)
77
78 ###############################################################################
79 # Installation Details
80 ###############################################################################
81
82 $(OBJECT): $(objects)
83 @$(PREBUILD)
84 @rm -rf $(DIR_APP) && cd $(DIR_SRC) && $(EXTRACTOR) $(DIR_DL)/$(DL_FILE)
85
86 ifeq "$(STAGE)" "toolchain"
87 cd $(DIR_APP) && \
88 ./configure \
89 $(CONFIGURE_ARCH) \
90 --prefix=$(TOOLS_DIR)
91 cd $(DIR_APP) && make $(PARALLELISMFLAGS)
92 cd $(DIR_APP) && make install
93 endif
94
95 ifeq "$(STAGE)" "base"
96 cd $(DIR_APP) && \
97 ./configure \
98 $(CONFIGURE_ARCH) \
99 --prefix=/usr
100 cd $(DIR_APP) && make $(PARALLELISMFLAGS)
101 cd $(DIR_APP) && make install
102 ln -sfv libfl.a /usr/lib/libl.a
103 echo "#!/bin/sh" > /usr/bin/lex
104 echo "exec /usr/bin/flex -l \"$$@\"" >> /usr/bin/lex
105 chmod 755 /usr/bin/lex
106 endif
107
108 @rm -rf $(DIR_APP)
109 @$(POSTBUILD)