]> git.pld-linux.org Git - SPECS.git/blob - ocaml-facile.spec
SPECS updated Sun 1 Aug 11:02:02 CEST 2021
[SPECS.git] / ocaml-facile.spec
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
10 Summary:        Functional Constraint Library implemented in Objective Caml
11 Name:           ocaml-facile
12 Version:        1.1.3
13 Release:        3
14 License:        LGPL
15 Group:          Libraries
16 Source0:        http://opti.recherche.enac.fr/facile/distrib/facile-%{version}.tar.gz
17 # Source0-md5:  172c4fbea636a8fa575b988390639d8d
18 Patch0:         opt.patch
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)
23
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
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
51 %setup -q -n facile-%{version}
52 %patch0 -p1
53
54 %build
55 # use ./configure because of 'Unknown option "LDFLAGS=-Wl,--as-needed -Wl,-z,relro -Wl,-z,-combreloc "
56 ./configure
57
58 %{__make} -C src all %{?with_ocaml_opt:opt} \
59         CC="%{__cc} %{rpmcflags} -fPIC"
60
61 %install
62 rm -rf $RPM_BUILD_ROOT
63 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/facile
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
69
70 %clean
71 rm -rf $RPM_BUILD_ROOT
72
73 %files
74 %defattr(644,root,root,755)
75 %doc LICENSE README
76 %dir %{_libdir}/ocaml/facile
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
This page took 0.425055 seconds and 3 git commands to generate.