File nitroshare.spec of Package nitroshare

#
# spec file for package nitroshare
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, 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 http://bugs.opensuse.org/
#


%define _version 0.3
Name:           nitroshare
Version:        0.3.3
Release:        0
Summary:        Network file transfer application
License:        MIT
Group:          Productivity/Networking/File-Sharing
Url:            https://nitroshare.net/
Source:         https://launchpad.net/%{name}/%{_version}/%{version}/+download/%{name}-%{version}.tar.gz
Source1:        https://launchpad.net/%{name}/%{_version}/%{version}/+download/%{name}-%{version}.tar.gz.asc
Source2:        %{name}.keyring
# PATCH-FIX-UPSTREAM nitroshare-fix-caja.patch sor.alexei@meowr.ru -- Use a correct Caja GI API version.
Patch0:         %{name}-fix-caja.patch
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  gobject-introspection-devel
BuildRequires:  hicolor-icon-theme
BuildRequires:  libqt5-linguist-devel
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(Qt5Gui) >= 5.1
BuildRequires:  pkgconfig(Qt5Network) >= 5.1
BuildRequires:  pkgconfig(Qt5Svg) >= 5.1
BuildRequires:  pkgconfig(Qt5Widgets) >= 5.1

%description
A cross-platform network file transfer application designed to make
transferring any file to any device as painless as possible.

Features:
 * Automatic discovery of devices on the local network.
 * Simple and intuitive user interface.
 * Transfer entire directories.

%package -n caja-extension-%{name}
Summary:        NitroShare integrated into Caja
Group:          Productivity/File utilities
Requires:       %{name} = %{version}
Requires:       caja
Requires:       python-caja
Supplements:    packageand(caja:%{name})

%description -n caja-extension-%{name}
A cross-platform network file transfer application designed to make
transferring any file to any device as painless as possible.

This package integrates NitroShare seamlessly into Caja.

%package -n nautilus-extension-%{name}
Summary:        NitroShare integrated into Nautilus
Group:          Productivity/File utilities
Requires:       %{name} = %{version}
Requires:       nautilus
Requires:       python-nautilus
Supplements:    packageand(nautilus:%{name})

%description -n nautilus-extension-%{name}
A cross-platform network file transfer application designed to make
transferring any file to any device as painless as possible.

This package integrates NitroShare seamlessly into Nautilus.

%if 0%{?suse_version} > 1320 || (0%{?sle_version} >= 120200 && 0%{?is_opensuse})
%package -n nemo-extension-%{name}
Summary:        NitroShare integrated into Nemo
Group:          Productivity/File utilities
Requires:       %{name} = %{version}
Requires:       nemo
Requires:       python-nemo
Supplements:    packageand(nemo:%{name})

%description -n nemo-extension-%{name}
A cross-platform network file transfer application designed to make
transferring any file to any device as painless as possible.

This package integrates NitroShare seamlessly into Nemo.
%endif

%prep
%setup -q
%patch0 -p1

%build
%cmake
make %{?_smp_mflags} V=1

%install
%cmake_install
%suse_update_desktop_file -r %{name} Network FileTransfer

%if 0%{?suse_version} <= 1320 && !(0%{?sle_version} >= 120200 && 0%{?is_opensuse})
rm -rf %{buildroot}%{_datadir}/nemo-python/
%endif

%post
%desktop_database_post
%icon_theme_cache_post

%postun
%desktop_database_postun
%icon_theme_cache_postun

%files
%defattr(-,root,root)
%doc LICENSE.txt README.md
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/*
%{_mandir}/man?/%{name}.?%{?ext_man}

%files -n caja-extension-%{name}
%defattr(-,root,root)
%doc LICENSE.txt
%{_datadir}/caja-python/

%files -n nautilus-extension-%{name}
%defattr(-,root,root)
%doc LICENSE.txt
%{_datadir}/nautilus-python/

%if 0%{?suse_version} > 1320 || (0%{?sle_version} >= 120200 && 0%{?is_opensuse})
%files -n nemo-extension-%{name}
%defattr(-,root,root)
%doc LICENSE.txt
%{_datadir}/nemo-python/
%endif

%changelog