]>
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 |
89ffd96d | 6 | Summary(pl.UTF-8): Generator analizatorów składniowych dla Haskella |
1aeb4c39 | 7 | Name: alex |
bed27d70 | 8 | Version: 2.0.1 |
d05d97f5 | 9 | Release: 3 |
1aeb4c39 JR |
10 | License: BSD-like w/o adv. clause |
11 | Group: Development/Tools | |
bed27d70 | 12 | Source0: http://www.haskell.org/alex/dist/%{name}-%{version}-src.tar.gz |
13 | # Source0-md5: edb62560e29c8de23913c65c52adbf19 | |
b6eadff7 | 14 | Patch0: %{name}-DESTDIR.patch |
1aeb4c39 | 15 | URL: http://www.haskell.org/alex/ |
e4687fb4 | 16 | BuildRequires: autoconf |
d25e6c2c | 17 | BuildRequires: automake |
e4687fb4 | 18 | BuildRequires: docbook-dtd31-sgml |
19 | BuildRequires: docbook-style-dsssl | |
bae258c1 | 20 | %{!?with_bootstrap:BuildRequires: ghc >= 5.04} |
4deb6cff | 21 | BuildRequires: gmp-devel |
e4687fb4 | 22 | BuildRequires: jadetex |
23 | BuildRequires: openjade | |
8b2c036c | 24 | BuildRequires: sed >= 4.0 |
0f5442dd | 25 | BuildRequires: tetex-dvips |
1aeb4c39 JR |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
27 | ||
28 | %description | |
675cb3e4 JB |
29 | Alex is a tool for generating lexical analysers in Haskell, given a |
30 | description of the tokens to be recognised in the form of regular | |
31 | expressions. It is similar to the tool lex or flex for C/C++. | |
32 | ||
89ffd96d JR |
33 | %description -l pl.UTF-8 |
34 | Alex to narzędzie do generowania analizatorów składniowych w Haskellu | |
35 | na podstawie opisu tokenów do rozpoznawania w postaci wyrażeń | |
36 | regularnych. Jest podobne do narzędzi lex lub flex dla C/C++. | |
1aeb4c39 JR |
37 | |
38 | %prep | |
39 | %setup -q | |
40 | ||
d05d97f5 | 41 | sed -i -e 's/\(alpha\*\|powerpc\|powerpc64\)-unknown-linux\*)/\1-*-linux*)/' configure.ac |
8b2c036c | 42 | |
1aeb4c39 | 43 | %build |
d25e6c2c AM |
44 | %{__aclocal} |
45 | %{__autoconf} | |
e4687fb4 | 46 | cp -f /usr/share/automake/config.sub . |
1aeb4c39 | 47 | %configure |
2871e63b | 48 | %{__make} depend |
1aeb4c39 | 49 | %{__make} |
bed27d70 | 50 | %{__make} html -C alex/doc |
1aeb4c39 JR |
51 | |
52 | %install | |
53 | rm -rf $RPM_BUILD_ROOT | |
b6eadff7 | 54 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_examplesdir}/%{name}-%{version}} |
1aeb4c39 JR |
55 | |
56 | %{__make} install \ | |
bed27d70 | 57 | bindir=$RPM_BUILD_ROOT%{_bindir} \ |
58 | libdir=$RPM_BUILD_ROOT%{_libdir}/%{name}-%{version} | |
1aeb4c39 | 59 | |
b6eadff7 JR |
60 | cp -a alex/examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/ |
61 | ||
1aeb4c39 JR |
62 | %clean |
63 | rm -rf $RPM_BUILD_ROOT | |
64 | ||
65 | %files | |
66 | %defattr(644,root,root,755) | |
0209d2c9 | 67 | %doc alex/{ANNOUNCE,LICENSE,README} alex/doc/alex |
1aeb4c39 | 68 | %attr(755,root,root) %{_bindir}/* |
675cb3e4 | 69 | %dir %{_libdir}/%{name}-%{version} |
b6eadff7 JR |
70 | %{_libdir}/%{name}-%{version}/A* |
71 | %attr(755,root,root) %{_libdir}/%{name}-%{version}/alex.bin | |
72 | %{_examplesdir}/%{name}-%{version} |