3 %bcond_with bootstrap # use foreign (non-rpm) ghc
5 Summary: Yacc-like LALR(1) Parser Generator for Haskell
6 Summary(pl): Generator parserów LALR(1) w stylu yacc-a dla Haskella
10 License: BSD w/o adv. clause
11 Group: Development/Languages
12 URL: http://haskell.org/happy/
13 Source0: http://haskell.org/happy/dist/%{version}/%{name}-%{version}-src.tar.gz
14 # Source0-md5: 02ceb122b904fa4a4290e6ea1072d59e
15 Patch0: %{name}-arch.patch
16 BuildRequires: autoconf
17 BuildRequires: automake
18 %{!?with_bootstrap:BuildRequires: ghc}
19 BuildRequires: gmp-devel
20 BuildRequires: jadetex
21 BuildRequires: elfutils-libelf
22 BuildRequires: ncurses-devel
23 BuildRequires: openjade
24 BuildRequires: readline-devel
25 BuildRequires: sgml-common
26 BuildRequires: tetex-dvips
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 Happy is a LALR(1) parser generator for Haskell - similar to yacc for
31 C. It generates a Haskell parser from an annotated BNF specification
32 of a grammar. Happy allows to have several Happy generated parsers in
36 Happy jest generatorem parserów LALR(1) dla Haskella - podobnym do
37 yacc-a dla C. Generuje parser w Haskellu ze specyfikacji gramatyki w
38 notacji BNF. Happy pozwala mieæ wiele wygenerowanych parserów w jednym
46 cp -f /usr/share/automake/config.sub .
51 %{__make} -C glafp-utils sgmlverb mkdirhier all
52 %{__make} -C happy/src depend
53 %{__make} -C happy all
54 %{__make} -C happy/doc html
57 rm -rf $RPM_BUILD_ROOT
58 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_examplesdir}/happy}
61 bindir=$RPM_BUILD_ROOT%{_bindir} \
62 libdir=$RPM_BUILD_ROOT%{_libdir}/%{name}-%{version}
64 cp -a happy/examples/* $RPM_BUILD_ROOT%{_examplesdir}/happy/
66 sed -e 's,@LIBDIR@,%{_libdir}/%{name}-%{version},g' \
67 -e 's,@DOCDIR@,%{_docdir}/%{name}-%{version},g' \
68 -e 's,@VERSION@,%{version},g' \
69 happy/doc/happy.1.in > $RPM_BUILD_ROOT%{_mandir}/man1/happy.1
70 ln -sf happy-%{version} $RPM_BUILD_ROOT%{_bindir}/happy
73 rm -rf $RPM_BUILD_ROOT
76 %defattr(644,root,root,755)
77 %doc happy/README happy/doc/happy
78 %attr(755,root,root) %{_bindir}/*
79 %dir %{_libdir}/%{name}-%{version}
80 %attr(755,root,root) %{_libdir}/%{name}-%{version}/happy.bin
81 %{_libdir}/%{name}-%{version}/Happy*
82 %{_libdir}/%{name}-%{version}/GLR*
84 %{_examplesdir}/%{name}