File system-config-printer.spec of Package system-config-printer.import5530

# spec file for package system-config-printer
# 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

# norootforbuild

Name:           system-config-printer
License:        GPLv2+
Group:          Hardware/Printing
Version:        1.2.5
Release:        5.<RELEASE8>
Summary:        A printer administration tool
# PATCH-FIX-OPENSUSE system-config-printer-icon-brp-friendly.patch -- brp checks don't like the printer icon name, so we have to use something else
Patch13:        system-config-printer-icon-brp-friendly.patch
# PATCH-FIX-OPENSUSE system-config-printer-firewall-menu.patch -- Fix string to mention correct path in menus to firewall tool
Patch18:        system-config-printer-firewall-menu.patch
# PATCH-FIX-OPENSUSE system-config-printer-no-openprinting.patch bnc#733542 -- Disable feature that downloads ppd from
Patch19:        system-config-printer-no-openprinting.patch
# PATCH-FIX-UPSTREAM system-config-printer-subprocess-no-shell.patch bnc#735322 -- Always use sequences for subprocess to avoid escaping issues; sent upstream by mail
Patch20:        system-config-printer-subprocess-no-shell.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Obsoletes:      gnome-cups-manager <= 0.33
BuildRequires:  cups-devel
# For directory ownership
BuildRequires:  dbus-1
BuildRequires:  desktop-file-utils
BuildRequires:  fdupes
BuildRequires:  glib2-devel
BuildRequires:  gnome-icon-theme
BuildRequires:  gnome-patch-translation
# For directory ownership
BuildRequires:  hicolor-icon-theme
BuildRequires:  intltool
BuildRequires:  libudev-devel
BuildRequires:  libusb-compat-devel
BuildRequires:  python-devel
BuildRequires:  python-xml
BuildRequires:  update-desktop-files
BuildRequires:  xmlto
Requires:       cups
Requires:       dbus-1-x11
Requires:       dbus-1-python
Requires:       desktop-file-utils
Requires:       python-cups
Requires:       python-cupshelpers
Requires:       python-gnome
Requires:       python-gobject2
Requires:       python-gtk
Requires:       python-notify
Requires:       python-smbc
Recommends:     %{name}-lang
Recommends:     cups-pk-helper
Recommends:     udev-configure-printer
%if %suse_version <= 1110
%define python_sitelib %{py_sitedir}

system-config-printer is a graphical user interface that allows the
user to configure a CUPS print server.

%package -n python-cupshelpers
License:        GPLv2+
Summary:        High-level Python Bindings for CUPS
Group:          Hardware/Printing
Requires:       python-cups

%description -n python-cupshelpers
This package contains high-level python bindings for CUPS, and can be
used on top of python-cups.

%package -n udev-configure-printer
License:        GPLv2+
Summary:        Utility to autoconfigure printers when plugged
Group:          Hardware/Printing
Obsoletes:      cups-autoconfig <= 0.1.0
Requires:       dbus-1-python
Requires:       python-cups
Requires:       python-cupshelpers

%description -n udev-configure-printer
This package contains an utility that will ensure printers get
automatically configured when plugged on the computer.

%setup -q
%patch13 -p1
%patch18 -p1
%patch19 -p1
%patch20 -p1

%if %suse_version > 1110
%configure \

%makeinstall udevrulesdir=/lib/udev/rules.d udevhelperdir=/lib/udev
for size in 8x8 16x16 22x22 24x24 32x32 48x48; do
	if test -f %{_datadir}/icons/gnome/$size/devices/printer.png; then
		mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/$size/apps
		cp -a %{_datadir}/icons/gnome/$size/devices/printer.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/$size/apps/%{name}.png
%suse_update_desktop_file print-applet
%suse_update_desktop_file system-config-printer X-SuSE-PrintingUtility X-SuSE-ControlCenter-Hardware
%suse_update_desktop_file manage-print-jobs
%fdupes $RPM_BUILD_ROOT/%{py_sitedir}
%find_lang %{name} %{?no_lang_C}




%config(noreplace) %{_sysconfdir}/dbus-1/system.d/newprinternotification.conf
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/printerdriversinstaller.conf

%files -n python-cupshelpers
%exclude %{python_sitelib}/cupshelpers/*.pyc
%if %suse_version > 1110

%files -n udev-configure-printer
%dir /lib/udev
%dir /lib/udev/rules.d

%files lang -f %{name}.lang

openSUSE Build Service is sponsored by