File google-drive-ocamlfuse.spec of Package google-drive-ocamlfuse
#
# spec file for package google-drive-ocamlfuse
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2016-2017 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.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define build_flavor @BUILD_FLAVOR@%nil
%if "%build_flavor" == "testsuite"
%define nsuffix -testsuite
%else
%define nsuffix %nil
%endif
%define pkg google-drive-ocamlfuse
Name: %pkg%nsuffix
Version: 0.7.32
Release: 0
%{?ocaml_preserve_bytecode}
Summary: FUSE filesystem for Google Drive
License: MIT
ExclusiveArch: aarch64 ppc64 ppc64le riscv64 s390x x86_64
Group: System/Filesystems
URL: https://opam.ocaml.org/packages/google-drive-ocamlfuse
Source0: %pkg-%version.tar.xz
BuildRequires: ocaml(ocaml_base_version) >= 4.08
BuildRequires: ocaml-dune
BuildRequires: ocaml-rpm-macros >= 20231101
%if 1
BuildRequires: ocamlfind(camlidl)
BuildRequires: ocamlfind(cryptokit)
BuildRequires: ocamlfind(extlib)
BuildRequires: ocamlfind(gapi-ocaml)
BuildRequires: ocamlfind(ocamlfuse)
BuildRequires: ocamlfind(sqlite3)
BuildRequires: ocamlfind(threads)
BuildRequires: ocamlfind(tiny_httpd)
%endif
%if "%build_flavor" == "testsuite"
BuildRequires: ocamlfind(google-drive-ocamlfuse)
BuildRequires: ocamlfind(ounit2)
%endif
%description
google-drive-ocamlfuse is a FUSE-based file system backed by Google Drive,
written in OCaml. It lets you mount your Google Drive on Linux.
On the first time, just run google-drive-ocamlfuse, which will open a
browser for authentication. If that process succeeds, it will print
"Access token retrieved correctly.". Now run google-drive-ocamlfuse
with an empty directory supplied, which is the mount point for your Google
Drive. You can optionally unmount with fusermount -u mount-point.
Further documentation is available here:
https://github.com/astrada/google-drive-ocamlfuse/wiki
%prep
%autosetup -p1 -n %pkg-%version
%build
dune_release_pkgs='google-drive-ocamlfuse'
%ocaml_dune_setup
%if "%build_flavor" == ""
%ocaml_dune_build
%endif
%install
%if "%build_flavor" == ""
%ocaml_dune_install
%ocaml_create_file_list
tee -a %name.files < %name.files.devel
%endif
%if "%build_flavor" == "testsuite"
%check
%ocaml_dune_test
%endif
%if "%build_flavor" == ""
%files -f %name.files
%doc README.md doc/
%_bindir/*
%endif
%changelog