File syncthing-gtk.spec of Package syncthing-gtk
#
# spec file for package syncthing-gtk
#
# Copyright (c) 2015 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/
#
%global __requires_exclude typelib\\(Caja\\)|typelib\\(Nautilus\\)|typelib\\(Nemo\\)
%define _name syncthing_gtk
Name: syncthing-gtk
Version: 0.7.5.1
Release: 0
Summary: Syncthing Gtk-based graphical interface
License: GPL-2.0+
Group: Productivity/Networking/File-Sharing
Url: https://github.com/syncthing/syncthing-gtk
Source: https://github.com/syncthing/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: fdupes
BuildRequires: hicolor-icon-theme
BuildRequires: python-devel
BuildRequires: python-setuptools
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(gobject-introspection-1.0)
Requires: psmisc
Requires: python-dateutil
Requires: python-gobject
Requires: python-gobject-cairo
Requires: syncthing >= 0.11
Recommends: libnotify
Recommends: librsvg
Recommends: python-pyinotify
Suggests: python-caja
Suggests: python-nautilus
Suggests: python-nemo
BuildArch: noarch
%description
Graphical user interface with notification area icon for Syncthing
based on GTK+ and Python.
Supported Syncthing features:
* Everything what WebUI can display.
* Adding / editing / deleting nodes.
* Adding / editing / deleting repositories.
* Restart / shutdown server.
* Editing daemon settings.
Additional features:
* First run wizard for initial configuration.
* Running Syncthing daemon in background.
* Half-automatic setup for new nodes and repositories.
* Filesystem watching and instant synchronization using inotify.
* Caja, Nautilus, and Nemo file managers integration.
* Desktop notifications.
%prep
%setup -q
sed -i 's/^\(Exec=\).*$/\1%{name}/' %{name}.desktop
%build
python2 setup.py build_py --nostdownloader
%install
python2 setup.py install --root=%{buildroot}
# Add execution bit to scripts with shebangs and remove from others.
find %{buildroot} -type f -name "*.py" | while read py; do
if [[ "$(head -c2 "$py"; echo)" == "#!" ]]; then
chmod a+x "$py"
else
chmod a-x "$py"
fi
done
%suse_update_desktop_file -r %{name} Network FileTransfer
%fdupes %{buildroot}%{_datadir}
%post
%desktop_database_post
%icon_theme_cache_post
%postun
%desktop_database_postun
%icon_theme_cache_postun
%files
%defattr(-,root,root)
%doc LICENSE README.md
%{_bindir}/%{name}
%{_datadir}/%{name}/
%{python_sitelib}/%{_name}*.egg-info
%{python_sitelib}/%{_name}/
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}*.png
%{_datadir}/icons/hicolor/*/apps/si-*.png
%{_datadir}/icons/hicolor/*/emblems/emblem-*.png
%{_datadir}/pixmaps/*.png
%changelog