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
15 License: distributable
16 Group: Development/Languages
17 Source0: https://github.com/camlp5/camlp5/archive/rel%{version}/%{name}-%{version}.tar.gz
18 # Source0-md5: 477cdfa2be786ebc37c75e280d3ee504
19 Patch0: no-warn-error.patch
21 URL: https://camlp5.github.io/
22 BuildRequires: db-devel >= 4.1
24 BuildRequires: ocaml-ocamlbuild
25 %requires_eq ocaml-runtime
26 Requires: %{name} = %{epoch}:%{version}-%{release}
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 Camlp5 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers
31 tools for syntax (grammars) and the ability to modify the concrete
32 syntax of the language (quotations, syntax extensions).
34 Camlp5 can parse normal Ocaml concrete syntax or any other
35 user-definable syntax. As an example, an alternative syntax is
36 provided, named revised, because it tries to fix some small problems
39 Camlp5 can pretty print the normal Ocaml concrete syntax or the
40 revised one. It is therefore always possible to have a version of your
41 sources compilable by the Objective Caml compiler without
44 %description -l pl.UTF-8
45 Camlp5 jest preprocesorem OCamla. Oferuje narzędzia do manipulowania
46 składnią (gramatyki) oraz możliwość modyfikowania oryginalnej składni
47 języka (cytowania, rozszerzenia).
49 Camlp5 może sparsować oryginalną składnię Ocamla lub dowolną inną
50 definiowalną przez użytkownika. Jako przykład podana jest alternatywna
51 składnia (revised syntax), która próbuje poprawić drobne problemy
52 występujące w składni oryginalnej.
54 Camlp5 umie ładnie formatować źródła zarówno w oryginalnej jak i
55 poprawionej składni OCamla. Potrafi także tłumaczyć programy z jednej
59 Summary: Objective Caml Preprocessor - HTML documentation
60 Summary(pl.UTF-8): Preprocesor OCamla - dokumentacja HTML
61 Group: Development/Languages
64 Objective Caml Preprocessor - HTML documentation.
66 %description doc-html -l pl.UTF-8
67 Preprocesor OCamla - dokumentacja HTML.
70 Summary: Objective Caml Preprocessor - PDF documentation
71 Summary(pl.UTF-8): Preprocesor OCamla - dokumentacja w formacie PDF
72 Group: Development/Languages
75 Objective Caml Preprocessor - PDF documentation.
77 %description doc-pdf -l pl.UTF-8
78 Preprocesor OCamla - dokumentacja w formacie PDF.
81 %setup -q -n %{name}-rel%{version}
85 %{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+perl(\s|$),#!%{__perl}\1,' \
92 -libdir %{_libdir}/ocaml \
93 -mandir %{_mandir}/man1
95 %{__make} -j1 world%{?with_ocaml_opt:.opt}
96 %{__make} -j1 -C doc/htmlp pdf
99 rm -rf $RPM_BUILD_ROOT
102 BINDIR=$RPM_BUILD_ROOT%{_bindir} \
103 LIBDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml \
104 MANDIR=$RPM_BUILD_ROOT%{_mandir}
106 # broken build system
107 for f in mkcamlp5.1 ocpp5.1 camlp5o.1 camlp5r.1 camlp5sch.1 \
108 %{?with_ocaml_opt:camlp5o.opt.1 camlp5r.opt.1 mkcamlp5.opt.1} ; do
109 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/$f
110 echo '.so camlp5.1' >$RPM_BUILD_ROOT%{_mandir}/man1/$f
114 rm -rf $RPM_BUILD_ROOT
117 %defattr(644,root,root,755)
118 %doc CHANGES DEVEL ICHANGES MODE README.md UPGRADING
119 %attr(755,root,root) %{_bindir}/camlp5*
120 %attr(755,root,root) %{_bindir}/mkcamlp5*
121 %attr(755,root,root) %{_bindir}/ocpp5
122 %{_libdir}/ocaml/%{name}
123 %{_mandir}/man1/camlp5*.1*
124 %{_mandir}/man1/mkcamlp5*.1*
125 %{_mandir}/man1/ocpp5.1*
128 %defattr(644,root,root,755)
132 %defattr(644,root,root,755)
133 %doc doc/htmlp/camlp5.pdf