Name:           xfce4-screenshooter
Summary:        Screen capture tool for Xfce
Summary(ja):    Xfce のスクリーンキャプチャツール
Version:        1.8.1
Release:        1%{?_dist_release}

License:        GPLv2+
Group:          User Interface/Desktops
URL:            http://goodies.xfce.org/projects/applications/%{name}

Source0:        http://archive.xfce.org/src/apps/%{name}/1.8/%{name}-%{version}.tar.bz2

BuildRoot:     %{_tmppath}/%{name}-%{version}-root

BuildRequires: desktop-file-utils
BuildRequires: libxfce4util-devel >= 4.4.0
BuildRequires: libxfce4ui-devel >= 4.7.0
BuildRequires: xfce4-panel-devel >= 4.4.0
BuildRequires: gtk2-devel >= 2.16.0
BuildRequires: libsoup-devel >= 2.26.0
BuildRequires: libexo-devel >= 0.5.0
BuildRequires: libXext-devel >= 1.0.0
BuildRequires: libXfixes-devel >= 4.0.0
BuildRequires: libSM-devel

Requires(post,postun):	desktop-file-utils

Vendor:		Project Vine
Distribution:	Vine Linux
Packager:	Takemikaduchi


%description
This application allows you to capture the entire screen, the active window or a selected region. You can set the delay that elapses before the screenshot is taken and the action that will be done with the screenshot: save it to a PNG file, copy it to the clipboard, open it using another application, or host it on ZimageZ, a free online image hosting service.

A plugin for the Xfce panel is also available.



%prep
%setup -q

%build
%configure --disable-static
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} \;

desktop-file-install \
	--add-category="X-XFCE" \
	--delete-original \
	--dir=%{buildroot}%{_datadir}/applications \
        ${RPM_BUILD_ROOT}%{_datadir}/applications/xfce4-screenshooter.desktop

%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT


%post
touch --no-create %{_datadir}/icons/hicolor &> /dev/null || :
gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
update-desktop-database %{_datadir}/applications &> /dev/null || :

%postun
if [ $1 -eq 0 ]; then
    touch --no-create %{_datadir}/icons/hicolor &> /dev/null || :
    gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
fi
update-desktop-database %{_datadir}/applications &> /dev/null || :


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog NEWS TODO COPYING
%{_bindir}/xfce4-screenshooter
%{_libdir}/xfce4/panel/plugins/libscreenshooterplugin.so*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/*
%{_datadir}/xfce4/doc/ast
%{_datadir}/xfce4/panel/plugins/screenshooter.desktop
%{_docdir}/%{name}
%{_mandir}/man1/xfce4-screenshooter.1.gz

%changelog
* Thu Jun 07 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 1.8.1-1
- initial build for Vine Linux

