File owncloud-client.spec of Package owncloud-client

# spec file for package owncloud-client
# Copyright (c) 2024 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

# The minimum required version of qtkeychain
%define keychain_version 0.12.0
# old rpm without /usr/etc
%if 0%{?suse_version} && 0%{?suse_version} <= 1500
%global _distconfdir /etc

Name:           owncloud-client
Version:        5.2.1
Release:        0
Summary:        The ownCloud synchronization client
License:        GPL-2.0-only AND GPL-3.0-only
Group:          Productivity/Networking/Other
Source0:        ownCloud_os-%{version}.tar.xz
Source2:        69-sync-inotify.conf
Source3:        README.source
Source4:        ownCloud.conf

BuildRequires:  cmake >= 2.8.11
BuildRequires:  extra-cmake-modules

BuildRequires:  hicolor-icon-theme
BuildRequires:  pkgconfig
BuildRequires:  qt6-core-private-devel
BuildRequires:  qt6-gui-private-devel
BuildRequires:  qt6-widgets-private-devel
BuildRequires:  update-desktop-files
BuildRequires:  cmake(KDSingleApplication-qt6)
BuildRequires:  cmake(LibreGraphAPI)
BuildRequires:  cmake(Qt6Concurrent)
BuildRequires:  cmake(Qt6Core)
BuildRequires:  cmake(Qt6DBus)
BuildRequires:  cmake(Qt6Gui)
BuildRequires:  cmake(Qt6Keychain) >= %{keychain_version}
BuildRequires:  cmake(Qt6LinguistTools)
BuildRequires:  cmake(Qt6Network)
BuildRequires:  cmake(Qt6Sql)
BuildRequires:  cmake(Qt6Test)
BuildRequires:  cmake(Qt6Xml)
BuildRequires:  pkgconfig(openssl)
BuildRequires:  pkgconfig(sqlite3)
BuildRequires:  pkgconfig(zlib)
Requires:       libowncloudsync0 = %{version}
Requires:       owncloud-icons = %{version}
Requires:       qt6-sql-sqlite
Suggests:       %{name}-nautilus
Suggests:       %{name}-nemo
Suggests:       owncloud-dolphin
Supplements:    (%{name} and nautilus)
Obsoletes:      libocsync-devel
Obsoletes:      libocsync-devel-doc
Obsoletes:      libocsync-doc
Obsoletes:      libocsync-plugin-owncloud
Obsoletes:      libocsync0
Obsoletes:      owncloud-client-l10n

The ownCloud sync client -

ownCloud client enables you to connect to your private
ownCloud Server. With it you can create folders in your home
directory, and keep the contents of those folders synced with your
ownCloud server. Simply copy a file into the directory and the
ownCloud Client does the rest.

ownCloud gives you anytime and anywhere access to the files you
need, whether through this desktop application, our mobile apps,
the web interface, or other WebDAV clients. With it, you can
easily view and share documents and information in a secure,
flexible and controlled architecture. You can extend ownCloud
with plug-ins from the community, or that you build yourself.

%package -n %{name}-doc
Summary:        Documentation for ownCloud
Group:          Development/Libraries/C and C++
Requires:       %{name}%{?_isa} = %{version}-%{release}

%description -n %{name}-doc
Documentation for the ownCloud desktop application.

%package -n libowncloudsync0
Summary:        The ownCloud synchronization library
Group:          Development/Libraries/C and C++
Requires:       libqt6keychain1 >= %{keychain_version}

%description -n libowncloudsync0
The ownCloud synchronization library. It implements the ownCloud
sync algorithm that keeps a local directory in sync with the
content on your cloud.

%package -n libowncloudsync-devel
Summary:        Development files for the ownCloud synchronization library
Group:          Development/Libraries/C and C++
Requires:       libowncloudsync0 = %{version}

%description -n libowncloudsync-devel
Development files for the ownCloud synchronization library. It
implements the ownCloud sync algorithm that keeps a local directory
in sync with the content on your cloud.

%package -n owncloud-icons
Summary:        Icons for the ownCloud client shell integrations
Group:          Productivity/Networking/Other
BuildArch:      noarch

%description -n owncloud-icons
Icons for the visual representation of the sync state in various file
managers on the desktop.

%autosetup -p1 -n ownCloud_os-%{version}



# Copy the source README here to be picked up by doc macro
cp %{SOURCE3} .

install -m 0644 -D %{SOURCE2} %{buildroot}/%{_sysctldir}/69-sync-inotify.conf
# do not allow to call home
install -m 0644 -D %{SOURCE4} -t %{buildroot}%{_distconfdir}/ownCloud/

%suse_update_desktop_file -n owncloud
# workaround for
for desktop_icon_dir in %{buildroot}%{_datadir}/icons/hicolor/*/apps; do
  # copy shortname to executable name, if missing.
  if [ -f $desktop_icon_dir/owncloud.png -a ! -f $desktop_icon_dir/owncloud.png ]; then
    cp $desktop_icon_dir/owncloud.png $desktop_icon_dir/owncloud.png

%ldconfig_scriptlets -n libowncloudsync0


%license COPYING COPYING.documentation

%config %{_distconfdir}/ownCloud

%files -n owncloud-icons
%if 0%{?suse_version} < 1550
%dir %{_datadir}/icons/hicolor/1024x1024
%dir %{_datadir}/icons/hicolor/1024x1024/apps

%files -n libowncloudsync0

%files -n libowncloudsync-devel
%dir %{_libdir}/cmake/ownCloud

openSUSE Build Service is sponsored by