3 %bcond_with bootstrap # use foreign (non-rpm) ghc
5 Summary: A lexical analyser generator for Haskell
6 Summary(pl.UTF-8): Generator analizatorów składniowych dla Haskella
10 License: BSD-like w/o adv. clause
11 Group: Development/Tools
12 #Source0Download: http://hackage.haskell.org/package/alex
13 Source0: http://hackage.haskell.org/package/alex-%{version}/%{name}-%{version}.tar.gz
14 # Source0-md5: 525e570cb0e84fd856f9c53605ec9e98
15 URL: http://www.haskell.org/alex/
16 BuildRequires: autoconf >= 2.50
17 BuildRequires: docbook-dtd42-xml
18 BuildRequires: docbook-style-xsl
19 %{!?with_bootstrap:BuildRequires: ghc >= 6.6}
20 BuildRequires: ghc-QuickCheck >= 2
21 BuildRequires: gmp-devel
22 %{!?with_bootstrap:BuildRequires: happy}
23 BuildRequires: libxslt-progs
24 #For generating documentation in PDF: fop or xmltex
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 Alex is a tool for generating lexical analysers in Haskell, given a
29 description of the tokens to be recognised in the form of regular
30 expressions. It is similar to the tool lex or flex for C/C++.
32 %description -l pl.UTF-8
33 Alex to narzędzie do generowania analizatorów składniowych w Haskellu
34 na podstawie opisu tokenów do rozpoznawania w postaci wyrażeń
35 regularnych. Jest podobne do narzędzi lex lub flex dla C/C++.
41 %{?with_bootstrap:PATH=$PATH:/usr/local/bin}
42 runhaskell Setup.lhs configure --prefix=%{_prefix}
43 runhaskell Setup.lhs build
52 rm -rf $RPM_BUILD_ROOT
53 %{?with_bootstrap:PATH=$PATH:/usr/local/bin}
54 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
56 install -d $RPM_BUILD_ROOT%{_examplesdir}
57 cp -a examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
59 # work around automatic haddock docs installation
60 %{__rm} -rf %{name}-%{version}-doc
61 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
62 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
65 rm -rf $RPM_BUILD_ROOT
68 %defattr(644,root,root,755)
69 %doc ANNOUNCE README TODO doc/alex
70 %attr(755,root,root) %{_bindir}/alex
71 %{_datadir}/%{name}-%{version}
72 %{_examplesdir}/%{name}-%{version}