File yast2-printer.spec of Package yast2-printer

#
# spec file for package yast2-printer (Version 2.18.19)
#
# Copyright (c) 2009 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-printer
Version:        2.18.19
Release:        1
License:        GPL
Group:          System/YaST
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source0:        yast2-printer-2.18.19.tar.bz2
Prefix:         /usr
BuildRequires:  cups-devel update-desktop-files yast2 yast2-core-devel yast2-devtools yast2-testsuite
Recommends:     netcat
Requires:       /usr/bin/host cups-libs
Requires:       yast2 >= 2.16.12
Provides:       yast2-config-cups yast2-agent-printerdb yast2-agent-cups yast2-lib-printer yast2-config-printer y2c_cups y2c_prnt y2l_printer y2a_cups y2a_printerdb yast2-trans-printer yast2-trans-libprinter yast2-trans-printerdb yast2-trans-cups yast2-printerdb-devel yast2-cups-devel
Obsoletes:      yast2-config-cups yast2-agent-printerdb yast2-agent-cups yast2-lib-printer yast2-config-printer y2c_cups y2c_prnt y2l_printer y2a_cups y2a_printerdb yast2-trans-printer yast2-trans-libprinter yast2-trans-printerdb yast2-trans-cups yast2-printerdb-devel yast2-cups-devel
Provides:       yast2-agent-cups-devel yast2-agent-printerdb-devel y2d_prnt y2t_prnt yast2-db-printer yast2-printerdb
Obsoletes:      yast2-agent-cups-devel yast2-agent-printerdb-devel y2d_prnt y2t_prnt yast2-db-printer yast2-printerdb
Summary:        YaST2 - Printer Configuration

%package devel-doc
License:        GPL
Group:          Documentation/SUSE
BuildRequires:  cups-devel yast2-core-devel
Summary:        Developer documentation for yast2-printer

%description
This package contains the YaST2 component for printer configuration.

%description devel-doc
Developer documentation for yast2-printer.

%prep
%setup -n yast2-printer-2.18.19

%build
%{prefix}/bin/y2tool y2autoconf
%{prefix}/bin/y2tool y2automake
autoreconf --force --install
export CFLAGS="$RPM_OPT_FLAGS -DNDEBUG"
export CXXFLAGS="$RPM_OPT_FLAGS -DNDEBUG"
%{?suse_update_config:%{suse_update_config -f}}
./configure --libdir=%{_libdir} --prefix=%{prefix} --mandir=%{_mandir}
make %{?jobs:-j%jobs}

%install
make install DESTDIR="$RPM_BUILD_ROOT"
[ -e "%{prefix}/share/YaST2/data/devtools/NO_MAKE_CHECK" ] || Y2DIR="$RPM_BUILD_ROOT/usr/share/YaST2" make check DESTDIR="$RPM_BUILD_ROOT"
for f in `find $RPM_BUILD_ROOT/%{prefix}/share/applications/YaST2/ -name "*.desktop"` ; do
    d=${f##*/}
    %suse_update_desktop_file -d ycc_${d%.desktop} ${d%.desktop}
done

%post

%clean
rm -rf "$RPM_BUILD_ROOT"

%files
%defattr(-,root,root)
%dir /usr/share/YaST2/include/printer
%{prefix}/share/applications/YaST2/printer.desktop
/usr/share/YaST2/modules/*.y*
/usr/share/YaST2/clients/printer*
/usr/share/YaST2/include/printer/*
/usr/share/YaST2/schema/autoyast/rnc/printer.rnc
/usr/share/YaST2/scrconf/*
/usr/lib/YaST2/servers_non_y2/*
/usr/share/YaST2/data/testprint.ps
%{prefix}/lib/YaST2/bin/autodetect_print_queues
%{prefix}/lib/YaST2/bin/autodetect_printers
%{prefix}/lib/YaST2/bin/create_printer_ppd_database
%{prefix}/lib/YaST2/bin/determine_printer_driver_options
%{prefix}/lib/YaST2/bin/cups_client_only
%{prefix}/lib/YaST2/bin/modify_cupsd_conf
%{prefix}/lib/YaST2/bin/test_device
%{prefix}/lib/YaST2/bin/test_remote_ipp
%{prefix}/lib/YaST2/bin/test_remote_lpd
%{prefix}/lib/YaST2/bin/test_remote_novell
%{prefix}/lib/YaST2/bin/test_remote_smb
%{prefix}/lib/YaST2/bin/test_remote_socket
#Documentation
%dir %{prefix}/share/doc/packages/yast2-printer
%{prefix}/share/doc/packages/yast2-printer/COPYING
%readme %{prefix}/share/doc/packages/yast2-printer/README

%files devel-doc
%defattr(-,root,root)
%doc %{prefix}/share/doc/packages/yast2-printer
%exclude %{prefix}/share/doc/packages/yast2-printer/COPYING
%exclude %{prefix}/share/doc/packages/yast2-printer/README
%changelog
openSUSE Build Service is sponsored by