File clipit.spec of Package clipit

# spec file for package clipit
# Copyright (c) 2019 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

Name:           clipit
Version:        1.4.2
Release:        0
Summary:        A lightweight GTK+ clipboard manager
License:        GPL-3.0-or-later
Group:          Productivity/Other
BuildRequires:  intltool >= 0.23
%if 0%{suse_version} >= 1550
BuildRequires:  rsvg-convert
BuildRequires:  rsvg-view
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(gtk+-2.0) 
Recommends:     xdotool
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

ClipIt is a lightweight, fully featured GTK+ clipboard manager.
It was forked from Parcellite, adding additional features and bugfixes to the project.

ClipIts main features are:
 – Save a history of your last copied items;
 – Search through the history;
 – Global hotkeys for most used functions;
 – Execute actions with clipboard items;
 – Exclude specific items from history.

%setup -q

make %{?_smp_mflags}
sed -i -e '/^Icon/s/=.*/=clipit-trayicon/' data/clipit.desktop
rsvg-convert -h 32 -w 32 data/clipit-trayicon.svg -o data/clipit-trayicon.png

make install DESTDIR=%{buildroot} INSTALL='install -p'
mkdir -p %{buildroot}%{_datadir}/pixmaps
install -m 644 \
	data/%{name}-trayicon.png \
%find_lang %{name}
%suse_update_desktop_file -r -G "Clipboard Manager" %{name} GTK GNOME Utility DesktopUtility
%suse_update_desktop_file -r -G "Clipboard Manager" %{name}-startup GTK GNOME Utility DesktopUtility TrayIcon

%files -f %{name}.lang
%config(noreplace) %{_sysconfdir}/xdg/autostart/%{name}-startup.desktop