]>
Commit | Line | Data |
---|---|---|
d7e6ed80 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with bootstrap # use foreign (non-rpm) ghc | |
4 | # | |
45aa1d35 | 5 | Summary: Yacc-like LALR(1) Parser Generator for Haskell |
ffa6c29d | 6 | Summary(pl.UTF-8): Generator parserów LALR(1) w stylu yacc-a dla Haskella |
45aa1d35 | 7 | Name: happy |
660482c6 | 8 | Version: 1.19.12 |
b9a3e256 | 9 | Release: 1 |
8d8818fa | 10 | License: BSD-like w/o adv. clause |
11 | Group: Development/Tools | |
b9a3e256 JB |
12 | #Source0Download: http://hackage.haskell.org/package/happy |
13 | Source0: http://hackage.haskell.org/package/happy-%{version}/%{name}-%{version}.tar.gz | |
660482c6 | 14 | # Source0-md5: 56709ae8037295eb74c4793df947d8d2 |
b9a3e256 | 15 | URL: http://www.haskell.org/happy/ |
70c3f824 | 16 | BuildRequires: autoconf >= 2.50 |
8d8818fa | 17 | BuildRequires: docbook-dtd42-xml |
18 | BuildRequires: docbook-style-xsl | |
19 | %{!?with_bootstrap:BuildRequires: ghc >= 6.6} | |
b9a3e256 | 20 | BuildRequires: ghc-mtl >= 1.0 |
9730f6df | 21 | BuildRequires: gmp-devel |
8d8818fa | 22 | BuildRequires: libxslt-progs |
23 | #For generating documentation in PDF: fop or xmltex | |
45aa1d35 JR |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
25 | ||
26 | %description | |
8d8818fa | 27 | Happy is a parser generator system for Haskell, similar to the tool |
28 | ‘yacc’ for C. Like ‘yacc’, it takes a file containing an annotated BNF | |
29 | specification of a grammar and produces a Haskell module containing a | |
30 | parser for the grammar. | |
31 | ||
32 | Happy is flexible: you can have several Happy parsers in the same | |
33 | program, and several entry points to a single grammar. Happy can work | |
34 | in conjunction with a lexical analyser supplied by the user (either | |
35 | hand-written or generated by another program), or it can parse a | |
36 | stream of characters directly (but this isn't practical in most | |
37 | cases). | |
38 | ||
39 | Authors: | |
40 | -------- | |
41 | Simon Marlow <simonmar@microsoft.com> | |
42 | Andy Gill <andy@galconn.com> | |
45aa1d35 | 43 | |
497125eb | 44 | %description -l pl.UTF-8 |
8d8818fa | 45 | Happy to system generatorów parserów dla Haskella, podobny do |
46 | narzędzia yacc dla C. Na podstawie specyfikacji gramatyki w notacji | |
47 | BNF generuje moduł w Haskellu zawierający parser tej gramatyki. | |
48 | ||
49 | Happy jest elastyczny: można mieć kilka parserów wygenerowanych przez | |
50 | Happy w jednym programie tudzież kilka symboli startowych dla tej | |
51 | samej gramatyki. Happy może współpracować z analizatorem leksykalnym | |
52 | dostarczonym przez programistę (napisanym ręcznie albo wygenerowanym | |
53 | przez inny program), może też parsować strumień znaków bezpośrednio | |
54 | (co zwykle jest mniej praktyczne). | |
55 | ||
56 | Autorzy: | |
57 | -------- | |
58 | Simon Marlow <simonmar@microsoft.com> | |
59 | Andy Gill <andy@galconn.com> | |
5957d632 | 60 | |
45aa1d35 JR |
61 | %prep |
62 | %setup -q | |
45aa1d35 JR |
63 | |
64 | %build | |
8d8818fa | 65 | %{?with_bootstrap:PATH=$PATH:/usr/local/bin} |
660482c6 JR |
66 | runhaskell Setup.hs configure --prefix=%{_prefix} |
67 | runhaskell Setup.hs build | |
45aa1d35 | 68 | |
8d8818fa | 69 | cd doc |
70 | %{__autoconf} | |
71 | %configure | |
72 | %{__make} html | |
73 | cd .. | |
45aa1d35 JR |
74 | |
75 | %install | |
76 | rm -rf $RPM_BUILD_ROOT | |
8d8818fa | 77 | %{?with_bootstrap:PATH=$PATH:/usr/local/bin} |
660482c6 | 78 | runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT |
45aa1d35 | 79 | |
8d8818fa | 80 | install -d $RPM_BUILD_ROOT%{_examplesdir} |
81 | cp -a examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
45aa1d35 | 82 | |
7117c351 JR |
83 | # work around automatic haddock docs installation |
84 | %{__rm} -rf %{name}-%{version}-doc | |
85 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc | |
86 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} | |
87 | ||
5957d632 JB |
88 | %clean |
89 | rm -rf $RPM_BUILD_ROOT | |
90 | ||
45aa1d35 JR |
91 | %files |
92 | %defattr(644,root,root,755) | |
660482c6 | 93 | %doc ANNOUNCE CHANGES README.md TODO doc/happy |
075017c4 | 94 | %attr(755,root,root) %{_bindir}/happy |
8d8818fa | 95 | %{_datadir}/%{name}-%{version} |
96 | %{_examplesdir}/%{name}-%{version} |