1 |
Summary: A tool for creating scanners (text pattern recognizers) |
2 |
Name: flex |
3 |
Version: 2.5.35 |
4 |
Release: %mkrel 7 |
5 |
License: BSD |
6 |
Group: Development/Other |
7 |
URL: http://flex.sourceforge.net/ |
8 |
Source0: http://prdownloads.sourceforge.net/flex/%{name}-%{version}.tar.bz2 |
9 |
Patch0: flex-2.5.4a-skel.patch |
10 |
# Fedora patches |
11 |
Patch100: flex-2.5.35-sign.patch |
12 |
Patch101: flex-2.5.35-hardening.patch |
13 |
Patch102: flex-2.5.35-gcc44.patch |
14 |
BuildRequires: bison |
15 |
Requires: m4 |
16 |
Conflicts: flex-reentrant |
17 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot |
18 |
|
19 |
%description |
20 |
The flex program generates scanners. Scanners are |
21 |
programs which can recognize lexical patterns in text. |
22 |
|
23 |
Flex takes pairs of regular expressions and C code as input and |
24 |
generates a C source file as output. The output file is compiled and |
25 |
linked with a library to produce an executable. |
26 |
|
27 |
The executable searches through its input for occurrences of the |
28 |
regular expressions. When a match is found, it executes the |
29 |
corresponding C code. |
30 |
|
31 |
Flex was designed to work with both Yacc and Bison, and is used by |
32 |
many programs as part of their build process. |
33 |
|
34 |
You should install flex if you are going to use your system for |
35 |
application development. |
36 |
|
37 |
%prep |
38 |
%setup -q |
39 |
%patch0 -p0 |
40 |
|
41 |
%patch100 -p1 |
42 |
%patch101 -p1 |
43 |
%patch102 -p1 |
44 |
|
45 |
# Force regeneration of skel.c with Patch2 changes |
46 |
rm -f skel.c |
47 |
# Force regeneration of configure script with --libdir= support |
48 |
autoconf |
49 |
|
50 |
%build |
51 |
CFLAGS="-fPIC %optflags" %configure2_5x \ |
52 |
--disable-rpath |
53 |
%make |
54 |
|
55 |
%check |
56 |
make check |
57 |
|
58 |
%install |
59 |
rm -rf %{buildroot} |
60 |
|
61 |
%makeinstall_std |
62 |
|
63 |
%find_lang %{name} |
64 |
|
65 |
#cd %{buildroot}%{_bindir} |
66 |
#ln -sf flex lex |
67 |
|
68 |
#cd %{buildroot}%{_mandir}/ |
69 |
#cd man1 |
70 |
#ln -s flex.1 lex.1 |
71 |
#ln -s flex.1 flex++.1 |
72 |
|
73 |
pushd %{buildroot} |
74 |
ln -sf flex .%{_bindir}/lex |
75 |
#ln -sf flex .%{_bindir}/flex++ |
76 |
ln -s flex.1 .%{_mandir}/man1/lex.1 |
77 |
ln -s flex.1 .%{_mandir}/man1/flex++.1 |
78 |
popd |
79 |
|
80 |
%clean |
81 |
rm -rf %{buildroot} |
82 |
|
83 |
%files -f %{name}.lang |
84 |
%defattr(-,root,root) |
85 |
%doc NEWS README |
86 |
%{_bindir}/* |
87 |
%{_mandir}/man1/* |
88 |
%{_libdir}/libfl*.a |
89 |
%{_includedir}/FlexLexer.h |
90 |
%{_infodir}/* |
91 |
|
92 |
|