]>
Commit | Line | Data |
---|---|---|
06a91b8b JR |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built) | |
4 | ||
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 | |
8 | %endif | |
9 | ||
95c49677 | 10 | Summary: Functional Constraint Library implemented in Objective Caml |
d4c3d688 | 11 | Name: ocaml-facile |
7462a603 | 12 | Version: 1.1.3 |
cbc655e6 | 13 | Release: 3 |
95c49677 SP |
14 | License: LGPL |
15 | Group: Libraries | |
7462a603 JR |
16 | Source0: http://opti.recherche.enac.fr/facile/distrib/facile-%{version}.tar.gz |
17 | # Source0-md5: 172c4fbea636a8fa575b988390639d8d | |
06a91b8b | 18 | Patch0: opt.patch |
95c49677 SP |
19 | URL: http://www.recherche.enac.fr/opti/facile/ |
20 | BuildRequires: ocaml >= 3.02 | |
d4c3d688 | 21 | %requires_eq ocaml-runtime |
95c49677 SP |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
23 | ||
06a91b8b JR |
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 | |
29 | %endif | |
30 | ||
95c49677 SP |
31 | %description |
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 | |
49 | ||
50 | %prep | |
d4c3d688 | 51 | %setup -q -n facile-%{version} |
06a91b8b | 52 | %patch0 -p1 |
95c49677 SP |
53 | |
54 | %build | |
d4c3d688 | 55 | # use ./configure because of 'Unknown option "LDFLAGS=-Wl,--as-needed -Wl,-z,relro -Wl,-z,-combreloc " |
95c49677 SP |
56 | ./configure |
57 | ||
06a91b8b JR |
58 | %{__make} -C src all %{?with_ocaml_opt:opt} \ |
59 | CC="%{__cc} %{rpmcflags} -fPIC" | |
95c49677 SP |
60 | |
61 | %install | |
62 | rm -rf $RPM_BUILD_ROOT | |
63 | install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/facile | |
06a91b8b JR |
64 | |
65 | install src/facile.cmi src/facile.cma $RPM_BUILD_ROOT%{_libdir}/ocaml/facile | |
66 | %if %{with ocaml_opt} | |
67 | install src/facile.cmxa src/facile.a $RPM_BUILD_ROOT%{_libdir}/ocaml/facile | |
68 | %endif | |
95c49677 SP |
69 | |
70 | %clean | |
71 | rm -rf $RPM_BUILD_ROOT | |
72 | ||
73 | %files | |
74 | %defattr(644,root,root,755) | |
75 | %doc LICENSE README | |
c859a95e | 76 | %dir %{_libdir}/ocaml/facile |
06a91b8b JR |
77 | %{_libdir}/ocaml/facile/*.cma |
78 | %{_libdir}/ocaml/facile/*.cmi | |
79 | %if %{with ocaml_opt} | |
80 | %{_libdir}/ocaml/facile/*.a | |
81 | %{_libdir}/ocaml/facile/*.cmxa | |
82 | %endif |