ocaml-fieldslib/ocaml-fieldslib.spec
Fedora Release Engineering cf6ce4fc36 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 21:57:16 +00:00

118 lines
3.6 KiB
RPMSpec

%ifarch %{ocaml_native_compiler}
# The only source file for this package consists of a single "include" line.
# It exports some private functions from the library in ocaml-base. Although
# debuginfo is generated, it is tagged with the file names from ocaml-base,
# rather than the single 1-line source file in this project. That leads to
# this error:
#
# error: Empty %%files file /builddir/build/BUILD/fieldslib-0.13.0/debugsourcefiles.list
#
# Do not try to gather debug sources to workaround the problem.
%undefine _debugsource_packages
%else
%global debug_package %{nil}
%endif
%global srcname fieldslib
Name: ocaml-%{srcname}
Version: 0.14.0
Release: 4%{?dist}
Summary: OCaml record fields as first class values
License: MIT
URL: https://github.com/janestreet/%{srcname}
Source0: %{url}/archive/v%{version}/%{srcname}-%{version}.tar.gz
BuildRequires: ocaml >= 4.04.2
BuildRequires: (ocaml-base-devel >= 0.14 and ocaml-base-devel < 0.15)
BuildRequires: ocaml-dune >= 2.0.0
BuildRequires: ocaml-odoc
%description
This package contains an OCaml syntax extension to define first class
values representing record fields, to get and set record fields, iterate
and fold over all fields of a record and create new record values.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: ocaml-base-devel%{?_isa}
%description devel
The %{name}-devel package contains libraries and signature files for
developing applications that use %{name}.
%prep
%autosetup -n %{srcname}-%{version}
%build
dune build %{?_smp_mflags}
dune build %{?_smp_mflags} @doc
%install
dune install --destdir=%{buildroot}
# We do not want the dune markers
find _build/default/_doc/_html -name .dune-keep -delete
# We do not want the ml files
find %{buildroot}%{_libdir}/ocaml -name \*.ml -delete
# We install the documentation with the doc macro
rm -fr %{buildroot}%{_prefix}/doc
%ifarch %{ocaml_native_compiler}
# Add missing executable bits
find %{buildroot}%{_libdir}/ocaml -name \*.cmxs -exec chmod a+x {} \+
%endif
%files
%doc CHANGES.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
%doc _build/default/_doc/_html/*
%{_libdir}/ocaml/%{srcname}/dune-package
%{_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
%changelog
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.14.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Sep 01 2020 Richard W.M. Jones <rjones@redhat.com> - 0.14.0-3
- OCaml 4.11.1 rebuild
* Fri Aug 21 2020 Richard W.M. Jones <rjones@redhat.com> - 0.14.0-2
- OCaml 4.11.0 rebuild
* Wed Aug 5 2020 Jerry James <loganjerry@gmail.com> - 0.14.0-1
- Version 0.14.0
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.0-4
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri Jun 5 2020 Jerry James <loganjerry@gmail.com> - 0.13.0-2
- Drop CONTRIBUTING.md
- Use boolean dependencies to more fully reflect upstream version dependencies
* Thu May 7 2020 Jerry James <loganjerry@gmail.com> - 0.13.0-1
- Initial RPM