]> git.pld-linux.org Git - packages/alex.git/blob - alex.spec
- disable debug packages, release 2
[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.2.5
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:  ed318478389e9538c8356056ddebbea8
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:  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 # debuginfo is not useful for ghc
27 %define         _enable_debug_packages  0
28
29 %description
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
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++.
38
39 %prep
40 %setup -q
41
42 %build
43 %{?with_bootstrap:PATH=$PATH:/usr/local/bin}
44 runhaskell Setup.hs configure --prefix=%{_prefix}
45 runhaskell Setup.hs build
46
47 cd doc
48 %{__autoconf}
49 %configure
50 %{__make} html
51 cd ..
52
53 %install
54 rm -rf $RPM_BUILD_ROOT
55 %{?with_bootstrap:PATH=$PATH:/usr/local/bin}
56 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
57
58 install -d $RPM_BUILD_ROOT%{_examplesdir}
59 cp -a examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
60
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
66 %clean
67 rm -rf $RPM_BUILD_ROOT
68
69 %files
70 %defattr(644,root,root,755)
71 %doc CHANGELOG.md README.md TODO doc/alex
72 %attr(755,root,root) %{_bindir}/alex
73 %{_datadir}/%{name}-%{version}
74 %{_examplesdir}/%{name}-%{version}
This page took 0.12055 seconds and 4 git commands to generate.