]>
Commit | Line | Data |
---|---|---|
b4bd1ab1 ER |
1 | # |
2 | # Conditional build: | |
2cb517ac JR |
3 | %bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built) |
4 | ||
20329087 | 5 | # not yet available on x32 (ocaml 4.02.1), update when upstream will support it |
2cb517ac JR |
6 | %ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9 |
7 | %undefine with_ocaml_opt | |
8 | %endif | |
b4bd1ab1 ER |
9 | |
10 | %define debug_package %{nil} | |
20329087 JB |
11 | Summary: Preprocessor (cpp equivalent) for OCaml |
12 | Summary(pl.UTF-8): Preprocesor (odpowiednik cpp) dla OCamla | |
b4bd1ab1 | 13 | Name: cppo |
fc8d0687 | 14 | Version: 1.6.7 |
a4d300b6 | 15 | Release: 2 |
b4bd1ab1 | 16 | License: BSD |
20329087 | 17 | Group: Development/Tools |
54eff1f1 | 18 | Source0: https://github.com/mjambon/cppo/archive/v%{version}/%{name}-%{version}.tar.gz |
fc8d0687 | 19 | # Source0-md5: 88c9f9a1f067f91dab5abe1653e281a9 |
b4bd1ab1 ER |
20 | URL: http://mjambon.com/cppo.html |
21 | BuildRequires: ocaml >= 3.04-7 | |
fc8d0687 JR |
22 | BuildRequires: ocaml-findlib |
23 | BuildRequires: ocaml-ocamlbuild-devel | |
b4bd1ab1 ER |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
25 | ||
26 | %description | |
27 | Cppo is an OCaml-friendly implementation of cpp, the C preprocessor. | |
28 | It can replace camlp4 for preprocessing OCaml files, using cpp style | |
29 | and syntax. It allows defining simple macros and file inclusion. | |
30 | ||
31 | %description -l pl.UTF-8 | |
20329087 | 32 | Cppo to przyjazna dla OCamla implementacja cpp - preprocesora języka |
fc8d0687 JR |
33 | C. Może zastąpić preprocesor camlp4 przy przetwarzaniu plików OCamla z |
34 | wykorzystaniem stylu oraz składni cpp. Pozwala na definiowanie | |
20329087 JB |
35 | prostych makr oraz włączanie plików. |
36 | ||
37 | %package -n ocamlbuild-cppo | |
38 | Summary: Cppo plugin for ocamlbuild | |
39 | Summary(pl.UTF-8): Wtyczka cppo dla ocamlbuilda | |
40 | Group: Libraries | |
41 | Requires: %{name} = %{version}-%{release} | |
42 | # ocamlbuild resides in ocaml package, so don't require just ocaml-runtime | |
fc8d0687 | 43 | %requires_eq ocaml |
20329087 JB |
44 | |
45 | %description -n ocamlbuild-cppo | |
46 | Cppo plugin for ocamlbuild. | |
47 | ||
48 | %description -n ocamlbuild-cppo -l pl.UTF-8 | |
49 | Wtyczka cppo dla ocamlbuilda. | |
50 | ||
51 | %package -n ocamlbuild-cppo-devel | |
52 | Summary: Development files for ocamlbuild_cppo library | |
53 | Summary(pl.UTF-8): Pliki programistyczne biblioteki ocamlbuild_cppo | |
54 | Group: Development/Libraries | |
55 | Requires: ocamlbuild-cppo = %{version}-%{release} | |
fc8d0687 | 56 | %requires_eq ocaml |
20329087 JB |
57 | |
58 | %description -n ocamlbuild-cppo-devel | |
59 | Development files for ocamlbuild_cppo library. | |
60 | ||
61 | %description -n ocamlbuild-cppo-devel -l pl.UTF-8 | |
62 | Pliki programistyczne biblioteki ocamlbuild_cppo. | |
b4bd1ab1 ER |
63 | |
64 | %prep | |
65 | %setup -q | |
66 | ||
67 | %build | |
fc8d0687 | 68 | dune build |
b4bd1ab1 ER |
69 | |
70 | %install | |
71 | rm -rf $RPM_BUILD_ROOT | |
a4d300b6 | 72 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/ocaml,%{_examplesdir}} |
20329087 | 73 | |
fc8d0687 JR |
74 | cp -p _build/install/default/bin/cppo $RPM_BUILD_ROOT%{_bindir} |
75 | cp -Lr _build/install/default/lib/cppo_ocamlbuild $RPM_BUILD_ROOT%{_libdir}/ocaml/ | |
20329087 JB |
76 | |
77 | cp -pr examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
78 | ||
b4bd1ab1 ER |
79 | %clean |
80 | rm -rf $RPM_BUILD_ROOT | |
81 | ||
82 | %files | |
83 | %defattr(644,root,root,755) | |
fc8d0687 | 84 | %doc Changes LICENSE.md README.md |
b4bd1ab1 | 85 | %attr(755,root,root) %{_bindir}/cppo |
20329087 JB |
86 | %{_examplesdir}/%{name}-%{version} |
87 | ||
88 | %files -n ocamlbuild-cppo | |
89 | %defattr(644,root,root,755) | |
90 | %dir %{_libdir}/ocaml/cppo_ocamlbuild | |
fc8d0687 JR |
91 | %{_libdir}/ocaml/cppo_ocamlbuild/META |
92 | %{_libdir}/ocaml/cppo_ocamlbuild/dune-package | |
93 | %{_libdir}/ocaml/cppo_ocamlbuild/opam | |
94 | %{_libdir}/ocaml/cppo_ocamlbuild/cppo_ocamlbuild.cma | |
20329087 | 95 | %if %{with ocaml_opt} |
fc8d0687 | 96 | %attr(755,root,root) %{_libdir}/ocaml/cppo_ocamlbuild/cppo_ocamlbuild.cmxs |
20329087 | 97 | %endif |
20329087 JB |
98 | |
99 | %files -n ocamlbuild-cppo-devel | |
100 | %defattr(644,root,root,755) | |
101 | %{_libdir}/ocaml/cppo_ocamlbuild/ocamlbuild_cppo.cmi | |
102 | %if %{with ocaml_opt} | |
fc8d0687 JR |
103 | %{_libdir}/ocaml/cppo_ocamlbuild/ocamlbuild_cppo.cmx |
104 | %{_libdir}/ocaml/cppo_ocamlbuild/cppo_ocamlbuild.cmxa | |
105 | %{_libdir}/ocaml/cppo_ocamlbuild/cppo_ocamlbuild.a | |
20329087 | 106 | %endif |
fc8d0687 JR |
107 | %{_libdir}/ocaml/cppo_ocamlbuild/ocamlbuild_cppo.mli |
108 | %{_libdir}/ocaml/cppo_ocamlbuild/ocamlbuild_cppo.cmt | |
109 | %{_libdir}/ocaml/cppo_ocamlbuild/ocamlbuild_cppo.cmti |