Initial import.

This commit is contained in:
Jerry James 2020-06-07 13:00:42 -06:00
parent 5e63b328b0
commit 5b4d58e524
3 changed files with 100 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/variantslib-*.tar.gz

98
ocaml-variantslib.spec Normal file
View File

@ -0,0 +1,98 @@
%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:
#
# Processing files: ocaml-variantslib-debugsource-0.13.0-1.fc32.x86_64
# error: Empty %%files file /builddir/build/BUILD/variantslib-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 variantslib
Name: ocaml-%{srcname}
Version: 0.13.0
Release: 2%{?dist}
Summary: OCaml variants 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.13 and ocaml-base-devel < 0.14)
BuildRequires: ocaml-dune >= 1.5.1
BuildRequires: ocaml-odoc
%description
This package contains an OCaml syntax extension to define first class
values representing variants.
%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 CONTRIBUTING.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
* 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

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (variantslib-0.13.0.tar.gz) = 061d9a876539afd189994a043a220ea2eaa6e957bc35b6e21e8ad4323380d1d5ced5c788e422347e438f3f43e5586670dd903c5f04cdce4db35afcd75649da34