Blame ocaml-parsexp.spec

6e59a6b
%ifnarch %{ocaml_native_compiler}
6e59a6b
%global debug_package %{nil}
6e59a6b
%endif
6e59a6b
6e59a6b
%global srcname parsexp
6e59a6b
6e59a6b
Name:           ocaml-%{srcname}
6e59a6b
Version:        0.13.0
245f62c
Release:        6%{?dist}
6e59a6b
Summary:        S-expression parsing library
6e59a6b
6e59a6b
License:        MIT
6e59a6b
URL:            https://github.com/janestreet/parsexp
6e59a6b
Source0:        %{url}/archive/v%{version}/%{srcname}-%{version}.tar.gz
6e59a6b
6e59a6b
BuildRequires:  ocaml >= 4.04.2
6e59a6b
BuildRequires:  ocaml-base-devel >= 0.13
6e59a6b
BuildRequires:  ocaml-dune >= 1.5.1
6e59a6b
BuildRequires:  ocaml-findlib
6e59a6b
BuildRequires:  ocaml-sexplib0-devel >= 0.13
6e59a6b
6e59a6b
%description
6e59a6b
This library provides generic parsers for parsing S-expressions from
6e59a6b
strings or other media.
6e59a6b
6e59a6b
The library is focused on performance but still provides full generic
6e59a6b
parsers that can be used effortlessly with strings, bigstrings, lexing
6e59a6b
buffers, character streams or any other source.
6e59a6b
6e59a6b
It provides three different classes of parsers:
6e59a6b
- the normal parsers, producing [Sexp.t] or [Sexp.t list] values;
6e59a6b
- the parsers with positions, building compact position sequences so
6e59a6b
  that one can recover original positions in order to properly report
6e59a6b
  error locations at little cost; and
6e59a6b
- the Concrete Syntax Tree parsers, producing values of type
6e59a6b
  [Parsexp.Cst.t] which record the concrete layout of the s-expression
6e59a6b
  syntax, including comments.
6e59a6b
6e59a6b
This library is portable and doesn't provide I/O functions.  To read
6e59a6b
s-expressions from files or other external sources, you should use
6e59a6b
parsexp_io.
6e59a6b
6e59a6b
%package        devel
6e59a6b
Summary:        Development files for %{name}
6e59a6b
Requires:       %{name}%{?_isa} = %{version}-%{release}
7e41034
Requires:       ocaml-base-devel%{?_isa}
6e59a6b
6e59a6b
%description    devel
6e59a6b
The %{name}-devel package contains libraries and signature files for
6e59a6b
developing applications that use %{name}.
6e59a6b
6e59a6b
%prep
6e59a6b
%autosetup -n %{srcname}-%{version}
6e59a6b
6e59a6b
%build
7e41034
dune build %{?_smp_mflags}
6e59a6b
6e59a6b
%install
6e59a6b
dune install --destdir=%{buildroot}
6e59a6b
6e59a6b
# We install the documentation with the doc macro
6e59a6b
rm -fr %{buildroot}%{_prefix}/doc
6e59a6b
6e59a6b
%ifarch %{ocaml_native_compiler}
6e59a6b
# Add missing executable bits
6e59a6b
find %{buildroot}%{_libdir}/ocaml -name \*.cmxs -exec chmod 0755 {} \+
6e59a6b
%endif
6e59a6b
6e59a6b
%check
6e59a6b
dune runtest
6e59a6b
6e59a6b
%files
6e59a6b
%doc CHANGES.md README.org
6e59a6b
%license LICENSE.md
6e59a6b
%dir %{_libdir}/ocaml/%{srcname}/
6e59a6b
%{_libdir}/ocaml/%{srcname}/META
6e59a6b
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cma
6e59a6b
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmi
6e59a6b
%ifarch %{ocaml_native_compiler}
6e59a6b
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmxs
6e59a6b
%endif
6e59a6b
6e59a6b
%files devel
6e59a6b
%{_libdir}/ocaml/%{srcname}/dune-package
6e59a6b
%{_libdir}/ocaml/%{srcname}/opam
6e59a6b
%ifarch %{ocaml_native_compiler}
6e59a6b
%{_libdir}/ocaml/%{srcname}/%{srcname}*.a
6e59a6b
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmx
6e59a6b
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmxa
6e59a6b
%endif
6e59a6b
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmt
6e59a6b
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmti
6e59a6b
%{_libdir}/ocaml/%{srcname}/*.ml
6e59a6b
%{_libdir}/ocaml/%{srcname}/*.mli
6e59a6b
6e59a6b
%changelog
245f62c
* Fri Apr 03 2020 Richard W.M. Jones <rjones@redhat.com> - 0.13.0-6
245f62c
- Update all OCaml dependencies for RPM 4.16.
245f62c
e41682f
* Wed Feb 26 2020 Richard W.M. Jones <rjones@redhat.com> - 0.13.0-5
e41682f
- OCaml 4.10.0 final.
e41682f
b7fd586
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.0-4
b7fd586
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
b7fd586
87798c4
* Sun Jan 19 2020 Richard W.M. Jones <rjones@redhat.com> - 0.13.0-3
87798c4
- OCaml 4.10.0+beta1 rebuild.
87798c4
7e41034
* Thu Jan 16 2020 Jerry James <loganjerry@gmail.com> - 0.13.0-2
7e41034
- Change -devel subpackage Requires to ocaml-base-devel
7e41034
- Build in parallel
7e41034
6e59a6b
* Fri Jan 10 2020 Jerry James <loganjerry@gmail.com> - 0.13.0-1
6e59a6b
- Initial RPM