Do not use macro for installation
[profile/ivi/flex.git] / packaging / flex.spec
1 Name:           flex
2 Version:        2.5.35
3 Release:        2
4 License:        BSD
5 Summary:        A tool for creating scanners (text pattern recognizers)
6 Url:            http://flex.sourceforge.net/
7 Group:          Development/Tools
8 Source:         http://prdownloads.sourceforge.net/flex/flex-%{version}.tar.bz2
9 Source1001:     flex.manifest 
10 Patch0:         flex-2.5.35-sign.patch
11 # borrowed from fc12
12 Patch1:         flex-2.5.35-hardening.patch
13 Patch2:         flex-2.5.35-gcc44.patch
14 BuildRequires:  bison
15 BuildRequires:  m4
16 Requires:       m4
17
18 %description
19 The flex program generates scanners.  Scanners are programs which can
20 recognize lexical patterns in text.  Flex takes pairs of regular
21 expressions and C code as input and generates a C source file as
22 output.  The output file is compiled and linked with a library to
23 produce an executable.  The executable searches through its input for
24 occurrences of the regular expressions.  When a match is found, it
25 executes the corresponding C code.  Flex was designed to work with
26 both Yacc and Bison, and is used by many programs as part of their
27 build process.
28
29 You should install flex if you are going to use your system for
30 application development.
31
32 %prep
33 %setup -q
34 %patch0 -p1
35 %patch1 -p1
36 %patch2 -p1
37
38 %build
39 cp %{SOURCE1001} .
40 %configure --disable-dependency-tracking CFLAGS="-fPIC %{optflags}" --disable-nls
41 make %{?_smp_mflags}
42
43 %install
44 make install DESTDIR=%{buildroot}
45 rm -f %{buildroot}/%{_infodir}/*
46
47 ( cd %{buildroot}
48   ln -sf flex .%{_bindir}/lex
49   ln -sf flex .%{_bindir}/flex++
50   ln -s libfl.a .%{_libdir}/libl.a
51 )
52
53 %remove_docs
54
55 %files 
56 %manifest flex.manifest
57 %doc COPYING
58 %{_bindir}/*
59 %{_libdir}/*.a
60 %{_includedir}/FlexLexer.h
61