]>
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 |
cd997ad9 | 8 | Version: 3.2.5 |
c7818f6d | 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 | |
cd997ad9 | 14 | # Source0-md5: ed318478389e9538c8356056ddebbea8 |
33c1d437 JB |
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} | |
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 | ||
c7818f6d JB |
26 | # debuginfo is not useful for ghc |
27 | %define _enable_debug_packages 0 | |
28 | ||
1aeb4c39 | 29 | %description |
675cb3e4 JB |
30 | Alex is a tool for generating lexical analysers in Haskell, given a |
31 | description of the tokens to be recognised in the form of regular | |
32 | expressions. It is similar to the tool lex or flex for C/C++. | |
33 | ||
89ffd96d JR |
34 | %description -l pl.UTF-8 |
35 | Alex to narzędzie do generowania analizatorów składniowych w Haskellu | |
36 | na podstawie opisu tokenów do rozpoznawania w postaci wyrażeń | |
37 | regularnych. Jest podobne do narzędzi lex lub flex dla C/C++. | |
1aeb4c39 JR |
38 | |
39 | %prep | |
40 | %setup -q | |
41 | ||
42 | %build | |
c66e49ce | 43 | %{?with_bootstrap:PATH=$PATH:/usr/local/bin} |
cd997ad9 JR |
44 | runhaskell Setup.hs configure --prefix=%{_prefix} |
45 | runhaskell Setup.hs build | |
c66e49ce | 46 | |
47 | cd doc | |
d25e6c2c | 48 | %{__autoconf} |
1aeb4c39 | 49 | %configure |
c66e49ce | 50 | %{__make} html |
51 | cd .. | |
1aeb4c39 JR |
52 | |
53 | %install | |
54 | rm -rf $RPM_BUILD_ROOT | |
c66e49ce | 55 | %{?with_bootstrap:PATH=$PATH:/usr/local/bin} |
cd997ad9 | 56 | runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT |
1aeb4c39 | 57 | |
c66e49ce | 58 | install -d $RPM_BUILD_ROOT%{_examplesdir} |
59 | cp -a examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
b6eadff7 | 60 | |
1cfeffab JR |
61 | # work around automatic haddock docs installation |
62 | %{__rm} -rf %{name}-%{version}-doc | |
63 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc | |
64 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} | |
65 | ||
1aeb4c39 JR |
66 | %clean |
67 | rm -rf $RPM_BUILD_ROOT | |
68 | ||
69 | %files | |
70 | %defattr(644,root,root,755) | |
cd997ad9 | 71 | %doc CHANGELOG.md README.md TODO doc/alex |
c66e49ce | 72 | %attr(755,root,root) %{_bindir}/alex |
73 | %{_datadir}/%{name}-%{version} | |
b6eadff7 | 74 | %{_examplesdir}/%{name}-%{version} |