]>
Commit | Line | Data |
---|---|---|
bae258c1 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with bootstrap # use foreign (non-rpm) ghc | |
4 | # | |
1aeb4c39 | 5 | Summary: A lexical analyser generator for Haskell |
760206bf | 6 | Summary(pl.UTF-8): Generator analizatorów składniowych dla Haskella |
1aeb4c39 | 7 | Name: alex |
605b6dc5 | 8 | Version: 3.0.5 |
9f4dfaa0 | 9 | Release: 1 |
1aeb4c39 JR |
10 | License: BSD-like w/o adv. clause |
11 | Group: Development/Tools | |
eed98eef | 12 | Source0: http://hackage.haskell.org/packages/archive/alex/%{version}/%{name}-%{version}.tar.gz |
605b6dc5 | 13 | # Source0-md5: 018f9817cd3c094294c8ab83e530c1c8 |
c66e49ce | 14 | URL: http://haskell.org/alex/ |
e4687fb4 | 15 | BuildRequires: autoconf |
c66e49ce | 16 | BuildRequires: docbook-dtd42-xml |
17 | BuildRequires: docbook-style-xsl | |
18 | %{!?with_bootstrap:BuildRequires: ghc >= 6.6} | |
605b6dc5 | 19 | BuildRequires: ghc-QuickCheck >= 2 |
4deb6cff | 20 | BuildRequires: gmp-devel |
c66e49ce | 21 | %{!?with_bootstrap:BuildRequires: happy} |
22 | BuildRequires: libxslt-progs | |
23 | #For generating documentation in PDF: fop or xmltex | |
1aeb4c39 JR |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
25 | ||
26 | %description | |
675cb3e4 JB |
27 | Alex is a tool for generating lexical analysers in Haskell, given a |
28 | description of the tokens to be recognised in the form of regular | |
29 | expressions. It is similar to the tool lex or flex for C/C++. | |
30 | ||
89ffd96d JR |
31 | %description -l pl.UTF-8 |
32 | Alex to narzędzie do generowania analizatorów składniowych w Haskellu | |
33 | na podstawie opisu tokenów do rozpoznawania w postaci wyrażeń | |
34 | regularnych. Jest podobne do narzędzi lex lub flex dla C/C++. | |
1aeb4c39 JR |
35 | |
36 | %prep | |
37 | %setup -q | |
38 | ||
39 | %build | |
c66e49ce | 40 | %{?with_bootstrap:PATH=$PATH:/usr/local/bin} |
41 | runhaskell Setup.lhs configure --prefix=%{_prefix} | |
42 | runhaskell Setup.lhs build | |
43 | ||
44 | cd doc | |
d25e6c2c | 45 | %{__autoconf} |
1aeb4c39 | 46 | %configure |
c66e49ce | 47 | %{__make} html |
48 | cd .. | |
1aeb4c39 JR |
49 | |
50 | %install | |
51 | rm -rf $RPM_BUILD_ROOT | |
c66e49ce | 52 | %{?with_bootstrap:PATH=$PATH:/usr/local/bin} |
53 | runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT | |
1aeb4c39 | 54 | |
c66e49ce | 55 | install -d $RPM_BUILD_ROOT%{_examplesdir} |
56 | cp -a examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
b6eadff7 | 57 | |
1cfeffab JR |
58 | # work around automatic haddock docs installation |
59 | %{__rm} -rf %{name}-%{version}-doc | |
60 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc | |
61 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} | |
62 | ||
1aeb4c39 JR |
63 | %clean |
64 | rm -rf $RPM_BUILD_ROOT | |
65 | ||
66 | %files | |
67 | %defattr(644,root,root,755) | |
c66e49ce | 68 | %doc ANNOUNCE README TODO doc/alex |
69 | %attr(755,root,root) %{_bindir}/alex | |
70 | %{_datadir}/%{name}-%{version} | |
b6eadff7 | 71 | %{_examplesdir}/%{name}-%{version} |