]> git.pld-linux.org Git - packages/alex.git/blob - alex.spec
- release 2 (by relup.sh)
[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:        3.1.3
9 Release:        2
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)
26
27 %description
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
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++.
36
37 %prep
38 %setup -q
39
40 %build
41 %{?with_bootstrap:PATH=$PATH:/usr/local/bin}
42 runhaskell Setup.lhs configure --prefix=%{_prefix}
43 runhaskell Setup.lhs build
44
45 cd doc
46 %{__autoconf}
47 %configure
48 %{__make} html
49 cd ..
50
51 %install
52 rm -rf $RPM_BUILD_ROOT
53 %{?with_bootstrap:PATH=$PATH:/usr/local/bin}
54 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
55
56 install -d $RPM_BUILD_ROOT%{_examplesdir}
57 cp -a examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
58
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
64 %clean
65 rm -rf $RPM_BUILD_ROOT
66
67 %files
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}
This page took 0.094789 seconds and 3 git commands to generate.