File cups-backends.spec of Package cups-backends

#
# spec file for package cups-backends (Version 1.0)
#
# 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:           cups-backends
BuildRequires:  cups-devel hal-devel
Summary:        Various Free Backends for the cups Package
License:        GPL v2 or later
Group:          Hardware/Printing
Version:        1.0
Release:        255
Source0:        http://www.srz.de/Members/bla/cups/backend/hpnpf/hpnpf.tgz
Source1:        http://www.srz.de/Members/bla/cups/backend/hpnpf/hpnpf.txt
Source2:        cups-pipe.sh
Source4:        hal.c
Patch0:         hpnpf.patch
Patch1:         cups-backends-silenct-hal.patch
Requires:       cups-libs, dbus-1, hal
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This package contains free additional backends for CUPS.



Authors:
--------
    Jiri Srain <jsrain@suse.cz>
    Jeffrey Stedfast <fejj@novell.com>
    Klaus Singvogel <kssingvo@suse.de>
    Johannes Meixner <jsmeix@suse.de>

%prep
%setup -c -T
mkdir hpnpf
cd hpnpf
tar xzvvf %{SOURCE0}
cd ..
cp -a %{SOURCE4} .
%patch1 -p0

%build
gcc $RPM_OPT_FLAGS -fPIC -fPIE -pie -DDBUS_API_SUBJECT_TO_CHANGE \
	-I%{_includedir}/dbus-1.0/ -I%{_libdir}/dbus-1.0/include/ \
	hal.c -o hal -ldbus-1 -lhal 

%install
mkdir -p $RPM_BUILD_ROOT/%{_libdir}/cups/backend
install -m 755 -D ${RPM_SOURCE_DIR}/cups-pipe.sh $RPM_BUILD_ROOT%{_libdir}/cups/backend/pipe
install -m 755 -D hal $RPM_BUILD_ROOT%{_libdir}/cups/backend/hal

%files 
%defattr(-, root,root)
%dir %{_libdir}/cups
%dir %{_libdir}/cups/backend
%{_libdir}/cups/backend/*

%changelog
openSUSE Build Service is sponsored by