source: spec/trunk/SPECS/flex.spec@ 1010

Last change on this file since 1010 was 299, checked in by Yuri Dario, 14 years ago

spec: bison, flex, fixed m4 executable location.

File size: 3.1 KB
Line 
1Summary: A tool for creating scanners (text pattern recognizers)
2Name: flex
3Version: 2.5.35
4Release: 2%{?dist}
5License: BSD
6Group: Development/Tools
7URL: http://flex.sourceforge.net/
8Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
9Patch0: flex-2.5.35-sign.patch
10Patch1: flex-2.5.35-hardening.patch
11Patch2: flex-2.5.35-gcc44.patch
12Patch3: flex-2.5.35-missing-prototypes.patch
13Patch4: flex-os2.patch
14BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
15Requires: m4
16BuildRequires: gettext bison m4
17
18# We need to pull in the static library package. That's necessary so
19# that packages that just do BuildRequires: flex can still use -lfl.
20# I suspect that linking to -lfl is actually rare and those (few)
21# packages that do use it could be taught to require the sub-package
22# explicitly. So at some point in future, this dependency may be
23# dropped.
24#Requires: flex-static = %{version}
25
26%description
27The flex program generates scanners. Scanners are programs which can
28recognize lexical patterns in text. Flex takes pairs of regular
29expressions and C code as input and generates a C source file as
30output. The output file is compiled and linked with a library to
31produce an executable. The executable searches through its input for
32occurrences of the regular expressions. When a match is found, it
33executes the corresponding C code. Flex was designed to work with
34both Yacc and Bison, and is used by many programs as part of their
35build process.
36
37You should install flex if you are going to use your system for
38application development.
39
40# We keep the libraries in separate sub-package to allow for multilib
41# installations of flex.
42#%package static
43#Summary: Libraries for flex scanner generator
44#Group: Development/Tools
45
46#%description static
47#This package contains the library with default implementations of
48#`main' and `yywrap' functions that the client binary can choose to use
49#instead of implementing their own.
50
51%prep
52%setup -q
53%patch0 -p1
54%patch1 -p1
55%patch2 -p1
56%patch3 -p1
57%patch4 -p1
58
59%build
60export CONFIG_SHELL="/@unixroot/usr/bin/sh.exe"
61export LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
62export LIBS="-lurpo -lmmap"
63export M4="/@unixroot/usr/bin/m4.exe"
64%configure \
65 --disable-dependency-tracking \
66 "--cache-file=%{_topdir}/cache/%{name}-%{_target_cpu}.cache"
67
68make %{?_smp_mflags}
69
70%install
71rm -rf $RPM_BUILD_ROOT
72make DESTDIR=$RPM_BUILD_ROOT install
73rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
74rm -f $RPM_BUILD_ROOT/%{_libdir}/*.a
75
76( cd ${RPM_BUILD_ROOT}
77 ln -sf flex .%{_bindir}/lex
78 ln -sf flex .%{_bindir}/flex++
79 ln -s flex.1 .%{_mandir}/man1/lex.1
80 ln -s flex.1 .%{_mandir}/man1/flex++.1
81)
82
83#%check
84#echo ============TESTING===============
85#make check
86#echo ============END TESTING===========
87
88%clean
89rm -rf ${RPM_BUILD_ROOT}
90
91%files
92%defattr(-,root,root)
93%doc COPYING NEWS README
94%{_bindir}/*
95%{_mandir}/man1/*
96%{_includedir}/FlexLexer.h
97%{_infodir}/flex.info*
98%{_usr}/share/locale/*
99
100#%files static
101#%defattr(-,root,root)
102#%{_libdir}/*.a
103
104%changelog
105* Tue Feb 28 2012 yd
106- fixed m4 executable location.
107
108* Fri Jan 06 2012 yd
109- initial unixroot build.
Note: See TracBrowser for help on using the repository browser.