3 %bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built)
5 # not yet available on x32 (ocaml 4.02.1), update when upstream will support it
6 %ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9
7 %undefine with_ocaml_opt
10 Summary: Functional Constraint Library implemented in Objective Caml
16 Source0: http://opti.recherche.enac.fr/facile/distrib/facile-%{version}.tar.gz
17 # Source0-md5: 172c4fbea636a8fa575b988390639d8d
19 URL: http://www.recherche.enac.fr/opti/facile/
20 BuildRequires: ocaml >= 3.02
21 %requires_eq ocaml-runtime
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 %define debug_package %{nil}
25 %if %{without ocaml_opt}
26 %define no_install_post_strip 1
27 # no opt means no native binary, stripping bytecode breaks such programs
28 %define _enable_debug_packages 0
32 FaCiLe is a constraint programming library on integer and integer set
33 finite domains written in OCaml. It offers all usual facilities to
34 create and manipulate finite domain variables, arithmetic expressions
35 and constraints (possibly non-linear), built-in global constraints
36 (difference, cardinality, sorting etc.) and search and optimization
37 goals. FaCiLe allows as well to build easily user-defined constraints
38 and goals (including recursive ones), making pervasive use of OCaml
39 higher-order functionals to provide a simple and flexible interface
40 for the user. As FaCiLe is an OCaml library and not "yet another
41 language", the user benefits from type inference and strong typing
42 discipline, high level of abstraction, modules and objects system, as
43 well as native code compilation efficiency, garbage collection and
44 replay debugger, all features of OCaml (among many others) that allow
45 to prototype and experiment quickly: modeling, data processing and
46 interface are implemented with the same powerful and efficient
47 language. For a more complete description, you may consult the preface
48 and foreword of the online documentation
51 %setup -q -n facile-%{version}
55 # use ./configure because of 'Unknown option "LDFLAGS=-Wl,--as-needed -Wl,-z,relro -Wl,-z,-combreloc "
58 %{__make} -C src all %{?with_ocaml_opt:opt} \
59 CC="%{__cc} %{rpmcflags} -fPIC"
62 rm -rf $RPM_BUILD_ROOT
63 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/facile
65 install src/facile.cmi src/facile.cma $RPM_BUILD_ROOT%{_libdir}/ocaml/facile
67 install src/facile.cmxa src/facile.a $RPM_BUILD_ROOT%{_libdir}/ocaml/facile
71 rm -rf $RPM_BUILD_ROOT
74 %defattr(644,root,root,755)
76 %dir %{_libdir}/ocaml/facile
77 %{_libdir}/ocaml/facile/*.cma
78 %{_libdir}/ocaml/facile/*.cmi
80 %{_libdir}/ocaml/facile/*.a
81 %{_libdir}/ocaml/facile/*.cmxa