File bluez.spec of Package bluez

# Do NOT Edit the Auto-generated Part!
# Generated by: spectacle version 0.21
# >> macros
# << macros

Name:       bluez
Summary:    Bluetooth utilities
Version:    4.87
Release:    1
Group:      Applications/System
License:    GPLv2+
Source1:    bluetooth.init
Source100:  bluez.yaml
Patch0:     bluez-fsync.patch
Patch1:     remove-duplicate-wrong-udev-rule-for-dell-mice.patch
Patch2:     enable_HFP.patch
Patch3:     powered.patch
Patch4:     install-test-scripts.patch
Patch5:     install-more-binary-test.patch
Patch6:     disable-hal-plugin.patch
Requires:   bluez-libs = %{version}
Requires:   dbus >= 0.60
Requires:   hwdata >= 0.215
Requires:   ofono >= 0.2
Requires(post): /sbin/service
Requires(post): /sbin/chkconfig
Requires(postun): /sbin/service
Requires(postun): /sbin/chkconfig
BuildRequires:  pkgconfig(dbus-1)
BuildRequires:  pkgconfig(libusb)
BuildRequires:  pkgconfig(alsa)
BuildRequires:  pkgconfig(udev)
BuildRequires:  pkgconfig(sndfile)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(gstreamer-plugins-base-0.10)
BuildRequires:  pkgconfig(gstreamer-0.10)
BuildRequires:  flex

Utilities for use in Bluetooth applications:

The BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A.

%package libs
Summary:    Libraries for use in Bluetooth applications
Group:      System/Libraries
Requires:   %{name} = %{version}-%{release}
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig

%description libs
Libraries for use in Bluetooth applications.

%package libs-devel
Summary:    Development libraries for Bluetooth applications
Group:      Development/Libraries
Requires:   %{name} = %{version}-%{release}
Requires:   bluez-libs = %{version}

%description libs-devel
bluez-libs-devel contains development libraries and headers for
use in Bluetooth applications.

%package cups
Summary:    CUPS printer backend for Bluetooth printers
Group:      System/Daemons
Requires:   %{name} = %{version}-%{release}
Requires:   bluez-libs = %{version}
Requires:   cups

%description cups
This package contains the CUPS backend

%package alsa
Summary:    ALSA support for Bluetooth audio devices
Group:      System/Daemons
Requires:   %{name} = %{version}-%{release}
Requires:   bluez-libs = %{version}

%description alsa
This package contains ALSA support for Bluetooth audio devices

%package gstreamer
Summary:    GStreamer support for SBC audio format
Group:      System/Daemons
Requires:   %{name} = %{version}-%{release}
Requires:   bluez-libs = %{version}

%description gstreamer
This package contains gstreamer plugins for the Bluetooth SBC audio format

%package test
Summary:    Test Programs for BlueZ
Group:      Development/Tools
Requires:   %{name} = %{version}-%{release}
Requires:   bluez-libs = %{version}
Requires:   dbus-python
Requires:   pygobject2

%description test
Scripts for testing BlueZ and its functionality

%setup -q -n %{name}-%{version}

# bluez-fsync.patch
%patch0 -p1
# remove-duplicate-wrong-udev-rule-for-dell-mice.patch
%patch1 -p1
# enable_HFP.patch
%patch2 -p1
# powered.patch
%patch3 -p1
# install-test-scripts.patch
%patch4 -p1
# install-more-binary-test.patch
%patch5 -p1
# disable-hal-plugin.patch
%patch6 -p1
# >> setup
# << setup

# >> build pre
# << build pre

%reconfigure --disable-static \
    --enable-cups \
    --enable-hid2hci \
    --enable-dfutool \
    --enable-bccmd \
    --enable-hidd \
    --enable-pand \
    --enable-dund \
    --enable-gstreamer \
    --enable-alsa \
    --enable-usb \
    --enable-tools \
    --enable-test \

make %{?jobs:-j%jobs}

# >> build post
# << build post
rm -rf %{buildroot}
# >> install pre
# << install pre

# >> install post

install -D -m0755 %SOURCE1 $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/bluetooth

# Remove the cups backend from libdir, and install it in /usr/lib whatever the install
rm -rf ${RPM_BUILD_ROOT}%{_libdir}/cups
install -D -m0755 cups/bluetooth ${RPM_BUILD_ROOT}/usr/lib/cups/backend/bluetooth

install -d -m0755 $RPM_BUILD_ROOT/%{_localstatedir}/lib/bluetooth

# << install post

%post libs -p /sbin/ldconfig

%postun libs -p /sbin/ldconfig

# >> files
%defattr(-, root, root)
%doc %{_mandir}/man1/*
%doc %{_mandir}/man8/*
%config(noreplace) %{_sysconfdir}/bluetooth/*
%config %{_sysconfdir}/dbus-1/system.d/bluetooth.conf
%exclude /etc/rc.d/init.d/*
# << files

%files libs
# >> files libs
%defattr(-, root, root)
# << files libs

%files libs-devel
# >> files libs-devel
%defattr(-, root, root)
%dir %{_includedir}/bluetooth
# << files libs-devel

%files cups
# >> files cups
%defattr(-, root, root)
# << files cups

%files alsa
# >> files alsa
%defattr(-, root, root)
# << files alsa

%files gstreamer
# >> files gstreamer
%defattr(-, root, root)
# << files gstreamer

%files test
# >> files test
# << files test