%undefine _package_note_flags %ifnarch %{ocaml_native_compiler} %global debug_package %{nil} %endif %global _srcname gapi-ocaml %global srcname gapi %global gitrev 21d504664a1f80d91872a1d0db0d444d285bea39 Name: ocaml-%{srcname} Version: 0.4.3.git20220531 Release: 1%{?dist} Summary: A simple OCaml client for Google Services License: MIT URL: https://github.com/astrada/%{_srcname} Source: %{url}/archive/%{gitrev}.tar.gz # ${url}/archive/refs/tags/v${version}.tar.gz BuildRequires: ocaml >= 4.02.3 BuildRequires: ocaml-dune-devel BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-odoc BuildRequires: ocaml-cryptokit-devel BuildRequires: ocaml-curl-devel BuildRequires: ocaml-ocamlnet-devel >= 4.1.4 BuildRequires: ocaml-ounit-devel BuildRequires: ocaml-yojson-devel BuildRequires: ocaml-zarith-devel %description gapi-ocaml is a simple, unofficial, OCaml client for Google Services. The library supports ClientLogin, OAuth 1.0a, and OAuth 2.0 authentication. %package devel Summary: Development files for %{name} Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep %autosetup -n %{_srcname}-%{gitrev} %build dune build %{?_smp_mflags} --verbose --profile release dune build @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 %check dune runtest --profile release %files %doc README.md %license LICENSE %dir %{_libdir}/ocaml/gapi-ocaml/ %{_libdir}/ocaml/gapi-ocaml/META %{_libdir}/ocaml/gapi-ocaml/*.cma %{_libdir}/ocaml/gapi-ocaml/*.cmi %ifarch %{ocaml_native_compiler} %{_libdir}/ocaml/gapi-ocaml/*.cmxs %endif %files devel %doc _build/default/_doc/* %{_libdir}/ocaml/gapi-ocaml/dune-package %{_libdir}/ocaml/gapi-ocaml/opam %ifarch %{ocaml_native_compiler} %{_libdir}/ocaml/gapi-ocaml/*.a %{_libdir}/ocaml/gapi-ocaml/*.cmx %{_libdir}/ocaml/gapi-ocaml/*.cmxa %endif %{_libdir}/ocaml/gapi-ocaml/*.cmt %{_libdir}/ocaml/gapi-ocaml/*.cmti %{_libdir}/ocaml/gapi-ocaml/*.mli %changelog * Wed Jul 27 2022 Jashank Jeremy - 0.4.3.git20220531-1 - Update to upstream git20220531 (and Fedora 37 mass rebuild). * Fri Jun 24 2022 Jashank Jeremy - 0.4.3.git20220427-2 - Bump to rebuild with OCaml 4.14.0. * Fri May 06 2022 Jashank Jeremy - 0.4.3.git20220427-1 - Initial RPM release.