Sophie

Sophie

distrib > Mandriva > 10.2 > x86_64 > by-pkgid > 1aebb1378a2b7112488d2aaddd022e5a > files > 9

bluez-utils-2.14-1.1.102mdk.src.rpm

Name: 		bluez-utils
Summary: 	Official Bluetooth utilities for linux
Version: 2.14
Release: 	1.1.102mdk

Source0:	http://bluez.sourceforge.net/download/%{name}-%{version}.tar.bz2
Source1:	bluetooth.init
Source2:	pand.init
Source3:	dund.init
Source4:	hidd.init
Source5:	bluetooth.conf
Source6:	pand.conf
Source7:	dund.conf
Source8:	hidd.conf
Source9:	rfcomm.conf
Source10:	hidd.hotplug
# (fc) 2.8-2mdk change default configuration (Fedora)
Patch0:		bluez-utils-2.14-defaultconf.patch.bz2
# (fc) 2.8-2mdk don't set HOME variable in bluepin
Patch1:		bluez-utils-2.8-bluepin.patch.bz2
# (fc) 2.10-3mdk add initonly (-i) command line to hcid (Flepied)
Patch2:		bluez-utils-2.14-initonly.patch.bz2
Patch3:		900_hcid_injection_fix.patch
Patch4:		bluez-utils-2.14-dbus.patch
URL:		http://bluez.sourceforge.net/
License:	GPL
Group:		Communications
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildRequires:  dbus-devel
BuildRequires:	flex bison kernel-source
BuildRequires:	bluez-devel >= 2.14 libusb-devel
Requires:	python
Requires:	bluez-pin
PreReq:		rpm-helper
Provides:	bluez-sdp
Obsoletes:	bluez-sdp
Provides:	bluez-pan
Obsoletes:	bluez-pan

%description
These are the official Bluetooth utilities for Linux.

WARNING : it is HIGHLY recommanded to change your system Bluetooth
PIN code in /etc/bluetooth/pin.

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

%package	cups
Summary:	CUPS printer backend for Bluetooth printers
Group:		System/Servers
Requires:	cups

%description	cups
This package contains the CUPS backend for Bluetooth printers.

%prep
%setup -q
%patch0 -p1 -b .defaultconf
%patch1 -p1 -b .home
%patch2 -p1 -b .initonly
%patch3 -p1 -b .can-2005-2547
%patch4 -p2 -b .dbusfix

libtoolize --copy --force && aclocal-1.7 && autoheader && automake-1.7 --add-missing && autoconf --force

perl -p -i -e 's|/sbin/hciattach|/usr/sbin/hciattach||g' pcmcia/bluetooth
# ask for pin interactively and using dbus
perl -p -i -e 's|security auto|security user||g' hcid/hcid.conf
perl -p -i -e 's|/usr/bin/bluepin|/bin/bluepin||g' hcid/hcid.conf
perl -p -i -e 's|#dbus_pin_helper|dbus_pin_helper||g' hcid/hcid.conf

%build
%configure2_5x --enable-all --with-bluez-libs=%{_libdir}
%make CFLAGS="$RPM_OPT_FLAGS -fpic"

%install
rm -rf $RPM_BUILD_ROOT
%{makeinstall_std}

cat << EOF > $RPM_BUILD_ROOT%{_sysconfdir}/bluetooth/pin
1234
EOF

chmod 600 $RPM_BUILD_ROOT%{_sysconfdir}/bluetooth/pin

rm -f $RPM_BUILD_ROOT/etc/default/bluetooth $RPM_BUILD_ROOT/etc/init.d/bluetooth
for a in bluetooth dund hidd pand ; do
        install -D -m0755 $RPM_SOURCE_DIR/$a.init $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/$a
        install -D -m0644 $RPM_SOURCE_DIR/$a.conf $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/$a
done

install -D -m0755 %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/hotplug/bluetooth.agent

install -D -m0755 cups/bluetooth $RPM_BUILD_ROOT%{_libdir}/cups/backend/bluetooth

install -D -m0644 %{SOURCE9} $RPM_BUILD_ROOT%{_sysconfdir}/devfs/conf.d/rfcomm.conf

mkdir -p $RPM_BUILD_ROOT/sbin
mv $RPM_BUILD_ROOT%{_bindir}/hidd $RPM_BUILD_ROOT/sbin/
mv $RPM_BUILD_ROOT%{_sbindir}/hcid $RPM_BUILD_ROOT/sbin/

%clean
rm -fr $RPM_BUILD_ROOT

%post
update-alternatives --install /bin/bluepin bluepin /usr/bin/bluepin 5
if [ -f /dev/.devfsd ]; then
        killall -USR1 devfsd > /dev/null 2>&1 || :
fi
%_post_service bluetooth
%_post_service dund
%_post_service hidd
%_post_service pand

%preun
%_preun_service bluetooth
%_preun_service dund
%_preun_service hidd
%_preun_service pand

%postun
if [ "$1" = "0" ]; then
  update-alternatives --remove bluepin /usr/bin/bluepin 
fi
 
if [ -f /dev/.devfsd ]; then
        killall -USR1 devfsd > /dev/null 2>&1 || :
fi

%triggerpostun -- bluez-utils < 2.9-1mdk
/sbin/chkconfig bluetooth reset

%files
%defattr(-,root,root)
%doc README AUTHORS ChangeLog
/sbin/*
%{_sbindir}/*
%{_bindir}/*
%config(noreplace) %{_sysconfdir}/devfs/conf.d/*
%config(noreplace) %{_sysconfdir}/hotplug/bluetooth.agent
%config(noreplace) %{_sysconfdir}/hotplug/usb/bcm203x*
%config(noreplace) %{_sysconfdir}/bluetooth
%config(noreplace) %{_sysconfdir}/rc.d/init.d/*
%config(noreplace) %{_sysconfdir}/sysconfig/*
%config(noreplace) %{_sysconfdir}/pcmcia/*
%{_mandir}/man*/*

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

%changelog
* Wed Aug 24 2005 Vincent Danen <vdanen@mandriva.com> 2.14-1.1.102mdk
- P3: security fix for CAN-2005-2547
- P4: fix compilation with dbus

* Thu Jan 27 2005 Frederic Crozat <fcrozat@mandrakesoft.com> 2.14-1mdk
- New release 2.14
- Regenerate patches 0 & 2

* Sat Dec 25 2004 Per Øyvind Karlsen <peroyvind@linux-mandrake.com> 2.10-4mdk
- fix buildrequires
- fix summary-ended-with-dot

* Tue Sep 21 2004 Frederic Crozat <fcrozat@mandrakesoft.com> 2.10-3mdk
- Patch2 (flepied): add initonly (-i) to hcid 
- add hotplug script to initialize keyboard/mouse at startup

* Mon Sep 20 2004 Frederic Crozat <fcrozat@mandrakesoft.com> 2.10-2mdk
- Update patch0 to disable crypt and auth by default, they conflicts with
  BT keyboard/mouse

* Sun Sep 12 2004 Austin Acton <austin@mandrake.org> 2.10-1mdk
- 2.10

* Thu Aug 12 2004 Frederic Crozat <fcrozat@mandrakesoft.com> 2.9-1mdk
- Release 2.9
- Enable all extra support
- Add status to initscript and change level for shutdown

* Tue Jul 27 2004 Frederic Crozat <fcrozat@mandrakesoft.com> 2.8-2mdk
- Patch0 (Fedora): fix default configuration
- Patch1 : don't set HOME in bluepin
- Enable dbus
- Use dbus to request PIN and requires bluez-pin for this
- Change default PIN to a numeric-only PIN, otherwise many devices
won't be able to authenticate (based on Edd Dumbill hints)
- Replace default initscript with Fedora ones : configuration is now stored
in /etc/sysconfig/bluetooth (and pand, dund, hidd)
- Add cups subpackage
- Add alternative for bluepin, use alternative by default
- Add devfsd config file for rfcomm
- Add back service registration in post/postun

* Sat Jul 17 2004 Austin Acton <austin@mandrake.org> 2.8-1mdk
- 2.8

* Sun Jun 13 2004 Austin Acton <austin@mandrake.org> 2.7-4mdk
- use GTK popup for pin rather than local file (James Gregory)

* Sat May 22 2004 Austin Acton <austin@mandrake.org> 2.7-3mdk
- fix prefixes (Reinout van Schouwen)

* Sun May 16 2004 Austin Acton <austin@mandrake.org> 2.7-2mdk
- remove chkconfig macros

* Thu May 13 2004 Austin Acton <austin@mandrake.org> 2.7-1mdk
- 2.7
- obsoletes bluez-pan
- configure 2.5

* Sat May  1 2004 Arnaud de Lorbeau <adelorbeau@mandrakesoft.com> 2.6-2mdk
- Osoletes bluez-sdp

* Fri Apr 30 2004 Arnaud de Lorbeau <adelorbeau@mandrakesoft.com> 2.6-1mdk
- 2.6

* Thu Feb 12 2004 Nicolas Planel <nplanel@mandrake.org> 2.4-4mdk
- fix bluepin (fredl).

* Mon Jan 26 2004 Austin Acton <austin@mandrake.org> 2.4-3mdk
- fix file locations

* Mon Jan 19 2004 Austin Acton <austin@mandrake.org> 2.4-2mdk
- really add clean macro
- I am dumb

* Mon Jan 19 2004 Austin Acton <austin@mandrake.org> 2.4-1mdk
- 2.4
- add clean macro

* Mon Apr 21 2003 Austin Acton <aacton@yorku.ca> 2.3-2mdk
- make rpmlint happier (add init.d macros)
- fix references to /sbin

* Sat Mar 29 2003 Austin Acton <aacton@yorku.ca> 2.3-1mdk
- 2.3

* Mon Jan 20 2003 Austin Acton <aacton@yorku.ca> 2.2-1mdk
- initial package