+#
+# Conditional build:
+%bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built)
+
+# not yet available on x32 (ocaml 4.02.1), remove when upstream will support it
+%ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9
+%undefine with_ocaml_opt
+%endif
+
%define apxs /usr/sbin/apxs
%define apache /usr/sbin/httpd
Summary: Modules for Internet programming in OCaml
Summary(pl.UTF-8): Moduły ułatwiające pisanie programów internetowych w OCamlu
Name: ocaml-net
Version: 3.7.7
-Release: 1
+Release: 2
License: GPL v2+ (nethttpd), LGPL v2+ (mod_caml), BSD-like (the rest)
Group: Libraries
Source0: http://download.camlcity.org/download/ocamlnet-%{version}.tar.gz
-apxs %{apxs} \
-apache %{apache}
-%{__make} -j1 all opt
+%{__make} -j1 all %{?with_ocaml_opt:opt}
%install
rm -rf $RPM_BUILD_ROOT