2016-05-24 14:03:01 +02:00
|
|
|
#
|
|
|
|
# spec file for package ocaml-parmap
|
|
|
|
#
|
2017-05-31 09:38:09 +02:00
|
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
2016-05-24 14:03:01 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2017-05-31 09:38:09 +02:00
|
|
|
|
2016-05-24 14:03:01 +02:00
|
|
|
Name: ocaml-parmap
|
2016-06-24 00:36:44 +02:00
|
|
|
Version: 20160605.10e2437
|
2016-05-24 14:03:01 +02:00
|
|
|
Release: 0
|
2017-07-17 14:42:49 +02:00
|
|
|
%if %{defined ocaml_preserve_bytecode}
|
2017-05-31 09:38:09 +02:00
|
|
|
%{ocaml_preserve_bytecode}
|
2017-07-17 14:42:49 +02:00
|
|
|
%endif
|
2016-06-14 00:11:22 +02:00
|
|
|
Summary: Exploit multicore architectures for OCaml programs with minimal modifications
|
2017-05-31 09:38:09 +02:00
|
|
|
License: LGPL-2.0
|
2016-05-24 14:03:01 +02:00
|
|
|
Group: Development/Libraries/Other
|
2017-05-31 09:38:09 +02:00
|
|
|
Url: http://rdicosmo.github.io/parmap/
|
2016-05-24 14:03:01 +02:00
|
|
|
Source: %{name}-%{version}.tar.xz
|
|
|
|
BuildRequires: ocaml
|
2016-06-17 08:58:45 +02:00
|
|
|
BuildRequires: ocaml-oasis
|
2016-05-24 14:03:01 +02:00
|
|
|
BuildRequires: ocaml-ocamldoc
|
2016-06-17 08:58:45 +02:00
|
|
|
BuildRequires: ocaml-rpm-macros >= 4.03
|
2016-05-30 08:45:03 +02:00
|
|
|
BuildRequires: ocamlfind(bigarray)
|
2016-06-17 08:58:45 +02:00
|
|
|
BuildRequires: ocamlfind(graphics)
|
2016-05-30 08:45:03 +02:00
|
|
|
BuildRequires: ocamlfind(unix)
|
2016-06-17 08:58:45 +02:00
|
|
|
BuildRequires: pkgconfig(x11)
|
2016-05-24 14:03:01 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%description
|
|
|
|
If you want to use your many cores to accelerate an operation
|
|
|
|
which happens to be a map, fold or map/fold (map-reduce), just use
|
|
|
|
Parmap's parmap, parfold and parmapfold primitives in place of the
|
|
|
|
standard List.map and friends; you can specify the number of
|
|
|
|
subprocesses to use with the optional parameter ncores, and the
|
|
|
|
size of granularity of the parallel computation with the optional
|
|
|
|
parameter chunksize.
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Development files for %{name}
|
|
|
|
Group: Development/Libraries/Other
|
2016-06-16 12:32:52 +02:00
|
|
|
Requires: %{name} = %{version}
|
2016-05-24 14:03:01 +02:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
The %{name}-devel package contains libraries and signature files for
|
|
|
|
developing applications that use %{name}.
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%build
|
2016-06-17 08:58:45 +02:00
|
|
|
echo -n > config.h
|
|
|
|
if grep -w sched_setaffinity /usr/include/sched.h
|
|
|
|
then
|
|
|
|
tee -a config.h <<_EOF_
|
|
|
|
#define HAVE_DECL_SCHED_SETAFFINITY 1
|
|
|
|
_EOF_
|
|
|
|
fi
|
|
|
|
rm -fv setup.ml myocamlbuild.ml META* _* */_*
|
|
|
|
# obs service changes every ^Version line ...
|
|
|
|
sh -c "sed 's/^Version.*/Version: %{version}/' | tee _oasis" <<_EOF_
|
|
|
|
OASISFormat: 0.4
|
|
|
|
Name: parmap
|
2017-05-31 09:38:09 +02:00
|
|
|
Version: 0
|
2016-06-17 08:58:45 +02:00
|
|
|
Synopsis: library to exploit multicore architectures (parallel programming)
|
|
|
|
Authors: Marco Danelutto and Roberto Di Cosmo
|
2017-05-31 09:38:09 +02:00
|
|
|
License: %{license}
|
2016-06-17 08:58:45 +02:00
|
|
|
LicenseFile: LICENSE
|
|
|
|
Plugins: META(`oasis version`)
|
|
|
|
BuildTools: ocamlbuild
|
|
|
|
|
|
|
|
Library parmap
|
2017-05-31 09:38:09 +02:00
|
|
|
Path: .
|
|
|
|
Install: true
|
|
|
|
Modules: Parmap
|
|
|
|
CSources: bytearray_stubs.c, setcore_stubs.c, config.h
|
|
|
|
CCOpt: -Wall -O2 -g -I$PWD -Werror -D_GNU_SOURCE
|
2016-06-17 08:58:45 +02:00
|
|
|
|
|
|
|
Document parmap
|
2017-05-31 09:38:09 +02:00
|
|
|
Title: API reference for parmap
|
|
|
|
Type: ocamlbuild
|
|
|
|
BuildTools+: ocamldoc
|
|
|
|
InstallDir: \$htmldir
|
|
|
|
Install: true
|
|
|
|
XOCamlbuildPath: .
|
|
|
|
XOCamlbuildLibraries: parmap
|
2016-06-17 08:58:45 +02:00
|
|
|
|
|
|
|
Executable "%{name}-mandels"
|
2017-05-31 09:38:09 +02:00
|
|
|
Install: true
|
|
|
|
Path: example
|
|
|
|
MainIs: mandels.ml
|
|
|
|
CompiledObject: best
|
|
|
|
BuildDepends: parmap, graphics, unix, bigarray
|
2016-06-17 08:58:45 +02:00
|
|
|
_EOF_
|
|
|
|
%oasis_setup
|
|
|
|
%ocaml_oasis_configure --enable-docs
|
|
|
|
%ocaml_oasis_build
|
|
|
|
%ocaml_oasis_doc
|
2016-05-24 14:03:01 +02:00
|
|
|
|
|
|
|
%install
|
2016-06-17 08:58:45 +02:00
|
|
|
%ocaml_oasis_findlib_install
|
2016-05-26 13:58:52 +02:00
|
|
|
#
|
|
|
|
mkdir -vp %{buildroot}/etc/ld.so.conf.d/
|
|
|
|
tee %{buildroot}/etc/ld.so.conf.d/%{name}.conf <<_EOF_
|
2016-06-17 08:58:45 +02:00
|
|
|
%{_libdir}/ocaml/parmap
|
2016-05-26 13:58:52 +02:00
|
|
|
_EOF_
|
|
|
|
#
|
|
|
|
|
|
|
|
%post -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -p /sbin/ldconfig
|
2016-05-24 14:03:01 +02:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc README.md LICENSE
|
2016-05-26 13:58:52 +02:00
|
|
|
/etc/ld.so.conf.d/*.conf
|
2016-06-17 08:58:45 +02:00
|
|
|
%{_bindir}/*
|
2016-05-25 11:18:53 +02:00
|
|
|
%dir %{_libdir}/ocaml
|
2016-05-24 14:03:01 +02:00
|
|
|
%dir %{_libdir}/ocaml/*
|
2017-07-17 14:42:49 +02:00
|
|
|
%if %{defined ocaml_native_compiler}
|
2016-06-17 08:58:45 +02:00
|
|
|
%{_libdir}/ocaml/*/*.cmxs
|
|
|
|
%endif
|
2016-05-25 10:03:51 +02:00
|
|
|
%{_libdir}/ocaml/*/*.so
|
2016-05-24 14:03:01 +02:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc LICENSE
|
2016-06-17 08:58:45 +02:00
|
|
|
%{oasis_docdir_html}
|
2016-05-25 11:18:53 +02:00
|
|
|
%dir %{_libdir}/ocaml/*
|
2016-05-25 10:03:51 +02:00
|
|
|
%{_libdir}/ocaml/*/*.a
|
2017-07-17 14:42:49 +02:00
|
|
|
%if %{defined ocaml_native_compiler}
|
2016-05-24 14:03:01 +02:00
|
|
|
%{_libdir}/ocaml/*/*.cmx
|
|
|
|
%{_libdir}/ocaml/*/*.cmxa
|
|
|
|
%endif
|
2016-06-17 08:58:45 +02:00
|
|
|
%{_libdir}/ocaml/*/*.annot
|
2016-05-25 10:03:51 +02:00
|
|
|
%{_libdir}/ocaml/*/*.cma
|
|
|
|
%{_libdir}/ocaml/*/*.cmi
|
2016-06-17 08:58:45 +02:00
|
|
|
%{_libdir}/ocaml/*/*.cmt
|
|
|
|
%{_libdir}/ocaml/*/*.cmti
|
2016-05-24 14:03:01 +02:00
|
|
|
%{_libdir}/ocaml/*/*.mli
|
2016-05-25 10:03:51 +02:00
|
|
|
%{_libdir}/ocaml/*/META
|
2016-05-24 14:03:01 +02:00
|
|
|
|
|
|
|
%changelog
|