From 0e3751e3df526512b95d09ed03af790733c87ab8 Mon Sep 17 00:00:00 2001 From: Ben Rosser Date: Thu, 7 Sep 2017 11:09:41 -0400 Subject: [PATCH] Initial import (rhbz#1487875). --- .gitignore | 1 + ocaml-mccs.spec | 79 +++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 81 insertions(+) create mode 100644 .gitignore create mode 100644 ocaml-mccs.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7b8a025 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/ocaml-mccs-1.1.tar.gz diff --git a/ocaml-mccs.spec b/ocaml-mccs.spec new file mode 100644 index 0000000..8578b35 --- /dev/null +++ b/ocaml-mccs.spec @@ -0,0 +1,79 @@ +%global extraver 2c + +Name: ocaml-mccs +Version: 1.1 +Release: 1.%{extraver}%{?dist} +Summary: Multi Criteria CUDF Solver with OCaml bindings + +%global libname %(echo %{name} | sed -e 's/^ocaml-//') + +# Original C/C++ code is BSD, OCaml bindings are LGPL. +# Linking exception, see included COPYING file. +License: BSD and LGPLv3+ with exceptions + +URL: https://github.com/AltGr/ocaml-mccs + +# Upstream's use of a '+' instead of a '.' makes this hard to use a macro. +Source0: https://github.com/AltGr/ocaml-mccs/archive/%{version}+%{extraver}/%{name}-%{version}.tar.gz + +BuildRequires: ocaml +BuildRequires: jbuilder +BuildRequires: gcc +BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-cudf-devel +BuildRequires: glpk-devel + +%description +mccs (which stands for Multi Criteria CUDF Solver) is a CUDF problem +solver developed at UNS during the European MANCOOSI project. + +This project contains a stripped-down version of the mccs solver, +taken from snapshot 1.1, with a binding as an OCaml library, and +building with jbuilder. + +The binding enables interoperation with binary CUDF data from the +OCaml CUDF library, and removes the native C++ parsers and printers. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%autosetup -n %{name}-%{version}-%{extraver} + +%build +jbuilder build -p mccs %{?_smp_mflags} + +%install +# This is an opam dependency. Tragically it means we must manually install, +# since the jbuilder install command only works with opam-installer. +mkdir -p %{buildroot}%{_libdir}/ocaml +cp -aLr _build/install/default/lib/* %{buildroot}%{_libdir}/ocaml/ + +%files +%license LICENCE +%doc README.md +%{_libdir}/ocaml/%{libname} +%ifarch %{ocaml_native_compiler} +%exclude %{_libdir}/ocaml/*/*.a +%exclude %{_libdir}/ocaml/*/*.cmx +%exclude %{_libdir}/ocaml/*/*.cmxa +%endif +%exclude %{_libdir}/ocaml/*/*.mli +%{_libdir}/ocaml/stublibs/*.so + +%files devel +%ifarch %{ocaml_native_compiler} +%{_libdir}/ocaml/*/*.a +%{_libdir}/ocaml/*/*.cmx +%{_libdir}/ocaml/*/*.cmxa +%endif +%{_libdir}/ocaml/*/*.mli + +%changelog +* Sat Sep 02 2017 Ben Rosser 1.1-1.2c +- Initial package. diff --git a/sources b/sources new file mode 100644 index 0000000..b1ff8ff --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (ocaml-mccs-1.1.tar.gz) = 53a96aab7abe02cc77ec35341f4e1ca3c5896fb13f7dc36902a014bfba29d50dfebe0457178abcc12dc065aa1e98b8175c2128fc9a799fd696d6ce9348b2281b