]>
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 |
33c1d437 | 8 | Version: 3.1.3 |
337a67f2 | 9 | Release: 2 |
1aeb4c39 JR |
10 | License: BSD-like w/o adv. clause |
11 | Group: Development/Tools | |
33c1d437 JB |
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 | |
c66e49ce | 17 | BuildRequires: docbook-dtd42-xml |
18 | BuildRequires: docbook-style-xsl | |
19 | %{!?with_bootstrap:BuildRequires: ghc >= 6.6} | |
605b6dc5 | 20 | BuildRequires: ghc-QuickCheck >= 2 |
4deb6cff | 21 | BuildRequires: gmp-devel |
c66e49ce | 22 | %{!?with_bootstrap:BuildRequires: happy} |
23 | BuildRequires: libxslt-progs | |
24 | #For generating documentation in PDF: fop or xmltex | |
1aeb4c39 JR |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
26 | ||
27 | %description | |
675cb3e4 JB |
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++. | |
31 | ||
89ffd96d JR |
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++. | |
1aeb4c39 JR |
36 | |
37 | %prep | |
38 | %setup -q | |
39 | ||
40 | %build | |
c66e49ce | 41 | %{?with_bootstrap:PATH=$PATH:/usr/local/bin} |
42 | runhaskell Setup.lhs configure --prefix=%{_prefix} | |
43 | runhaskell Setup.lhs build | |
44 | ||
45 | cd doc | |
d25e6c2c | 46 | %{__autoconf} |
1aeb4c39 | 47 | %configure |
c66e49ce | 48 | %{__make} html |
49 | cd .. | |
1aeb4c39 JR |
50 | |
51 | %install | |
52 | rm -rf $RPM_BUILD_ROOT | |
c66e49ce | 53 | %{?with_bootstrap:PATH=$PATH:/usr/local/bin} |
54 | runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT | |
1aeb4c39 | 55 | |
c66e49ce | 56 | install -d $RPM_BUILD_ROOT%{_examplesdir} |
57 | cp -a examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
b6eadff7 | 58 | |
1cfeffab JR |
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} | |
63 | ||
1aeb4c39 JR |
64 | %clean |
65 | rm -rf $RPM_BUILD_ROOT | |
66 | ||
67 | %files | |
68 | %defattr(644,root,root,755) | |
c66e49ce | 69 | %doc ANNOUNCE README TODO doc/alex |
70 | %attr(755,root,root) %{_bindir}/alex | |
71 | %{_datadir}/%{name}-%{version} | |
b6eadff7 | 72 | %{_examplesdir}/%{name}-%{version} |