%define tball flex Name: flex-reentrant Version: 2.5.33 Release: 1 Summary: fast lexical analyzer generator Group: Development/Tools License: BSD style URL: http://sourceforge.net/projects/flex/ Source: http://optusnet.dl.sourceforge.net/sourceforge/flex/%{tball}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{tball}-%{version}-%{release}-root-%(%{__id_u} -n) %define _prefix /opt/flex %define _mandir %{_prefix}/man %define _infodir %{_prefix}/info %description The flex program generates scanners. Scanners are programs which can recognize lexical patterns in text. Flex takes pairs of regular expressions and C code as input and generates a C source file as output. The output file is compiled and linked with a library to produce an executable. The executable searches through its input for occurrences of the regular expressions. When a match is found, it executes the corresponding C code. Flex was designed to work with both Yacc and Bison, and is used by many programs as part of their build process. %prep %setup -q -n %{tball}-%{version} %build %configure make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT # Symlink flex++ ln -s %{_bindir}/flex ${RPM_BUILD_ROOT}%{_bindir}/flex++ # Compress docs find ${RPM_BUILD_ROOT}%{_mandir} -type f -exec gzip {} \; find ${RPM_BUILD_ROOT}%{_infodir} -type f -exec gzip {} \; %clean rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,root,-) %doc COPYING NEWS README %{_prefix} %post if [ -x /sbin/install-info ]; then /sbin/install-info %{_infodir}/flex.info.gz %{_infodir}/dir fi %preun rm -f %{_infodir}/dir rm -rf %{_docdir} %changelog * Thu May 11 2006 Bojan Smojver 2.5.33-1 - bump up to 2.5.33 (security update) - install in /opt/flex instead of /usr/local/flex * Sun Jun 12 2005 Bojan Smojver 2.5.31-1 - install in /usr/local/flex, so avoid clash with FC shipped flex