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