File simple-scan.spec of Package simple-scan

# spec file for package simple-scan
# 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

Name:           simple-scan
Release:        3
License:        GPLv3+
Summary:        Simple Scanning Utility
Group:          System/GUI/GNOME
Source0:        %{name}-%{version}.tar.bz2
BuildRequires:  glib2-devel
BuildRequires:  gtk2-devel
BuildRequires:  gconf2-devel
BuildRequires:  gnome-doc-utils-devel
BuildRequires:  gnome-icon-theme
BuildRequires:  intltool
BuildRequires:  libgudev-1_0-devel
BuildRequires:  libjpeg-devel
%if 0%{?suse_version} > 1130
BuildRequires:  sane-backends-devel
BuildRequires:  sane-backends
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(zlib)
Requires:       xdg-utils
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Simple Scan is an easy-to-use application, designed to let users connect
their scanner and quickly have the image/document in an appropriate

Simple Scan is basically a frontend for SANE - which is the same backend
as XSANE uses. This means that all existing scanners will work and the
interface is well tested.

%setup -q

%configure --disable-static
%__make %{?jobs:-j%jobs}

# workaround annoying brpcheck for icons
for size in 8x8 16x16 22x22 24x24 32x32 48x48 256x256; do
        if test -f %{_datadir}/icons/gnome/$size/devices/scanner.png; then
                mkdir -p %{buildroot}%{_datadir}/icons/hicolor/$size/apps
                cp -a %{_datadir}/icons/gnome/$size/devices/scanner.png %{buildroot}%{_datadir}/icons/hicolor/$size/apps/simple-scan.png
if test -f %{_datadir}/icons/gnome/scalable/devices/scanner.svg; then
        mkdir -p %{buildroot}%{_datadir}/icons/hicolor/scalable/apps
        cp -a %{_datadir}/icons/gnome/scalable/devices/scanner.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/simple-scan.svg
sed -i "s/\(Icon.*=\)scanner/\1simple-scan/g" %{buildroot}%{_datadir}/applications/%{name}.desktop
%suse_update_desktop_file %{name}
%find_lang %{name} %{?no_lang_C}

%{__rm} -rf %{buildroot}

%pre -f %{name}.schemas_pre

%posttrans -f %{name}.schemas_posttrans

%preun -f %{name}.schemas_preun

%if 0%{?suse_version} > 1130


%if 0%{?suse_version} > 1130


%files -f %{name}.schemas_list
%defattr(-, root, root)
%dir %{_datadir}/gnome/
%dir %{_datadir}/gnome/help/
%dir %{_datadir}/gnome/help/%{name}/
%doc %{_datadir}/gnome/help/%{name}/C/

%files lang -f %{name}.lang

openSUSE Build Service is sponsored by