File viewnior.spec of Package viewnior

#
# spec file for package viewnior
#
# Copyright (c) 2011 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:           viewnior
Version:        1.1
Release:        1
Summary:        Elegant image viewer
Group:          Productivity/Graphics/Viewers
License:        GPLv3+
Url:            http://xsisqox.github.com/Viewnior
Source0:        %{name}-%{version}.tar.bz2
Patch0:         %{name}-1.1-ld_fix.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  gtk2-devel
BuildRequires:  update-desktop-files
BuildRequires:  gettext
BuildRequires:  intltool
BuildRequires:  shared-mime-info
BuildRequires:  gconf2-devel

%description 
Viewnior is an image viewer program. Created to be simple, fast and elegant. 
It's minimalistic interface provides more screen space for your images. Among 
its features are:

* Fullscreen & Slideshow
* Rotate, flip, save, delete images
* Animation support
* Browse only selected images
* Navigation window
* Simple interface
* Configurable mouse actions


%prep
%setup -q
%patch0 -p1
# fix spurious executable perms
chmod 0644 AUTHORS ChangeLog COPYING NEWS README TODO src/*

%build
%configure --enable-wallpaper
make %{?_smp_mflags} V=1

%install
%makeinstall
%find_lang %{name}
%suse_update_desktop_file %{name}

%clean
rm -rf %{buildroot}

%post
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
update-desktop-database &> /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 &> /dev/null || :

%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :

%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING NEWS README TODO
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.*
%{_datadir}/%{name}/
%{_mandir}/man*/%{name}.*

%changelog
openSUSE Build Service is sponsored by