Sophie

Sophie

distrib > Mageia > 9 > armv7hl > media > core-release-src > by-pkgid > 7f9395c9fb3677a6bef0bb5e302e3a75 > files > 2

ocaml-logs-0.7.0-2.mga9.src.rpm

%undefine _package_note_flags
%ifnarch %{ocaml_native_compiler}
%global debug_package %{nil}
%endif

%global srcname logs

Name:           ocaml-%{srcname}
Version:        0.7.0
Release:        %mkrel 2
Summary:        Logging infrastructure for OCaml
Group:          Development/OCaml

License:        ISC
URL:            https://erratique.ch/software/logs
Source0:        %{url}/releases/%{srcname}-%{version}.tbz

BuildRequires:  ocaml >= 4.03.0
BuildRequires:  ocaml-cmdliner-devel
BuildRequires:  ocaml-findlib
BuildRequires:  ocaml-fmt-devel
BuildRequires:  ocaml-lwt-devel
BuildRequires:  ocaml-mtime-devel
BuildRequires:  ocaml-ocamlbuild
BuildRequires:  ocaml-topkg-devel

%description
Logs provides a logging infrastructure for OCaml.  Logging is performed
on sources whose reporting level can be set independently.  The log
message report is decoupled from logging and is handled by a reporter.

A few optional log reporters are distributed with the base library and
the API lets you easily implement your own.

%package        devel
Summary:        Development files for %{name}
Requires:       %{name}%{?_isa} = %{version}-%{release}
Requires:       ocaml-cmdliner-devel%{?_isa}
Requires:       ocaml-fmt-devel%{?_isa}
Requires:       ocaml-lwt-devel%{?_isa}

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

%prep
%autosetup -n %{srcname}-%{version}

# test_lwt needs the thread flag
sed -i 's/package(lwt)/thread, &/' _tags

%build
ocaml pkg/pkg.ml build --with-js_of_ocaml false --with-fmt true \
  --with-cmdliner true --with-lwt true --with-base-threads true --tests true

%install
mkdir -p %{buildroot}%{_libdir}/ocaml/%{srcname}
cp -p _build/src/*.{a,cma,cmi,cmt,cmti,cmx,cmxa,cmxs,mli} _build/pkg/META \
   _build/opam %{buildroot}%{_libdir}/ocaml/%{srcname}

# The tests don't do us much good.  Several of them deliberately log errors,
# to test that that works, but the tests are written so that any logged errors
# at all makes the test suite exit with exit value 1.  It would be great if
# upstream would exit with 0 on a normal run...
#%%check
#ocaml pkg/pkg.ml test || :

%files
%doc CHANGES.md README.md
%license LICENSE.md
%dir %{_libdir}/ocaml/%{srcname}/
%{_libdir}/ocaml/%{srcname}/META
%{_libdir}/ocaml/%{srcname}/*.cma
%{_libdir}/ocaml/%{srcname}/*.cmi
%ifarch %{ocaml_native_compiler}
%{_libdir}/ocaml/%{srcname}/*.cmxs
%endif

%files         devel
%if %{with docs}
%doc _build/default/_doc/*
%endif
%{_libdir}/ocaml/%{srcname}/opam
%ifarch %{ocaml_native_compiler}
%{_libdir}/ocaml/%{srcname}/*.a
%{_libdir}/ocaml/%{srcname}/*.cmx
%{_libdir}/ocaml/%{srcname}/*.cmxa
%endif
%{_libdir}/ocaml/%{srcname}/*.cmt
%{_libdir}/ocaml/%{srcname}/*.cmti
%{_libdir}/ocaml/%{srcname}/*.mli



%changelog
* Mon Oct 10 2022 pterjan <pterjan> 0.7.0-2.mga9
+ Revision: 1896152
- Rebuild for new ocaml packages

* Fri May 20 2022 pterjan <pterjan> 0.7.0-1.mga9
+ Revision: 1859534
- imported package ocaml-logs