#
# Conditional build:
-%bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built)
+%bcond_without ocaml_opt # native optimized binaries (bytecode is always built)
# not yet available on x32 (ocaml 4.02.1), update when upstream will support it
%ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
%undefine with_ocaml_opt
%endif
-%if %{without ocaml_opt}
-%define _enable_debug_packages 0
-%endif
-
-%define module %{module}
+%define module TEMPLATE
Summary: %{module} binding for OCaml
Summary(pl.UTF-8): Wiązania %{module} dla OCamla
Name: ocaml-%{module}
License: - (enter GPL/LGPL/BSD/BSD-like/other license name here)
Group: Libraries
Source0: %{module}-%{version}.tar.gz
-URL: -
# Source0-md5: -
+URL: -
#BuildRequires: -devel
BuildRequires: ocaml >= 1:4.00
+#BuildRequires: ocaml-dune
%requires_eq ocaml-runtime
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%{__make} -j1 all %{?with_ocaml_opt:opt} \
CC="%{__cc} %{rpmcflags} -fPIC"
+# or
+dune build --verbose
+
%install
rm -rf $RPM_BUILD_ROOT
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
+# or
+dune install --destdir=$RPM_BUILD_ROOT
+
#install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
#cp -r foo bar $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}