forked from pool/ocaml-fileutils
102 lines
3.1 KiB
RPMSpec
102 lines
3.1 KiB
RPMSpec
|
#
|
||
|
# 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/
|
||
|
#
|
||
|
|
||
|
|
||
|
%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
|
||
|
|
||
|
Name: ocaml-fileutils
|
||
|
Version: 0.4.5
|
||
|
Release: 0
|
||
|
Summary: OCaml library for common file and filename operations
|
||
|
License: LGPL-2.0 with exceptions
|
||
|
Group: Development/Libraries/Other
|
||
|
Url: https://forge.ocamlcore.org/projects/ocaml-fileutils/
|
||
|
Source0: https://forge.ocamlcore.org/frs/download.php/1194/ocaml-fileutils-%{version}.tar.gz
|
||
|
BuildRequires: ocaml >= 4.00.1
|
||
|
BuildRequires: ocaml-findlib-devel >= 1.3.3-3
|
||
|
BuildRequires: ocaml-ocamldoc
|
||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||
|
ExcludeArch: sparc64 s390 s390x
|
||
|
|
||
|
%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 %{opt}
|
||
|
%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 %{opt}
|
||
|
%{_libdir}/ocaml/fileutils/*.a
|
||
|
%{_libdir}/ocaml/fileutils/*.cmx
|
||
|
%{_libdir}/ocaml/fileutils/*.cmxa
|
||
|
%endif
|
||
|
%{_libdir}/ocaml/fileutils/*.ml
|
||
|
%{_libdir}/ocaml/fileutils/*.mli
|
||
|
|
||
|
%changelog
|