Name:           parcellite
Version:        1.1.9
Release:        1%{?_dist_release}
Summary:        A lightweight GTK+ clipboard manager
Summary(ja):    軽量な GTK+ クリップボードマネージャ

Group:          Applications/Accessories
License:        GPLv3+
URL:            http://%{name}.sourceforge.net/
Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
	
Patch1:         parcellite-0.9.2-dsofix.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-root

BuildRequires:  gtk2-devel >= 2.10.0, glib2-devel >= 2.14.0
BuildRequires:  desktop-file-utils, intltool >= 0.23
BuildRequires:  gettext

%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.

%description -l ja
Parcellite はシンプルさを好む人々のための使用メモリ量が小さい
洗練された基礎的機能のみのクリップボードマネージャです。

 GNOME と Xfce ではクリップボードマネージャは自動的に起動します。
 あなたがこのパッケージを使用したいのなら、他のデスクトップ或いは
 ウィンドウマネージャのために、システムトレイ或いは通知領域のある
 パネルをインストールしなければなりません。

%prep
%setup -q -n %{name}-%{version}
%patch1 -p1 -b .dsofix

%if %{?_dist_release} == "vl6"
sed -i 's/\(OnlyShowIn=GNOME\;KDE\;LXDE\;\)MATE\;Razor\;ROX\;TDE\;Unity\;XFCE\;Old\;/\1XFCE;/g' \
data/parcellite.desktop.in
%endif

%build
%configure
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
%find_lang %{name}

desktop-file-install --vendor="vine"                     \
  --delete-original                                        \
  --remove-category=Application                            \
  --dir=${RPM_BUILD_ROOT}%{_datadir}/applications          \
  ${RPM_BUILD_ROOT}%{_datadir}/applications/%{name}.desktop

desktop-file-install --vendor="vine"                           \
  --delete-original                                        \
  --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/vine-%{name}-startup.desktop
%{_bindir}/%{name}
%{_datadir}/applications/vine-%{name}.desktop
%{_datadir}/pixmaps/%{name}.*
%{_mandir}/man1/%{name}.1.gz


%changelog
* Wed Feb 11 2015 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.1.9-1
- new upstream release

* Sun Jul 20 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.1.8-1
- new upstream release

* Sat Apr 12 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.1.7-2
- rebuilt with newtoolchain

* Sat Nov 23 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.1.7-1
- new upstream release

* Sat Aug 10 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.1.6-1
- new upstream release
- set conditional branch for Vine 6
  - fix .desktop value

* Sat Jul 20 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.1.5-1
- new upstream release

* Sat Feb 09 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.1.4-1
- new upstream release

* Sun Mar 11 2012 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.0.2rc5-1
- new upstream release

* Sat Sep 10 2011 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.0.2rc4-1
- new upstream release

* Tue Jun 21 2011 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.0.2rc2-1
- new upstream release

* Wed Dec 22 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.9.3-1
- new upstream release
- deleted wrong comment in 0.9.2-2

* Fri May 14 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.9.2-2
- addd Patch1 from Fedora development to fix DSO linking
- fix Japanese description

* Sat Jan 2 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.9.2-1
- new upstream release
- dropt Patch0

* Fri Sep 25 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.9.1-7
- cleaned up spec
- added Patch0 from Debain to fix man page
- added BuildRequires:  gettext

* Wed Jul 29 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.9.1-6vl5
- improved and fixed Japanese description

* Sun Jun 14 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.9.1-5vl5
- fixed BuildRoot
- cleaned up spec
- added Japanese description

* Sat May 9 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.9.1-4vl5
- changed Group: Applications/Accessories
- spec in UTF-8

* Sat Mar 21 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.9.1-3vl5
- enabled autostart again

* Fri Mar 20 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.9.1-2vl5
- fixed changelog typo

* Thu Mar 19 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.9.1-1vl5
- Update to 0.9.1
- added BuildRequires:  glib2-devel >= 2.14.0
- dropped Patch0,1

* Sat Feb 28 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.9-1vl5
- initial build for VineSeed (imported Fedora development Package)
- disabled autostart

* Sun Nov 23 2008 Christoph Wickert <cwickert@fedoraproject.org> - 0.9-1
- Update to 0.9
- Fix Control+Click behaviour
- Small corrections to German translation

* Sat Apr 19 2008 Christoph Wickert <cwickert@fedoraproject.org> - 0.8-1
- Update to 0.8

* Sat Apr 19 2008 Christoph Wickert <cwickert@fedoraproject.org> - 0.7-2
- No longer require lxpanel
- Preserve timestamps during install
- Include NEWS in doc

* Sat Apr 12 2008 Christoph Wickert <cwickert@fedoraproject.org> - 0.7-1
- Initial Fedora RPM
