]> git.pld-linux.org Git - packages/happy.git/blob - happy.spec
be7c28db90e324ec60256aced6880c78d9c260a9
[packages/happy.git] / happy.spec
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.2
9 Release:        1
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:  36602c3c6e3004f49754ea6c173d2c39
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 %description
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>
43
44 %description -l pl.UTF-8
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>
60
61 %prep
62 %setup -q
63
64 %build
65 %{?with_bootstrap:PATH=$PATH:/usr/local/bin}
66 runhaskell Setup.lhs configure --prefix=%{_prefix}
67 runhaskell Setup.lhs build
68
69 cd doc
70 %{__autoconf}
71 %configure
72 %{__make} html
73 cd ..
74
75 %install
76 rm -rf $RPM_BUILD_ROOT
77 %{?with_bootstrap:PATH=$PATH:/usr/local/bin}
78 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
79
80 install -d $RPM_BUILD_ROOT%{_examplesdir}
81 cp -a examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
82
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
88 %clean
89 rm -rf $RPM_BUILD_ROOT
90
91 %files
92 %defattr(644,root,root,755)
93 %doc ANNOUNCE CHANGES README TODO doc/happy
94 %attr(755,root,root) %{_bindir}/happy
95 %{_datadir}/%{name}-%{version}
96 %{_examplesdir}/%{name}-%{version}
This page took 0.056494 seconds and 2 git commands to generate.