]> git.pld-linux.org Git - packages/flex.git/blob - flex.spec
- up to 2.6.2
[packages/flex.git] / flex.spec
1 # NOTE: 2.5.35+ can't deal with "[[" "]]" strings in sources, needs workarounds like space separation
2 #       (or non-trivial update of m4-quotes patch)
3 # NOTE on shared libfl:
4 #       It exports two functions, yywrap() and main();
5 #       - because of the latter, unnecessary linking with shared -lfl would harm,
6 #         so it would require large cleanup of other projects;
7 #       - when some code wants yywrap(), but no main(), using shared libfl is NOT POSSIBLE.
8 #       Thus, shared libfl would be of little use.
9 Summary:        GNU fast lexical analyzer generator
10 Summary(de.UTF-8):      GNU - schneller lexikalischer Analysegenerator
11 Summary(es.UTF-8):      Generador rápido de analizadores léxicos de la GNU
12 Summary(fr.UTF-8):      Générateur rapide d'analyseur lexical de GNU
13 Summary(pl.UTF-8):      Szybki generator analizatora składni GNU (flex)
14 Summary(pt_BR.UTF-8):   Gerador rápido de analisadores léxicos da GNU
15 Summary(ru.UTF-8):      Быстрый генератор лексических анализаторов GNU
16 Summary(tr.UTF-8):      GNU sözdizim çözümleyici
17 Summary(uk.UTF-8):      Швидкий генератор лексичних аналізаторів GNU
18 Name:           flex
19 Version:        2.6.2
20 Release:        1
21 License:        BSD-like
22 Group:          Development/Tools
23 Source0:        https://github.com/westes/flex/archive/v%{version}.tar.gz
24 # Source0-md5:  acde3a89ef2b376aac94586fd5fda460
25 Source1:        http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
26 # Source1-md5:  fd79ee2834b290e74c626f0bbfc8942f
27 Patch0:         %{name}-info.patch
28 Patch1:         %{name}-pic.patch
29 # patch #869230 (second version of bug #720983 fix - from flex BTS)
30 # outdated as for 2.5.34+, but contains testcase
31 Patch2:         %{name}-m4-quotes.diff
32 Patch3:         %{name}-build.patch
33 URL:            http://flex.sourceforge.net/
34 BuildRequires:  autoconf >= 2.54
35 BuildRequires:  automake >= 1:1.14.1
36 BuildRequires:  bison
37 # to rebuild scan.c from scan.l (m4-quotes patch)
38 #BuildRequires: flex
39 BuildRequires:  gettext-tools >= 0.19
40 BuildRequires:  help2man
41 BuildRequires:  libtool >= 2:2
42 # to rebuild skel.c from patched flex.skl
43 BuildRequires:  m4
44 BuildRequires:  tar >= 1:1.22
45 BuildRequires:  texinfo
46 BuildRequires:  texinfo-texi2dvi
47 BuildRequires:  texlive-fonts-cmsuper
48 BuildRequires:  texlive-pdftex
49 BuildRequires:  util-linux
50 BuildRequires:  xz
51 Requires:       m4
52 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53
54 %description
55 This is the GNU fast lexical analyzer generator. It generates lexical
56 tokenizing code based on a lexical (regular expression based)
57 description of the input. It is designed to work with both yacc and
58 bison, and is used by many programs as part of their build process.
59
60 %description -l de.UTF-8
61 GNU, der schnelle lexikalische Analysengenerator. Er erzeugt
62 lexikalischen Token-Code, basierend auf einer lexikalischen
63 Beschreibung (reguläre Ausdrucksbasis) der Eingabe. Ausgelegt zum
64 Arbeiten mit yacc und bison, wird er von vielen Programmen als Teil
65 des Build-Vorgangs verwendet.
66
67 %description -l es.UTF-8
68 Este es el creador GNU de análisis léxica rápida. Crea códigos léxicos
69 tokenizados basados en una descripción léxica (basado en expresiones
70 regulares) de la entrada. Está designado a trabajar tanto con yacc
71 como con bison, y se utiliza en varios programas como parte del su
72 proceso de programación.
73
74 %description -l fr.UTF-8
75 Générateur rapide d'analyseur lexical de GNU. Il génère du code
76 lexical sous forme de tokens basé sur une description lexicale (basé
77 sur les expressions rationnelles) de son entrée. Il est conçu pour
78 fonctionner avec yacc et bison, et est utilisé par de nombreux
79 programmes comme faisant partie de leur phase de construction.
80
81 %description -l pl.UTF-8
82 GNU flex służy do tworzenia programu analizy leksykalnej na podstawie
83 wyrażeń regularnych i dyrektyw C zawartych w jednym lub więcej plikach
84 wejściowych. Przeznaczony do współpracy z parserami yacc i bison, jest
85 używany przez wiele programów w procesie kompilacji.
86
87 %description -l pt_BR.UTF-8
88 Este é o gerador GNU de análise léxica rápida. Ele gera códigos
89 léxicos tokenizados baseados em uma descrição léxica (baseado em
90 expressões regulares) da entrada. Ele é designado para trabalhar tanto
91 com yacc como com bison, e é utilizado em vários programas como parte
92 do seu processo de programação.
93
94 %description -l ru.UTF-8
95 Программа flex генерирует сканнеры. Сканнеры - это программы,
96 способные распознавать лексические шаблоны в тексте. flex принимает на
97 входе пару регулярных выражений и C код и генерирует исходные файлы на
98 языке C. Исходный файл компилируется и связывается с библиотекой для
99 создания исполняемого файла, который будет просматривать свой входной
100 поток данных в поиске регулярных выражений. При нахождении будет
101 исполняться заданный C код. flex был разработан для работы как с
102 системой Yacc, так и Bison, и используется многими программами как
103 часть процесса их построения из исходных текстов.
104
105 Вам следует установить flex, если вы собираетесь использовать свою
106 систему для разработки программ.
107
108 %description -l tr.UTF-8
109 Bu paket, giriş olarak okuduğu bilgiyi kendisine düzgün deyimler
110 olarak belirtilen kurallar çerçevesinde birimlere böler. yacc ve bison
111 paketleri ile birlikte çalışacak şekilde tasarlanmıştır. Pek çok
112 programın derlenme aşamasında kullanılır.
113
114 %description -l uk.UTF-8
115 Програма flex генерує сканери. Сканери - це програми, які можуть
116 розпізнавати лексичні шаблони в тексті. flex приймає на вході пару
117 регулярних виразів та C код та генерує вихідні файли на мові C.
118 Вихідний файл компілюється та зв'язується з бібліотекою для створення
119 виконуваного файлу, що проглядатиме свій вхідний потік даних в пошуку
120 регулярних виразів. При знаходженні виконуватиметься заданий C код.
121 flex був розроблений для роботи як з системою Yacc, так і Bison, та
122 використовується багатьма програмами в процесі їх побудови з вихідних
123 текстів.
124
125 Вам слід встановити flex, якщо ви збираєтесь використовувати свою
126 систему для розробки програм.
127
128 %package examples
129 Summary:        Flex examples
130 Summary(pl.UTF-8):      Przykłady dla fleksa
131 Group:          Development/Tools
132
133 %description examples
134 Flex examples.
135
136 %description examples -l pl.UTF-8
137 Przykłady dla fleksa.
138
139 %prep
140 %setup -q
141 %patch0 -p1
142 %patch1 -p1
143 #%patch2 -p1
144 %patch3 -p1
145
146 # force regeneration (just in case make didn't want to)
147 %{__rm} -f src/skel.c
148
149 %build
150 %{__gettextize}
151 %{__libtoolize}
152 %{__aclocal} -I m4
153 %{__autoconf}
154 %{__autoheader}
155 %{__automake}
156 %configure \
157         --disable-shared
158
159 %{__make}
160
161 %install
162 rm -rf $RPM_BUILD_ROOT
163 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
164
165 %{__make} install \
166         DESTDIR=$RPM_BUILD_ROOT
167
168 ln -sf flex $RPM_BUILD_ROOT%{_bindir}/lex
169 ln -sf flex $RPM_BUILD_ROOT%{_bindir}/flex++
170
171 echo .so flex.1 > $RPM_BUILD_ROOT%{_mandir}/man1/flex++.1
172 echo .so flex.1 > $RPM_BUILD_ROOT%{_mandir}/man1/lex.1
173
174 bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
175 %{__rm} $RPM_BUILD_ROOT%{_mandir}/README.flex-non-english-man-pages
176
177 rm -f $RPM_BUILD_ROOT%{_infodir}/dir
178
179 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
180
181 # no external dependencies
182 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
183
184 %find_lang %{name}
185
186 %clean
187 rm -rf $RPM_BUILD_ROOT
188
189 %post   -p /sbin/postshell
190 -/usr/sbin/fix-info-dir -c %{_infodir}
191
192 %postun -p /sbin/postshell
193 -/usr/sbin/fix-info-dir -c %{_infodir}
194
195 %files -f %{name}.lang
196 %defattr(644,root,root,755)
197 %doc AUTHORS COPYING NEWS README.md THANKS
198 %attr(755,root,root) %{_bindir}/flex
199 %attr(755,root,root) %{_bindir}/flex++
200 %attr(755,root,root) %{_bindir}/lex
201 %{_mandir}/man1/flex.1*
202 %{_mandir}/man1/flex++.1*
203 %{_mandir}/man1/lex.1*
204 %lang(es) %{_mandir}/es/man1/*
205 %lang(ja) %{_mandir}/ja/man1/*
206 %lang(pl) %{_mandir}/pl/man1/*
207 %{_infodir}/flex.info*
208 %{_libdir}/libfl.a
209 %{_libdir}/libfl_pic.a
210 %{_includedir}/FlexLexer.h
211
212 %if 0
213 %files libs
214 %defattr(644,root,root,755)
215 %attr(755,root,root) %{_libdir}/libfl.so.*.*.*
216 %attr(755,root,root) %ghost %{_libdir}/libfl.so.2
217 %attr(755,root,root) %{_libdir}/libfl_pic.so.*.*.*
218 %attr(755,root,root) %ghost %{_libdir}/libfl_pic.so.2
219
220 %files devel
221 %defattr(644,root,root,755)
222 %attr(755,root,root) %{_libdir}/libfl.so
223 %attr(755,root,root) %{_libdir}/libfl_pic.so
224 %endif
225
226 %files examples
227 %defattr(644,root,root,755)
228 %{_examplesdir}/%{name}-%{version}
This page took 0.092746 seconds and 4 git commands to generate.