File ocaml-fileutils.spec of Package ocaml-fileutils.1126

# spec file for package ocaml-fileutils
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# 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

Name:           ocaml-fileutils
Version:        0.5.0
Release:        0
Summary:        OCaml library for common file and filename operations
License:        SUSE-LGPL-2.0-with-linking-exception
Group:          Development/Libraries/Other
Source0:        ocaml-fileutils-%{version}.tar.xz
BuildRequires:  ocaml >= 4.00.1
BuildRequires:  ocaml-rpm-macros >= 4.02.1
BuildRequires:  ocaml-findlib-devel >= 1.3.3-3
BuildRequires:  ocaml-ocamldoc
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

This library is intended to provide a basic interface to the most
common file and filename operations.  It provides several different
filename functions: reduce, make_absolute, make_relative...  It also
enables you to manipulate real files: cp, mv, rm, touch...

It is separated into two modules: SysUtil and SysPath.  The first one
manipulates real files, the second one is made for manipulating
abstract filenames.

%package        devel
Summary:        Development files for %{name}
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}-%{release}

%description    devel
The %{name}-devel package contains libraries and signature files for
developing applications that use %{name}.

%setup -q

ocaml -configure --prefix %{_prefix} --destdir %{buildroot}
make %{?_smp_mflags}

export DESTDIR=%{buildroot}
export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml

# Set htmldir to current directory, then copy the docs (in api/)
# as a %doc rule.
make htmldir=. install

make %{?_smp_mflags} test

%doc COPYING.txt
%if %{ocaml_native_compiler}
%exclude %{_libdir}/ocaml/fileutils/*.a
%exclude %{_libdir}/ocaml/fileutils/*.cmx
%exclude %{_libdir}/ocaml/fileutils/*.cmxa
%exclude %{_libdir}/ocaml/fileutils/*.ml
%exclude %{_libdir}/ocaml/fileutils/*.mli

%files devel
%if %{ocaml_native_compiler}