]> git.pld-linux.org Git - packages/BNFC.git/blob - BNFC.spec
- should work now with alex 3 and ghc 7.2
[packages/BNFC.git] / BNFC.spec
1 Summary:        BNF Converter
2 Summary(pl.UTF-8):      Konwerter BNF
3 Name:           BNFC
4 Version:        2.4.2.0
5 Release:        3.3
6 Epoch:          1
7 License:        GPL
8 Group:          Development/Tools
9 Source0:        http://hackage.haskell.org/packages/archive/BNFC/%{version}/%{name}-%{version}.tar.gz
10 # Source0-md5:  fda25414352413879bc8f76d0558fcb4
11 Patch0:         %{name}-ghc72.patch
12 Patch1:         %{name}-alex3.patch
13 URL:            http://www.cse.chalmers.se/research/group/Language-technology/BNFC/
14 BuildRequires:  ghc
15 BuildRequires:  gmp-devel
16 BuildRequires:  tetex-format-pdflatex
17 Conflicts:      alex < 3.0
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20 %description
21 The BNF Converter is a compiler construction tool generating
22 a compiler front-end from a Labelled BNF grammar. It was originally
23 written to generate Haskell, but starting from version 2.0,
24 it can also be used for generating Java, C++, and C.
25
26 %description -l pl.UTF-8
27 BNF Converter to narzędzie do tworzenia kompilatorów generujące
28 frontend kompilatora z gramatyki w postaci Labelled BNF. Pierwotnie
29 zostało napisane do generowania Haskella, ale począwszy of wersji 2.0
30 potrafi także generować kod w Javie, C++ i C.
31
32 %prep
33 %setup -q
34
35 # undos the source
36 find -type f -print0 | xargs -0 %{__sed} -i -e 's,\r$,,'
37
38 %patch0 -p1
39 %patch1 -p1
40
41 %build
42 runhaskell Setup.lhs configure -v2 --enable-library-profiling \
43         --prefix=%{_prefix} \
44         --libdir=%{_libdir} \
45         --libexecdir=%{_libexecdir} \
46         --docdir=%{_docdir}/%{name}-%{version}
47
48 runhaskell Setup.lhs build
49 runhaskell Setup.lhs haddock --executables
50
51 %install
52 rm -rf $RPM_BUILD_ROOT
53
54 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
55
56 # work around automatic haddock docs installation
57 rm -rf %{name}-%{version}-doc
58 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
59
60 %clean
61 rm -rf $RPM_BUILD_ROOT
62
63 %files
64 %defattr(644,root,root,755)
65 %doc %{name}-%{version}-doc/html/bnfc/*
66 %attr(755,root,root) %{_bindir}/*
This page took 0.087905 seconds and 3 git commands to generate.