]> git.pld-linux.org Git - packages/happy.git/blob - happy.spec
f245bbb6d4cb0e450cc4663bef7c458246821a38
[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):    Generator parserów LALR(1) w stylu yacc-a dla Haskella
7 Name:           happy
8 Version:        1.15
9 Release:        2
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)
28
29 %description
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
33 one program.
34
35 %description -l pl
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
39 programie.
40
41 %prep
42 %setup -q
43 %patch0 -p1
44
45 %build
46 cp -f /usr/share/automake/config.sub .
47 %{__autoconf}
48 %configure \
49         --with-gcc="%{__cc}"
50
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
55
56 %install
57 rm -rf $RPM_BUILD_ROOT
58 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_examplesdir}/happy}
59
60 %{__make} install \
61         bindir=$RPM_BUILD_ROOT%{_bindir} \
62         libdir=$RPM_BUILD_ROOT%{_libdir}/%{name}-%{version}
63
64 cp -a happy/examples/* $RPM_BUILD_ROOT%{_examplesdir}/happy/
65
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
71
72 %clean
73 rm -rf $RPM_BUILD_ROOT
74
75 %files
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*
83 %{_mandir}/man1/*
84 %{_examplesdir}/%{name}
This page took 0.049936 seconds and 2 git commands to generate.