File kio-fuse.spec of Package kio-fuse

# spec file for package kio-fuse
# Copyright (c) 2021 SUSE LLC
# 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

%bcond_without lang
Name:           kio-fuse
Version:        5.0.1
Release:        0
Summary:        Access KIO over the regular filesystem
License:        GPL-3.0-or-later
Group:          System/GUI/KDE
%if %{with lang}
Source2:        kio-fuse.keyring
BuildRequires:  extra-cmake-modules
BuildRequires:  pkgconfig
BuildRequires:  cmake(KF5KIO) >= 5.66.0
BuildRequires:  cmake(Qt5DBus) >= 5.12.0
BuildRequires:  cmake(Qt5Test)
BuildRequires:  pkgconfig(fuse3)
Requires:       fuse3
# For %%check
BuildRequires:  kio-extras5
# While kio itself can make use of this, it's most likely used through dolphin
Supplements:    dolphin

kio-fuse is a daemon which makes KIO URLs accessible to KIO unaware
applications using FUSE.

%autosetup -p1

%cmake_kf5 -d build -- -DBUILD_TESTING=ON

%kf5_makeinstall -C build

%if 0%{?suse_version} > 1500
# The hack below only works with util-linux 3.34+.
# Without working umount, the tests can't work :-(

fusermount3 || ret=$?
if [ $ret -eq 126 ] ; then
  # No permission to run fusermount3: boo#1159963
  exit 0

# Hack to make "fusermount3 -u" work in the OBS context
# (
echo -e '#!/bin/sh\numount $2' >> fusermount3
chmod a+x fusermount3
export PATH=$PWD:$PATH

make %{?_smp_mflags} -C build VERBOSE=1 test

%license LICENSES/*

openSUSE Build Service is sponsored by