File yast2-scanner.spec of Package yast2-scanner
#
# spec file for package yast2-scanner
#
# 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: yast2-scanner
Summary: YaST2 - Scanner Configuration
Version: 2.20.1
Release: 1
License: GPL
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: %{name}-%{version}.tar.bz2
Prefix: /usr
BuildRequires: docbook-xsl-stylesheets doxygen libxslt perl-XML-Writer sgml-skel update-desktop-files xorg-x11-libX11-devel yast2 yast2-devtools yast2-testsuite
Requires: yast2
# Used to exclude libX11, libXau, libxcb, and libxcb-xlib from the requires list
# which are pulled in by Autoreqprov because of the displaytest tool:
%define my_requires /tmp/my-requires
%description
This package provides support for the configuration of USB scanners,
SCSI scanners, scanners in HP all-in-one devices, and scanning via
network (i.e. use a remote scanner via another host in the network).
Parallel port scanners and network scanners (i.e. a scanner which is
directly accessible in the network) cannot be configured with this
tool, except for such scanners in HP all-in-one devices. Usually those
devices must be configured manually. For more information see
http://www.sane-project.org/ and the documentation in the package
"sane-backends".
%prep
%setup -q
%build
make -f Makefile.cvs
export CFLAGS="$RPM_OPT_FLAGS -DNDEBUG"
export CXXFLAGS="$RPM_OPT_FLAGS -DNDEBUG"
# V=1: verbose build in case we used AM_SILENT_RULES(yes)
# so that RPM_OPT_FLAGS check works
make %{?jobs:-j%jobs} V=1
%install
make install DESTDIR="$RPM_BUILD_ROOT"
%suse_update_desktop_file -d ycc_scanner scanner
# Exclude libX11, libXau, libxcb, and libxcb-xlib from the requires list
# which are pulled in by Autoreqprov because of the displaytest tool:
cat << EOF > %{my_requires}
grep -v 'displaytest' | %{__find_requires}
EOF
chmod 755 %{my_requires}
%define __find_requires %{my_requires}
%clean
rm -rf "$RPM_BUILD_ROOT"
%files
%defattr(-,root,root)
%dir /usr/share/YaST2/include/scanner
/usr/share/YaST2/include/scanner/*
/usr/share/YaST2/clients/scanner.ycp
/usr/share/YaST2/modules/Scanner.*
%{prefix}/share/applications/YaST2/scanner.desktop
%{prefix}/lib/YaST2/bin/*scanner*
%{prefix}/lib/YaST2/bin/displaytest
%doc %{prefix}/share/doc/packages/yast2-scanner
%changelog