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