File smb4k.spec of Package smb4k-qt5

Name:           smb4k
Version:        3.2.5
Release:        0.obs.1
Summary:        Advanced network neighborhood browser for Samba
License:        GPLv2+
URL:            https://smb4k.sourceforge.io
Group:          Productivity/Networking/Samba
Source0:        smb4k-3.2.5.tar.xz
Source1:        smb4k-rpmlintrc

%if 0%{!?_kf5_sharedir:1}
%define _kf5_sharedir %{_prefix}/share
%endif
%if 0%{!?_kf5_applicationsdir:1}
%define _kf5_applicationsdir %{_kf5_sharedir}/applications
%endif
%if 0%{!?_kf5_iconsdir:1}
%define _kf5_iconsdir %{_kf5_sharedir}/icons
%endif
%if 0%{!?_kf5_notifydir:1}
%define _kf5_notifydir	%{_kf5_sharedir}/knotifications5
%endif
%if 0%{!?_kf5_kxmlguidir:1}
%define _kf5_kxmlguidir %{_kf5_sharedir}/kxmlgui5
%endif
%if 0%{!?_kf5_configkcfgdir:1}
%define _kf5_configkcfgdir %{_kf5_sharedir}/config.kcfg
%endif
%if 0%{!?_kf5_htmldir:1}
%define _kf5_htmldir %{_kf5_sharedir}/doc/HTML
%endif
%if 0%{!?_kf5_servicesdir:1}
%define _kf5_servicesdir %{_kf5_sharedir}/kservices5
%endif
%if 0%{!?%_kf5_appstreamdir:1}
%define _kf5_appstreamdir %{_kf5_sharedir}/metainfo
%endif

BuildRequires:  cmake
BuildRequires:  pkg-config
BuildRequires:  extra-cmake-modules
BuildRequires:  gettext-runtime
%if 0%{?sle_version}
BuildRequires:  update-desktop-files
%endif
BuildRequires:  pkg-config
BuildRequires:  fdupes
BuildRequires:  cmake(Qt5Core) >= 5.14.0
BuildRequires:  cmake(Qt5Gui) >= 5.14.0
BuildRequires:  cmake(Qt5Widgets) >= 5.14.0
BuildRequires:  cmake(Qt5Test) >= 5.14.0
BuildRequires:  cmake(Qt5Network) > 5.14.0
BuildRequires:  cmake(Qt5PrintSupport) >= 5.14.0
BuildRequires:  cmake(Qt5Qml) >= 5.14.0
BuildRequires:  cmake(KF5Auth) >= 5.78.0
BuildRequires:  cmake(KF5Completion) >= 5.78.0
BuildRequires:  cmake(KF5Config) >= 5.78.0
BuildRequires:  cmake(KF5ConfigWidgets) >= 5.78.0
BuildRequires:  cmake(KF5CoreAddons) >= 5.78.0
BuildRequires:  cmake(KF5Crash) >= 5.78.0
BuildRequires:  cmake(KF5DBusAddons) >= 5.78.0
BuildRequires:  cmake(KF5DNSSD) >= 5.78.0
BuildRequires:  cmake(KF5DocTools) >= 5.78.0
BuildRequires:  cmake(KF5I18n) >= 5.78.0
BuildRequires:  cmake(KF5IconThemes) >= 5.78.0
BuildRequires:  cmake(KF5JobWidgets) >= 5.78.0
BuildRequires:  cmake(KF5KIO) >= 5.78.0
BuildRequires:  cmake(KF5Notifications) >= 5.78.0
BuildRequires:  cmake(KF5Package) >= 5.78.0
BuildRequires:  cmake(KF5Plasma) >= 5.78.0
BuildRequires:  cmake(KF5Solid) >= 5.78.0
BuildRequires:  cmake(KF5Wallet) >= 5.78.0
BuildRequires:  cmake(KF5WidgetsAddons) >= 5.78.0
BuildRequires:  cmake(KF5WindowSystem) >= 5.78.0
BuildRequires:  cmake(KF5XmlGui) >= 5.78.0
BuildRequires:  cmake(KDSoap) >= 1.9.0
BuildRequires:  cmake(KDSoapWSDiscoveryClient) >= 0.2
BuildRequires:  pkgconfig(smbclient)
%if 0%{?fedora}
BuildRequires:  generic-logos
%endif
Requires:       cifs-utils
Recommends:     rsync
Provides:       %{name}-doc = %{version}
Provides:       %{name}-lang = %{version}

%description
Smb4K is an advanced network neighborhood browser and Samba share mounting
utility. It is based on the KDE Frameworks 5, Samba's client library
(libsmbclient) and, optionally, the KDSoap WS-Discovery client. It scans 
your network neighborhood for all available workgroups, servers and shares 
and can mount all desired shares to your local file system. It is released 
under the terms of the GNU General Public License, version 2 (GPL v2+). 
Linux, FreeBSD and its derivatives (e. g. GhostBSD and TrueOS), NetBSD and 
DragonFly BSD are officially supported.

Features:
- Scanning for (active) workgroups, hosts, and shares
- Support of the CIFS (Linux®) and SMBFS (FreeBSD) file system
- Mounting and unmounting of shares
- Access to the files of a mounted share using a file manager or terminal
- Auto-detection of external mounts and unmounts
- Remounting of previously used shares on program start
- Miscellaneous infos about remote network items and mounted shares
- Network search
- Preview of the contents of a share
- Default login
- Special handling of homes shares
- Ability to bookmark favorite shares
- System tray widget
- Support of advanced mount options
- Support of printer shares
- KWallet support
- Synchronization of a remote share with a local copy and vice versa
- Ability to define custom options for individual servers and shares
- Hardware support through the Solid device integration framework, the KDBusAddons 
  convenience classes and the Qt Network module
- Wake-On-LAN capabilities
- Plasmoid for desktop integration
- Profiles for different network neighborhood setups

%prep
%setup -q

%build
%cmake -DSMB4K_INSTALL_PLASMOID=ON -DSMB4K_WITH_WS_DISCOVERY=ON
%cmake_build

%install
%cmake_install

%if 0%{?sle_version}
# Taken from openSUSE's spec file
%suse_update_desktop_file -r org.kde.smb4k Qt KDE System Network
%endif

%fdupes -s %{buildroot}

%files
%defattr(-,root,root)
%license LICENSES/*
%doc AUTHORS BUGS ChangeLog README.md AUTHORS.license BUGS.license ChangeLog.license README.license
%{_kf5_bindir}/smb4k
%if 0%{?sle_version}
%if 0%{?sle_version} > 150400 && 0%{?is_opensuse}
%{_kf5_prefix}/lib/kauth/mounthelper
%else
%{_kf5_libdir}/libexec/kauth/mounthelper
%endif
%else
%{_kf5_libexecdir}/kauth/mounthelper
%endif
%{_kf5_libdir}/libsmb4kcore.so
%{_kf5_libdir}/qt5/
%{_kf5_applicationsdir}/org.kde.smb4k.desktop
%{_kf5_configkcfgdir}/
%{_kf5_sharedir}/dbus-1/
%{_kf5_htmldir}/
%{_kf5_iconsdir}/
%{_kf5_sharedir}/kconf_update/
%{_kf5_sharedir}/locale/
# Taken from openSUSE's spec file
%dir %{_kf5_sharedir}/plasma/plasmoids
%{_kf5_sharedir}/plasma/plasmoids/org.kde.smb4kqml/
%{_kf5_notifydir}/smb4k.notifyrc
%{_kf5_servicesdir}/plasma-applet-org.kde.smb4kqml.desktop
%{_kf5_kxmlguidir}/smb4k/
%{_kf5_appstreamdir}/
%{_kf5_sharedir}/polkit-1/actions/org.kde.smb4k.mounthelper.policy

%changelog
openSUSE Build Service is sponsored by