3 %bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built)
5 # not yet available on x32 (ocaml 4.02.1), update when upstream will support it
6 %ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
7 %undefine with_ocaml_opt
10 Summary: Objective Caml Preprocessor
11 Summary(pl.UTF-8): Preprocesor OCamla
16 License: distributable
17 Group: Development/Languages
18 #Source0: http://camlp5.gforge.inria.fr/distrib/src/%{name}-%{version}.tgz
19 Source0: https://github.com/camlp5/camlp5/archive/%{gitver}/%{name}-%{version}.tar.gz
20 # Source0-md5: 572e0fa053715e40a40415ea3ca5d4ea
21 Source1: http://camlp5.gforge.inria.fr/doc/pdf/%{name}-6.00.pdf
22 # Source1-md5: b241eabfeb48f22b0fbd3e497198a76a
23 URL: http://caml.inria.fr/
24 BuildRequires: db-devel >= 4.1
26 BuildRequires: ocaml-ocamlbuild
27 %requires_eq ocaml-runtime
28 Requires: %{name} = %{epoch}:%{version}-%{release}
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 Camlp5 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers
33 tools for syntax (grammars) and the ability to modify the concrete
34 syntax of the language (quotations, syntax extensions).
36 Camlp5 can parse normal Ocaml concrete syntax or any other
37 user-definable syntax. As an example, an alternative syntax is
38 provided, named revised, because it tries to fix some small problems
41 Camlp5 can pretty print the normal Ocaml concrete syntax or the
42 revised one. It is therefore always possible to have a version of your
43 sources compilable by the Objective Caml compiler without
46 %description -l pl.UTF-8
47 Camlp5 jest preprocesorem OCamla. Oferuje narzędzia do manipulowania
48 składnią (gramatyki) oraz możliwość modyfikowania oryginalnej składni
49 języka (cytowania, rozszerzenia).
51 Camlp5 może sparsować oryginalną składnię Ocamla lub dowolną inną
52 definiowalną przez użytkownika. Jako przykład podana jest alternatywna
53 składnia (revised syntax), która próbuje poprawić drobne problemy
54 występujące w składni oryginalnej.
56 Camlp5 umie ładnie formatować źródła zarówno w oryginalnej jak i
57 poprawionej składni OCamla. Potrafi także tłumaczyć programy z jednej
61 Summary: Objective Caml Preprocessor - HTML documentation
62 Summary(pl.UTF-8): Preprocesor OCamla - dokumentacja HTML
63 Group: Development/Languages
66 Objective Caml Preprocessor - HTML documentation.
68 %description doc-html -l pl.UTF-8
69 Preprocesor OCamla - dokumentacja HTML.
72 Summary: Objective Caml Preprocessor - PDF documentation
73 Summary(pl.UTF-8): Preprocesor OCamla - dokumentacja w formacie PDF
74 Group: Development/Languages
77 Objective Caml Preprocessor - PDF documentation.
79 %description doc-pdf -l pl.UTF-8
80 Preprocesor OCamla - dokumentacja w formacie PDF.
83 %setup -q -n %{name}-%{gitver}
85 cp %{SOURCE1} doc/camlp5.pdf
90 -libdir %{_libdir}/ocaml \
91 -mandir %{_mandir}/man1 \
94 %{__make} -j1 world%{?with_ocaml_opt:.opt}
95 %{__make} -j1 -C doc/htmlp
98 rm -rf $RPM_BUILD_ROOT
101 BINDIR=$RPM_BUILD_ROOT%{_bindir} \
102 LIBDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml \
103 MANDIR=$RPM_BUILD_ROOT%{_mandir}
105 # broken build system
106 for f in mkcamlp5.1 ocpp5.1 camlp5o.1 camlp5r.1 camlp5sch.1 \
107 %{?with_ocaml_opt:camlp5o.opt.1 camlp5r.opt.1 mkcamlp5.opt.1} ; do
108 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/$f
109 echo '.so camlp5.1' >$RPM_BUILD_ROOT%{_mandir}/man1/$f
113 rm -rf $RPM_BUILD_ROOT
116 %defattr(644,root,root,755)
117 %doc CHANGES DEVEL ICHANGES MODE README UPGRADING
118 %attr(755,root,root) %{_bindir}/camlp5*
119 %attr(755,root,root) %{_bindir}/mkcamlp5*
120 %attr(755,root,root) %{_bindir}/ocpp5
121 %{_libdir}/ocaml/%{name}
122 %{_mandir}/man1/camlp5*.1*
123 %{_mandir}/man1/mkcamlp5*.1*
124 %{_mandir}/man1/ocpp5.1*
127 %defattr(644,root,root,755)
131 %defattr(644,root,root,755)