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