3 %bcond_with bootstrap # use foreign (non-rpm) ghc
5 Summary: A lexical analyser generator for Haskell
6 Summary(pl): Generator analizatorów sk³adniowych dla Haskella
10 License: BSD-like w/o adv. clause
11 Group: Development/Tools
12 Source0: http://www.haskell.org/alex/dist/%{name}-%{version}-src.tar.gz
13 # Source0-md5: edb62560e29c8de23913c65c52adbf19
14 Patch0: %{name}-DESTDIR.patch
15 URL: http://www.haskell.org/alex/
16 BuildRequires: autoconf
17 BuildRequires: automake
18 BuildRequires: docbook-dtd31-sgml
19 BuildRequires: docbook-style-dsssl
20 %{!?with_bootstrap:BuildRequires: ghc >= 5.04}
21 BuildRequires: gmp-devel
22 BuildRequires: jadetex
23 BuildRequires: openjade
24 BuildRequires: sed >= 4.0
25 BuildRequires: tetex-dvips
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 Alex is a tool for generating lexical analysers in Haskell, given a
30 description of the tokens to be recognised in the form of regular
31 expressions. It is similar to the tool lex or flex for C/C++.
34 Alex to narzêdzie do generowania analizatorów sk³adniowych w Haskellu
35 na podstawie opisu tokenów do rozpoznawania w postaci wyra¿eñ
36 regularnych. Jest podobne do narzêdzi lex lub flex dla C/C++.
41 sed -i -e 's/alpha\*-unknown-linux/alpha*-*-linux/' configure.ac
46 cp -f /usr/share/automake/config.sub .
50 %{__make} html -C alex/doc
53 rm -rf $RPM_BUILD_ROOT
54 install -d $RPM_BUILD_ROOT{%{_bindir},%{_examplesdir}/%{name}-%{version}}
57 bindir=$RPM_BUILD_ROOT%{_bindir} \
58 libdir=$RPM_BUILD_ROOT%{_libdir}/%{name}-%{version}
60 cp -a alex/examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/
63 rm -rf $RPM_BUILD_ROOT
66 %defattr(644,root,root,755)
67 %doc alex/{ANNOUNCE,LICENSE,README} alex/doc/alex
68 %attr(755,root,root) %{_bindir}/*
69 %dir %{_libdir}/%{name}-%{version}
70 %{_libdir}/%{name}-%{version}/A*
71 %attr(755,root,root) %{_libdir}/%{name}-%{version}/alex.bin
72 %{_examplesdir}/%{name}-%{version}