File skanlite.spec of Package skanlite

#
# spec file for package skanlite (Version 0.7.kde4.5.0)
#
# Copyright (c) 2010 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:           skanlite
BuildRequires:  libkdepimlibs4-devel oxygen-icon-theme
BuildRequires:  libksane-devel
License:        LGPLv2.1+
Group:          Hardware/Scanner
Summary:        Scanner Front-End
Version:        0.7.kde4.5.0
Release:        1
%define rversion 0.7
# ftp://ftp.kde.org/pub/kde/stable/4.4.0/src/extragear
Source0:        skanlite-%{rversion}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Provides:       kdegraphics3-scan = 3.5.1
Obsoletes:      kdegraphics3-scan <= 3.5.1
%kde4_runtime_requires 

%description
Skanlite is a KDE front-end for the sane scanner library.



Authors:
--------
    Kare Sars <kare.sars@iki.fi>

%prep
%setup -q -n skanlite-%{rversion}

%build
  %cmake_kde4 -d build
  %make_jobs

%install
  cd build
  %makeinstall
  cd ..
  %suse_update_desktop_file skanlite Graphics Scanning
  %find_lang %name
  %if %suse_version < 1120  
    # work-around bnc#457908
    for i in de es et it pt pt_BR sv uk; do mkdir $RPM_BUILD_ROOT/usr/share/doc/kde/HTML/$i/common;done
  %endif
  for i in {16,22,32,48,64}; do 
     mkdir -p $RPM_BUILD_ROOT/usr/share/icons/hicolor/"$i"x"$i"/apps
     cp /usr/share/icons/oxygen/"$i"x"$i"/devices/scanner.png $RPM_BUILD_ROOT/usr/share/icons/hicolor/"$i"x"$i"/apps/;
  done

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT

%files -f %name.lang
%defattr(-,root,root)
%doc COPYING
/usr/bin/skanlite
/usr/share/applications/kde4/skanlite.desktop
/usr/share/icons/hicolor/*/apps/scanner.*
%doc %lang(en) /usr/share/doc/kde/HTML/en/skanlite
%if %suse_version < 1120  
# work-around bnc#457911
%dir /usr/share/doc/kde/HTML/*
%endif

%changelog
openSUSE Build Service is sponsored by