# vim: ft=spec:autoindent:ts=2:sts=2:sw=2:noexpandtab # # spec file for package gapi-ocaml # # Copyright (c) 2016 Sérgio Basto. # Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2015 LISA GmbH, Bingen, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # NOTE: This RPM will generate 'W: unstripped-binary-or-object' warnings from # rpmlint. You can't strip OCaml binaries, so these need to be ignored. %define ghname gapi-ocaml %define debug_package %{nil} %global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) Name: ocaml-gapi Version: 0.4.1 Release: 0.3.a1%{?dist} Summary: A simple OCaml client for Google Services License: MIT Url: https://github.com/astrada/gapi-ocaml Source0: https://github.com/astrada/gapi-ocaml/archive/v%{version}/%{ghname}-%{version}.tar.gz BuildRequires: ocaml >= 4.02.3 BuildRequires: ocaml-biniou-devel BuildRequires: ocaml-cryptokit-devel >= 1.3.14 BuildRequires: ocaml-curl-devel >= 0.5.3 BuildRequires: ocaml-dune BuildRequires: ocaml-easy-format-devel BuildRequires: ocaml-findlib-devel >= 1.2.7 BuildRequires: ocaml-ocamlnet-devel >= 4.1.4 BuildRequires: ocaml-ounit-devel >= 1.1.0 BuildRequires: ocaml-yojson-devel >= 1.0.2 BuildRequires: ocaml-zarith-devel %if 0%{?fedora} >= 32 BuildRequires: ocaml-odoc %define _dune_targets @install @doc %else %define _dune_targets @install %endif Requires: ocaml >= 4.02.3 Requires: ocaml-biniou Requires: ocaml-cryptokit >= 1.3.14 Requires: ocaml-curl >= 0.5.3 Requires: ocaml-easy-format Requires: ocaml-ocamlnet >= 4.1.4 Requires: ocaml-yojson >= 1.0.2 Requires: ocaml-zarith # A few things in the description trigger 'W: spelling-error' from rpmlint but # they're correct (or shouldn't be checked, like names/usernames) so should be # ignored. %description ocaml-gapi is a simple, unofficial, OCaml client for Google Services. The library supports ClientLogin, OAuth 1.0a, and OAuth 2.0 authentication. Supported RESTful APIs: * Calendar APIs v3 * Google+ API v1 * Tasks API v1 * APIs Discovery Service v1 * URL Shortener API v1 * OAuth2 API v2 * Custom Search API v1 * Google Analytics API v3 * Page Speed Online API v1 * Blogger API v2 * Site Verification API v1 * AdSense Management API v1.4 * BigQuery API v2 * Drive API v2 * Drive API v3 * Gmail API v1 %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep %autosetup -n %{ghname}-%{version} %build dune build --for-release-of-packages=%{ghname} %{_dune_targets} %install %{__install} -p -d -m 0755 %{buildroot}%{_libdir}/ocaml %{__install} -p -d -m 0755 %{buildroot}%{_docdir} # This will install to _libdir/ocaml/gapi-ocaml instead of the preferred standard # location _libdir/ocaml/ocaml-gapi, but OCaml libraries are written to look for # gapi-ocaml. dune install --destdir=%{buildroot} --prefix=%{_prefix} --libdir=%{_libdir}/ocaml --mandir=%{_mandir} mv %{buildroot}%{_prefix}/doc/%{ghname} %{buildroot}%{_docdir}/%{name} rm %{buildroot}%{_docdir}/%{name}/LICENSE %if 0%{?fedora} >= 32 cp -R %{_builddir}/%{buildsubdir}/_build/default/_doc/_html %{buildroot}%{_docdir}/%{name}/html %endif find %{buildroot} -type f -empty -delete find %{buildroot} -type d -empty -delete %files %defattr(-,root,root) %license LICENSE %doc README.md %{_libdir}/ocaml/%{ghname}/*.cma %{_libdir}/ocaml/%{ghname}/*.cmi %{_libdir}/ocaml/%{ghname}/*.cmxs %{_libdir}/ocaml/%{ghname}/META %if 0%{?fedora} >= 32 %exclude %{_docdir}/%{name}/html %endif %exclude %{_libdir}/ocaml/%{ghname}/*.ml %exclude %{_libdir}/ocaml/%{ghname}/dune-package %exclude %{_libdir}/ocaml/%{ghname}/opam %files devel %defattr(-,root,root) %if 0%{?fedora} >= 32 %doc %{_docdir}/%{name}/html/ %endif %{_libdir}/ocaml/%{ghname}/*.a %{_libdir}/ocaml/%{ghname}/*.cmt %{_libdir}/ocaml/%{ghname}/*.cmti %{_libdir}/ocaml/%{ghname}/*.cmx %{_libdir}/ocaml/%{ghname}/*.cmxa %{_libdir}/ocaml/%{ghname}/*.mli %exclude %{_libdir}/ocaml/%{ghname}/*.ml %exclude %{_libdir}/ocaml/%{ghname}/dune-package %exclude %{_libdir}/ocaml/%{ghname}/opam %changelog * Sat Jun 27 2020 Joel Goguen - 0.4.1-0.1.a1 - Update gapi-ocaml to 0.4.1 pre-release - Update package files to be in line with Fedora standards * Sat Sep 07 2019 Joel Goguen - 0.3.15-1 - Update gapi-ocaml to 0.3.15 - Update package naming to conform to ocaml package naming - Removed hardcoded dependencies for SuSE < 12.1 * Wed Jan 24 2018 Sérgio Basto - 0.3.6-1 - Update gapi-ocaml to 0.3.6 * Tue Jul 11 2017 Sérgio Basto - 0.3.4-1 - Update to 0.3.4 * Tue Dec 06 2016 Sérgio Basto - 0.3.1-1 - Update to 0.3.1 * Fri Apr 22 2016 Sérgio Basto - 0.2.10-1 - Update to 0.2.10 * Wed Mar 09 2016 Sérgio Basto - 0.2.8-1 - Update to 0.2.8 - Migrate to Fedora. * Tue Nov 10 2015 ohering@suse.de - Add hardcoded Provides for pre 12.1 repos * Mon Nov 9 2015 hpj@urpla.net - explicitly require misc. ocaml-ocamlnet modules in order to fix build for older distributions (<= 11.4) * Mon Jan 5 2015 hpj@urpla.net - version 0.2.6: initial build