]> git.pld-linux.org Git - packages/alex.git/blob - alex.spec
3b7f69cb2f3fff1697a4859483fe94396cd7ec7b
[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.0.5
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:  018f9817cd3c094294c8ab83e530c1c8
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:  ghc-QuickCheck >= 2
20 BuildRequires:  gmp-devel
21 %{!?with_bootstrap:BuildRequires:       happy}
22 BuildRequires:  libxslt-progs
23 #For generating documentation in PDF: fop or xmltex
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %description
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
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++.
35
36 %prep
37 %setup -q
38
39 # ghc relies on ld.bfd specific options
40 mkdir -p ld-dir
41 if [ -x /usr/bin/ld.bfd ]; then
42         ln -sf /usr/bin/ld.bfd ld-dir/ld
43 fi
44
45 %build
46 PATH=$(pwd)/ld-dir:$PATH
47 %{?with_bootstrap:PATH=$PATH:/usr/local/bin}
48 runhaskell Setup.lhs configure --prefix=%{_prefix}
49 runhaskell Setup.lhs build
50
51 cd doc
52 %{__autoconf}
53 %configure
54 %{__make} html
55 cd ..
56
57 %install
58 rm -rf $RPM_BUILD_ROOT
59 %{?with_bootstrap:PATH=$PATH:/usr/local/bin}
60 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
61
62 install -d $RPM_BUILD_ROOT%{_examplesdir}
63 cp -a examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
64
65 %clean
66 rm -rf $RPM_BUILD_ROOT
67
68 %files
69 %defattr(644,root,root,755)
70 %doc ANNOUNCE README TODO doc/alex
71 %attr(755,root,root) %{_bindir}/alex
72 %{_datadir}/%{name}-%{version}
73 %{_examplesdir}/%{name}-%{version}
This page took 0.03583 seconds and 3 git commands to generate.