]>
Commit | Line | Data |
---|---|---|
1ddc1ab2 JB |
1 | # |
2 | # Conditional build: | |
93d4a435 | 3 | %bcond_without ocaml_opt # build opt (native code) |
1ddc1ab2 | 4 | |
2b727baf | 5 | %define main_ver 4.12 |
59ec88b1 | 6 | %define subver 1 |
1ddc1ab2 JB |
7 | |
8 | %define doc_ver 3.06 | |
9 | ||
5251ec0e | 10 | %ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9 |
93d4a435 | 11 | %undefine with_ocaml_opt |
4951a3ea JR |
12 | %endif |
13 | ||
1ddc1ab2 JB |
14 | %define module camlp4 |
15 | Summary: Objective Caml Preprocessor | |
16 | Summary(pl.UTF-8): Preprocesor OCamla | |
17 | Name: ocaml-camlp4 | |
18 | Version: %{main_ver}.%{subver} | |
d873f83b | 19 | Release: 2 |
1ddc1ab2 JB |
20 | Epoch: 1 |
21 | License: LGPL v2 with linking exception | |
22 | Group: Libraries | |
9da2bf26 | 23 | #Source0Download: https://github.com/ocaml/camlp4/releases/ |
1ddc1ab2 | 24 | Source0: https://github.com/ocaml/camlp4/archive/%{main_ver}+%{subver}/camlp4-%{version}.tar.gz |
2b727baf | 25 | # Source0-md5: baa1a11a2252b400c46c87592fc46f22 |
1ddc1ab2 JB |
26 | # following 4 URLs are dead, some version now available at http://pauillac.inria.fr/camlp4/ |
27 | Source1: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{doc_ver}-manual.html.tar.gz | |
28 | # Source1-md5: 21370bae4e7f6435b38aeb21db7ce8bb | |
29 | Source2: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{doc_ver}-manual.dvi.gz | |
30 | # Source2-md5: 035915d1a530aa7ec9b194d9a7d258eb | |
31 | Source3: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{doc_ver}-tutorial.html.tar.gz | |
32 | # Source3-md5: 96d8eb4ca5abd58c9a280ba59f73b192 | |
33 | Source4: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{doc_ver}-tutorial.dvi.gz | |
34 | # Source4-md5: fcd87c235109364242a0c9ccf176dff8 | |
35 | URL: https://github.com/ocaml/camlp4 | |
2b727baf | 36 | BuildRequires: ocaml >= 1:4.12 |
59ec88b1 | 37 | BuildRequires: ocaml-ocamlbuild |
1ddc1ab2 JB |
38 | %requires_eq ocaml-runtime |
39 | Provides: camlp4 = %{epoch}:%{version}-%{release} | |
40 | Obsoletes: camlp4 | |
41 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
42 | ||
43 | %define debug_package %{nil} | |
44 | ||
45 | %description | |
46 | Camlp4 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers | |
47 | tools for syntax (grammars) and the ability to modify the concrete | |
48 | syntax of the language (quotations, syntax extensions). | |
49 | ||
50 | Camlp4 can parse normal Ocaml concrete syntax or any other | |
51 | user-definable syntax. As an example, an alternative syntax is | |
52 | provided, named revised, because it tries to fix some small problems | |
53 | of the normal syntax. | |
54 | ||
55 | Camlp4 can pretty print the normal Ocaml concrete syntax or the | |
56 | revised one. It is therefore always possible to have a version of your | |
57 | sources compilable by the Objective Caml compiler without | |
58 | preprocessing. | |
59 | ||
60 | %description -l pl.UTF-8 | |
61 | Camlp4 jest preprocesorem OCamla. Oferuje narzędzia do manipulowania | |
62 | składnią (gramatyki) oraz możliwość modyfikowania oryginalnej składni | |
63 | języka (cytowania, rozszerzenia). | |
64 | ||
65 | Camlp4 potrafi analizować oryginalną składnię Ocamla lub dowolną inną | |
66 | definiowalną przez użytkownika. Jako przykład podana jest alternatywna | |
67 | składnia (revised syntax), która próbuje poprawić drobne problemy | |
68 | występujące w składni oryginalnej. | |
69 | ||
70 | Camlp4 umie ładnie formatować źródła zarówno w oryginalnej jak i | |
71 | poprawionej składni OCamla. Potrafi także tłumaczyć programy z jednej | |
72 | składni na drugą. | |
73 | ||
74 | %package doc-html | |
75 | Summary: Objective Caml Preprocessor - HTML documentation | |
76 | Summary(pl.UTF-8): Preprocesor OCamla - dokumentacja HTML | |
77 | Group: Documentation | |
78 | ||
79 | %description doc-html | |
80 | Objective Caml Preprocessor - HTML documentation. | |
81 | ||
82 | %description doc-html -l pl.UTF-8 | |
83 | Preprocesor OCamla - dokumentacja HTML. | |
84 | ||
85 | %prep | |
86 | %setup -q -n camlp4-%{main_ver}-%{subver} -a1 -a3 | |
87 | ||
88 | mkdir -p docs/html | |
89 | mv camlp4-%{doc_ver}-manual.html docs/html/camlp4 | |
90 | cp %{SOURCE2} docs/camlp4.ps.gz | |
91 | mv camlp4-%{doc_ver}-tutorial.html docs/html/camlp4-tutorial | |
92 | cp %{SOURCE4} docs/camlp4-tutorial.ps.gz | |
93 | ||
94 | %build | |
95 | ./configure | |
96 | ||
93d4a435 | 97 | %{__make} -j1 %{?with_ocaml_opt:all} |
1ddc1ab2 JB |
98 | |
99 | %install | |
100 | rm -rf $RPM_BUILD_ROOT | |
101 | ||
2c71b521 | 102 | %{__make} -j1 install \ |
1ddc1ab2 JB |
103 | BINDIR=$RPM_BUILD_ROOT%{_bindir} \ |
104 | LIBDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml | |
105 | ||
106 | %clean | |
107 | rm -rf $RPM_BUILD_ROOT | |
108 | ||
109 | %files | |
110 | %defattr(644,root,root,755) | |
111 | %doc CHANGES.md LICENSE README.md | |
112 | %attr(755,root,root) %{_bindir}/camlp4* | |
113 | %attr(755,root,root) %{_bindir}/mkcamlp4 | |
114 | %{_libdir}/ocaml/camlp4 | |
115 | ||
116 | %files doc-html | |
117 | %defattr(644,root,root,755) | |
118 | %doc docs/html/camlp4* |