3 %bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built)
5 # not yet available on x32 (ocaml 4.02.1), remove when upstream will support it
6 %ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9
7 %undefine with_ocaml_opt
10 %define debug_package %{nil}
11 Summary: cpp for OCaml
12 Summary(pl.UTF-8): Wiązania cppo dla OCamla
18 Source0: http://mjambon.com/releases/cppo/%{name}-%{version}.tar.gz
19 # Source0-md5: cfea4211ab9a7c1276537ce4fc3669b5
20 URL: http://mjambon.com/cppo.html
21 BuildRequires: ocaml >= 3.04-7
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 Cppo is an OCaml-friendly implementation of cpp, the C preprocessor.
26 It can replace camlp4 for preprocessing OCaml files, using cpp style
27 and syntax. It allows defining simple macros and file inclusion.
29 %description -l pl.UTF-8
30 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
31 używających tej biblioteki.
37 %{__make} -j1 all %{?with_ocaml_opt:opt} \
38 CC="%{__cc} %{rpmcflags} -fPIC"
41 rm -rf $RPM_BUILD_ROOT
42 install -d $RPM_BUILD_ROOT%{_bindir}
43 install -p cppo $RPM_BUILD_ROOT%{_bindir}
46 rm -rf $RPM_BUILD_ROOT
49 %defattr(644,root,root,755)
50 %doc README Changes LICENSE examples
51 %attr(755,root,root) %{_bindir}/cppo