New package ocaml-facile - OCaml library for constraint programming
This commit is contained in:
parent
45e23fc16a
commit
b605cc1b0c
|
@ -0,0 +1 @@
|
||||||
|
facile-1.1.tar.gz
|
|
@ -0,0 +1,60 @@
|
||||||
|
diff -ur facile-1.1/Makefile facile-1.1-makefile-fixes/Makefile
|
||||||
|
--- facile-1.1/Makefile 2004-09-08 11:51:02.000000000 +0200
|
||||||
|
+++ facile-1.1-makefile-fixes/Makefile 2008-03-19 03:04:09.000000000 +0100
|
||||||
|
@@ -7,11 +7,15 @@
|
||||||
|
|
||||||
|
install:
|
||||||
|
if test -d $(FACILEDIR); then : ; else mkdir $(FACILEDIR); fi
|
||||||
|
- cp src/facile.cmi src/facile.cma src/facile.cmxa src/facile.a $(FACILEDIR)
|
||||||
|
- chmod a+r $(FACILEDIR)/facile.cmi
|
||||||
|
- chmod a+r $(FACILEDIR)/facile.cma
|
||||||
|
- chmod a+r $(FACILEDIR)/facile.cmxa
|
||||||
|
- chmod a+r $(FACILEDIR)/facile.a
|
||||||
|
+ install -m 644 src/*.mli $(FACILEDIR)
|
||||||
|
+ if [ -e src/facile.cmi ] ; then cp src/facile.cmi $(FACILEDIR) ; fi
|
||||||
|
+ if [ -e src/facile.cma ] ; then cp src/facile.cma $(FACILEDIR) ; fi
|
||||||
|
+ if [ -e src/facile.a ] ; then cp src/facile.a $(FACILEDIR) ; fi
|
||||||
|
+ if [ -e src/facile.cmxa ] ; then cp src/facile.cmxa $(FACILEDIR) ; fi
|
||||||
|
+ if [ -e $(FACILEDIR)/facile.cmi ] ; then chmod a+r $(FACILEDIR)/facile.cmi ; fi
|
||||||
|
+ if [ -e $(FACILEDIR)/facile.cma ] ; then chmod a+r $(FACILEDIR)/facile.cma ; fi
|
||||||
|
+ if [ -e $(FACILEDIR)/facile.cmxa ] ; then chmod a+r $(FACILEDIR)/facile.cmxa ; fi
|
||||||
|
+ if [ -e $(FACILEDIR)/facile.a ] ; then chmod a+r $(FACILEDIR)/facile.a ; fi
|
||||||
|
|
||||||
|
clean:
|
||||||
|
cd src; make clean
|
||||||
|
diff -ur facile-1.1/src/Makefile facile-1.1-makefile-fixes/src/Makefile
|
||||||
|
--- facile-1.1/src/Makefile 2004-09-08 11:51:02.000000000 +0200
|
||||||
|
+++ facile-1.1-makefile-fixes/src/Makefile 2008-03-19 03:04:17.000000000 +0100
|
||||||
|
@@ -15,8 +15,13 @@
|
||||||
|
CSTRCMO = $(CSTR:.ml=.cmo)
|
||||||
|
CSTRCMX = $(CSTR:.ml=.cmx)
|
||||||
|
|
||||||
|
+CMXA =
|
||||||
|
+ifneq ($(wildcard /usr/bin/ocamlopt),)
|
||||||
|
+CMXA = facile.cmxa
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
# Default target: libraries and toplevel
|
||||||
|
-all : facile.cma facile.cmxa facile
|
||||||
|
+all : facile.cma $(CMXA) facile
|
||||||
|
|
||||||
|
# Libraries
|
||||||
|
facile.cma : $(CSTRCMO)
|
||||||
|
@@ -31,7 +36,7 @@
|
||||||
|
make facile.cmxa OPTOPT=-p
|
||||||
|
rm -fr $(CSTRCMX)
|
||||||
|
mv facile.cmxa $@
|
||||||
|
- mv facile.a facile.p.a
|
||||||
|
+ if [ -e facile.a ] ; then mv facile.a facile.p.a ; fi
|
||||||
|
|
||||||
|
# Toplevel (to be run with the "-I +facile" option)
|
||||||
|
facile : facile.cma
|
||||||
|
@@ -45,7 +50,7 @@
|
||||||
|
make facile.cmxa OPTOPT="-pp inline_functors"
|
||||||
|
rm -fr $(CSTRCMX)
|
||||||
|
mv facile.cmxa $@
|
||||||
|
- mv facile.a facile.exp.a
|
||||||
|
+ if [ -e facile.a ] ; then mv facile.a facile.exp.a ; fi
|
||||||
|
|
||||||
|
.SUFFIXES:
|
||||||
|
.SUFFIXES: .ml .mli .mly .mll .cmi .cmo .cmx .p.cmx .s
|
|
@ -0,0 +1,114 @@
|
||||||
|
%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
|
||||||
|
%define debug_package %{nil}
|
||||||
|
|
||||||
|
Name: ocaml-facile
|
||||||
|
Version: 1.1
|
||||||
|
Release: 2%{?dist}
|
||||||
|
Summary: OCaml library for constraint programming
|
||||||
|
Summary(fr): Librairie OCaml de programmation par contraintes
|
||||||
|
|
||||||
|
Group: Development/Libraries
|
||||||
|
License: LGPLv2+
|
||||||
|
URL: http://www.recherche.enac.fr/log/facile/
|
||||||
|
Source0: http://www.recherche.enac.fr/log/facile/distrib/facile-1.1.tar.gz
|
||||||
|
# makefile fixes by Steffen Joeris <white@debian.org>:
|
||||||
|
# * only build and install native binaries if ocamlopt is available
|
||||||
|
# * install .mli files
|
||||||
|
Patch0: facile-1.1-makefile-fixes.patch
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
|
BuildRequires: ocaml >= 3.02
|
||||||
|
BuildRequires: ocaml-findlib-devel
|
||||||
|
|
||||||
|
%define _use_internal_dependency_generator 0
|
||||||
|
%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh
|
||||||
|
%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh
|
||||||
|
|
||||||
|
%description
|
||||||
|
FaCiLe is a constraint programming library on integer and integer set finite
|
||||||
|
domains written in OCaml. It offers all usual facilities to create and
|
||||||
|
manipulate finite domain variables, arithmetic expressions and constraints
|
||||||
|
(possibly non-linear), built-in global constraints (difference, cardinality,
|
||||||
|
sorting etc.) and search and optimization goals. FaCiLe allows as well to build
|
||||||
|
easily user-defined constraints and goals (including recursive ones), making
|
||||||
|
pervasive use of OCaml higher-order functionals to provide a simple and flexible
|
||||||
|
interface for the user. As FaCiLe is an OCaml library and not "yet another
|
||||||
|
language", the user benefits from type inference and strong typing discipline,
|
||||||
|
high level of abstraction, modules and objects system, as well as native code
|
||||||
|
compilation efficiency, garbage collection and replay debugger, all features of
|
||||||
|
OCaml (among many others) that allow to prototype and experiment quickly:
|
||||||
|
modeling, data processing and interface are implemented with the same powerful
|
||||||
|
and efficient language.
|
||||||
|
|
||||||
|
%description -l fr
|
||||||
|
FaCiLe est une librairie de Programmation par Contraintes sur les domaines
|
||||||
|
finis (entiers et ensembles d'entiers) entièrement écrite avec OCaml. FaCiLe
|
||||||
|
intègre toutes les fonctionnalités standards de création et manipulation de
|
||||||
|
variables (logiques) à domaine fini, d'expressions et de contraintes
|
||||||
|
arithmétiques (éventuellement non-linéaires), de contraintes globales
|
||||||
|
(différence, cardinalité, tri etc.) et de buts de recherche et d'optimisation.
|
||||||
|
FaCiLe permet aussi de construire facilement de nouvelles contraintes et de
|
||||||
|
nouveaux buts (éventuellement récursifs) définis par l'utilisateur, à l'aide
|
||||||
|
d'interfaces simples et puissantes qui utilisent intensivement des fonctions
|
||||||
|
d'ordre supérieur. Comme FaCiLe est une librairie OCaml et pas "encore un
|
||||||
|
nouveau langage", l'utilisateur bénéficie de l'inférence de type et du typage
|
||||||
|
statique strict, d'un haut niveau d'abstraction, des systèmes de modules et
|
||||||
|
d'objets, ainsi que de l'efficacité du compilateur qui produit du code natif
|
||||||
|
optimisé (pour toutes les plates-formes courantes), de la gestion automatique de
|
||||||
|
la mémoire et du débogueur avec retour arrière, autant de caractéristiques
|
||||||
|
d'OCaml qui permettent de prototyper et expérimenter très rapidement: la
|
||||||
|
modélisation, le traitement des données et les interfaces sont implémentés à
|
||||||
|
l'aide du même langage puissant et efficace.
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: Development files for %{name}
|
||||||
|
Group: Development/Libraries
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
The %{name}-devel package contains libraries and signature files for
|
||||||
|
developing applications that use %{name}.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n facile-%{version}
|
||||||
|
%patch0 -p1 -b .makefile-fixes
|
||||||
|
# This is not autoconf, but a simple custom configure script.
|
||||||
|
# The --faciledir directory is only used for "make install".
|
||||||
|
./configure --faciledir $RPM_BUILD_ROOT%{_libdir}/ocaml/facile
|
||||||
|
|
||||||
|
%build
|
||||||
|
make
|
||||||
|
|
||||||
|
%install
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
mkdir $RPM_BUILD_ROOT
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_libdir}/ocaml
|
||||||
|
make install
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%doc LICENSE README
|
||||||
|
%{_libdir}/ocaml/facile/
|
||||||
|
%if %opt
|
||||||
|
%exclude %{_libdir}/ocaml/facile/*.a
|
||||||
|
%exclude %{_libdir}/ocaml/facile/*.cmxa
|
||||||
|
%endif
|
||||||
|
%exclude %{_libdir}/ocaml/facile/*.mli
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%if %opt
|
||||||
|
%{_libdir}/ocaml/facile/*.a
|
||||||
|
%{_libdir}/ocaml/facile/*.cmxa
|
||||||
|
%endif
|
||||||
|
%{_libdir}/ocaml/facile/*.mli
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Wed Mar 19 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> - 1.1-2
|
||||||
|
- use correct syntax for French description
|
||||||
|
|
||||||
|
* Wed Mar 19 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> - 1.1-1
|
||||||
|
- initial Fedora package
|
Loading…
Reference in New Issue