# # 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 http://bugs.opensuse.org/ # Name: ocaml-fileutils Version: 0.5.0 %{ocaml_preserve_bytecode} Release: 0 Summary: OCaml library for common file and filename operations License: SUSE-LGPL-2.0-with-linking-exception Group: Development/Libraries/Other Url: https://forge.ocamlcore.org/projects/ocaml-fileutils/ 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 %description 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}. %prep %setup -q %build ocaml setup.ml -configure --prefix %{_prefix} --destdir %{buildroot} make %{?_smp_mflags} %install export DESTDIR=%{buildroot} export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs # Set htmldir to current directory, then copy the docs (in api/) # as a %doc rule. make htmldir=. install %check make %{?_smp_mflags} test %files %defattr(-,root,root,-) %doc COPYING.txt %{_libdir}/ocaml/fileutils %if %{ocaml_native_compiler} %exclude %{_libdir}/ocaml/fileutils/*.a %exclude %{_libdir}/ocaml/fileutils/*.cmx %exclude %{_libdir}/ocaml/fileutils/*.cmxa %endif %exclude %{_libdir}/ocaml/fileutils/*.ml %exclude %{_libdir}/ocaml/fileutils/*.mli %files devel %defattr(-,root,root,-) %doc COPYING.txt AUTHORS.txt CHANGELOG.txt README.txt TODO.txt %if %{ocaml_native_compiler} %{_libdir}/ocaml/fileutils/*.a %{_libdir}/ocaml/fileutils/*.cmx %{_libdir}/ocaml/fileutils/*.cmxa %endif %{_libdir}/ocaml/fileutils/*.ml %{_libdir}/ocaml/fileutils/*.mli %changelog