File parcellite.spec of Package parcellite
#
# spec file for package parcellite (Version 0.9.1)
#
# Copyright (c) 2009 SUSE LINUX Products 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/
#
# norootforbuild
Name: parcellite
Version: 0.9.1
Release: 1
Summary: A lightweight GTK+ clipboard manager
Group: User Interface/Desktops
License: GPLv3+
Url: http://parcellite.sourceforge.net/
Source0: http://downloads.sourceforge.net/parcellite/parcellite-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Patch0: parcellite-0.9.1-gcc.diff
Patch1: parcellite-0.9.1-german.diff
Patch2: parcellite-0.9.1-defaults.diff
BuildRequires: gtk2-devel >= 2.10.0
BuildRequires: desktop-file-utils intltool >= 0.23
BuildRequires: gnome-icon-theme
%description
Parcellite is a stripped down, basic-features-only clipboard manager with a
small memory footprint for those who like simplicity.
In GNOME and Xfce the clipboard manager will be started automatically. For
other desktops or window managers you should also install a panel with a
system tray or notification area if you want to use this package.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
%configure
make %{?_smp_mflags} %{?jobs:-j%jobs}
sed -i -e '/^Icon/s/=.*/=parcellite/' data/parcellite.desktop
echo X-SuSE-translate=true >> data/parcellite.desktop
%install
make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
%if 0%suse_version > 1110
%define iconname edit-paste
%else
%define iconname gtk-paste
%endif
install -m 644 \
/usr/share/icons/gnome/32x32/actions/%{iconname}.png \
$RPM_BUILD_ROOT%{_datadir}/pixmaps/%{name}.png
%find_lang %{name}
desktop-file-install \
--delete-original \
--add-category=Settings \
--add-category=Utility \
--remove-category=Application \
--dir=${RPM_BUILD_ROOT}%{_datadir}/applications \
${RPM_BUILD_ROOT}%{_datadir}/applications/%{name}.desktop
desktop-file-install \
--delete-original \
--add-category=TrayIcon \
--dir=${RPM_BUILD_ROOT}%{_sysconfdir}/xdg/autostart/ \
${RPM_BUILD_ROOT}%{_sysconfdir}/xdg/autostart/%{name}-startup.desktop
%clean
rm -rf $RPM_BUILD_ROOT
%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING README NEWS
%config(noreplace) %{_sysconfdir}/xdg/autostart/%{name}-startup.desktop
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%{_mandir}/man1/*
%changelog