]>
Commit | Line | Data |
---|---|---|
bfe7d50f JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built) | |
4 | ||
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 | |
8 | %endif | |
9 | ||
170a6c18 JR |
10 | Summary: Objective Caml Preprocessor |
11 | Summary(pl.UTF-8): Preprocesor OCamla | |
12 | Name: camlp5 | |
62e5c235 | 13 | Version: 6.12 |
1aebc93e | 14 | Release: 2 |
170a6c18 JR |
15 | License: distributable |
16 | Group: Development/Languages | |
17 | Source0: http://pauillac.inria.fr/~ddr/camlp5/distrib/src/%{name}-%{version}.tgz | |
62e5c235 | 18 | # Source0-md5: d49d30b62396b7285f3d609ac90c3fe5 |
f95747ae JR |
19 | #Source1: http://pauillac.inria.fr/~ddr/camlp5/doc/pdf/%{name}-%{version}.pdf |
20 | Source1: http://pauillac.inria.fr/~ddr/camlp5/doc/pdf/%{name}-6.00.pdf | |
21 | # Source1-md5: b241eabfeb48f22b0fbd3e497198a76a | |
07f7ea50 | 22 | Patch0: ocaml-4.02.2.patch |
170a6c18 JR |
23 | URL: http://caml.inria.fr/ |
24 | BuildRequires: db-devel >= 4.1 | |
f95747ae | 25 | BuildRequires: ocaml |
62e5c235 | 26 | %requires_eq ocaml-runtime |
170a6c18 JR |
27 | Requires: %{name} = %{epoch}:%{version}-%{release} |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
29 | ||
30 | %description | |
1aebc93e | 31 | Camlp5 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers |
170a6c18 JR |
32 | tools for syntax (grammars) and the ability to modify the concrete |
33 | syntax of the language (quotations, syntax extensions). | |
34 | ||
1aebc93e | 35 | Camlp5 can parse normal Ocaml concrete syntax or any other |
170a6c18 JR |
36 | user-definable syntax. As an example, an alternative syntax is |
37 | provided, named revised, because it tries to fix some small problems | |
38 | of the normal syntax. | |
39 | ||
1aebc93e | 40 | Camlp5 can pretty print the normal Ocaml concrete syntax or the |
170a6c18 JR |
41 | revised one. It is therefore always possible to have a version of your |
42 | sources compilable by the Objective Caml compiler without | |
43 | preprocessing. | |
44 | ||
45 | %description -l pl.UTF-8 | |
1aebc93e | 46 | Camlp5 jest preprocesorem OCamla. Oferuje narzędzia do manipulowania |
170a6c18 JR |
47 | składnią (gramatyki) oraz możliwość modyfikowania oryginalnej składni |
48 | języka (cytowania, rozszerzenia). | |
49 | ||
1aebc93e | 50 | Camlp5 może sparsować oryginalną składnię Ocamla lub dowolną inną |
170a6c18 JR |
51 | definiowalną przez użytkownika. Jako przykład podana jest alternatywna |
52 | składnia (revised syntax), która próbuje poprawić drobne problemy | |
53 | występujące w składni oryginalnej. | |
54 | ||
1aebc93e | 55 | Camlp5 umie ładnie formatować źródła zarówno w oryginalnej jak i |
170a6c18 JR |
56 | poprawionej składni OCamla. Potrafi także tłumaczyć programy z jednej |
57 | składni na drugą. | |
58 | ||
59 | %package doc-html | |
60 | Summary: Objective Caml Preprocessor - HTML documentation | |
61 | Summary(pl.UTF-8): Preprocesor OCamla - dokumentacja HTML | |
62 | Group: Development/Languages | |
63 | ||
64 | %description doc-html | |
65 | Objective Caml Preprocessor - HTML documentation. | |
66 | ||
67 | %description doc-html -l pl.UTF-8 | |
68 | Preprocesor OCamla - dokumentacja HTML. | |
69 | ||
70 | %prep | |
71 | %setup -q | |
1aebc93e JB |
72 | %patch0 -p1 |
73 | ||
6b574e5a | 74 | cp %{SOURCE1} doc/camlp4.pdf |
170a6c18 JR |
75 | |
76 | %build | |
170a6c18 | 77 | ./configure \ |
170a6c18 | 78 | -bindir %{_bindir} \ |
6b574e5a | 79 | -libdir %{_libdir}/ocaml \ |
170a6c18 | 80 | -mandir %{_mandir}/man1 \ |
6b574e5a | 81 | -transitional |
170a6c18 | 82 | |
bfe7d50f | 83 | %{__make} -j1 world%{?with_ocaml_opt:.opt} |
6b574e5a | 84 | %{__make} -j1 -C doc/htmlp |
170a6c18 JR |
85 | |
86 | %install | |
87 | rm -rf $RPM_BUILD_ROOT | |
170a6c18 JR |
88 | |
89 | %{__make} install \ | |
90 | BINDIR=$RPM_BUILD_ROOT%{_bindir} \ | |
6b574e5a | 91 | LIBDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml \ |
170a6c18 JR |
92 | MANDIR=$RPM_BUILD_ROOT%{_mandir} |
93 | ||
170a6c18 | 94 | # broken build system |
bfe7d50f JB |
95 | for f in mkcamlp5.1 ocpp5.1 camlp5o.1 camlp5r.1 camlp5sch.1 \ |
96 | %{?with_ocaml_opt:camlp5o.opt.1 camlp5r.opt.1 mkcamlp5.opt.1} ; do | |
97 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/$f | |
6b574e5a | 98 | echo '.so camlp5.1' >$RPM_BUILD_ROOT%{_mandir}/man1/$f |
170a6c18 JR |
99 | done |
100 | ||
101 | %clean | |
102 | rm -rf $RPM_BUILD_ROOT | |
103 | ||
104 | %files | |
105 | %defattr(644,root,root,755) | |
fd602860 | 106 | %doc CHANGES DEVEL ICHANGES MODE README UPGRADING doc/camlp4.pdf |
1aebc93e JB |
107 | %attr(755,root,root) %{_bindir}/camlp5* |
108 | %attr(755,root,root) %{_bindir}/mkcamlp5* | |
109 | %attr(755,root,root) %{_bindir}/ocpp5 | |
6b574e5a | 110 | %{_libdir}/ocaml/%{name} |
1aebc93e JB |
111 | %{_mandir}/man1/camlp5*.1* |
112 | %{_mandir}/man1/mkcamlp5*.1* | |
113 | %{_mandir}/man1/ocpp5.1* | |
170a6c18 JR |
114 | |
115 | %files doc-html | |
116 | %defattr(644,root,root,755) | |
6b574e5a | 117 | %doc doc/html/* |