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