Sophie

Sophie

distrib > Mandriva > 2006.0 > i586 > media > main-src > by-pkgid > 4e6ba2b876b513d7384f4dfd134a07e0 > files > 7

bluez-utils-2.19-7mdk.src.rpm

%define version 2.19
%define release %mkrel 7


Name: 		bluez-utils
Summary: 	Official Bluetooth utilities for linux
Version:        %version
Release:        %release

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
Source11:	hidd.udev.rules
# (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
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 >= %version  libusb-devel
BuildRequires:	libalsa-devel
BuildRequires:	udev-tools
Requires:	python
Requires:	bluez-pin
Requires(post):	rpm-helper
Requires(preun):  rpm-helper
Provides:	bluez-sdp
Obsoletes:	bluez-sdp
Provides:	bluez-pan
Obsoletes:	bluez-pan
Requires:	bluez-bluefw

%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

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

# fix firmware location
perl -pi -e 's/\/lib\/firmware/\/etc\/bluetooth\/firmware/' extra/bcm203x.c

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

%install
rm -rf $RPM_BUILD_ROOT
%{makeinstall_std}

rm -f $RPM_BUILD_ROOT%{_libdir}/alsa-lib/*.la

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 cups/bluetooth $RPM_BUILD_ROOT%{_libdir}/cups/backend/bluetooth

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/

install -D -m0755 %{SOURCE10} $RPM_BUILD_ROOT/sbin/udev_bluetooth_helper
install -D -m0644 %{SOURCE11} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/60-bluetooth.rules

# move hotplug usermap to udev rule
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/agents.d/usb
mv $RPM_BUILD_ROOT%{_sysconfdir}/hotplug/usb/bcm203x $RPM_BUILD_ROOT%{_sysconfdir}/udev/agents.d/usb/bcm203x
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/
%{_sbindir}/udev_import_usermap usb $RPM_BUILD_ROOT%{_sysconfdir}/hotplug/usb/bcm203x.usermap > $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/70-bcm203x.rules
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/hotplug/usb/bcm203x*

%clean
rm -fr $RPM_BUILD_ROOT

%post
update-alternatives --install /bin/bluepin bluepin /usr/bin/bluepin 5
%_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
 
%triggerpostun -- bluez-utils < 2.9-1mdk
/sbin/chkconfig bluetooth reset

%files
%defattr(-,root,root)
%doc README AUTHORS ChangeLog
/sbin/*
%{_sbindir}/*
%{_bindir}/*
%{_sysconfdir}/udev/agents.d/usb/bcm203x
%{_sysconfdir}/udev/rules.d/70-bcm203x.rules
%{_sysconfdir}/udev/rules.d/60-bluetooth.rules
%config(noreplace) %{_sysconfdir}/bluetooth
%config(noreplace) %{_sysconfdir}/rc.d/init.d/*
%config(noreplace) %{_sysconfdir}/sysconfig/*
%config(noreplace) %{_sysconfdir}/pcmcia/bluetooth.conf
%attr(0755, root, root) %{_sysconfdir}/pcmcia/bluetooth
%{_mandir}/man*/*
%{_libdir}/alsa-lib/libasound_module_pcm_a2dp.so
%{_libdir}/alsa-lib/libasound_module_pcm_headset.so

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

%changelog
* Thu Sep 15 2005 Olivier Blin <oblin@mandriva.com> 2.19-7mdk
- move hotplug usermap to udev rule for bcm203x

* Tue Aug 30 2005 Olivier Blin <oblin@mandriva.com> 2.19-6mdk
- move hotplug agent as /sbin/udev_bluetooth_helper
- Source10: fix it not to use hotplug functions
- Source11: udev rule to run udev_bluetooth_helper
- move hotplug script as udev agent (for bcm203x module)
- make pcmcia bluetooth script executable (Makefile.am is wrong)
- don't ship obsolete devfsd configuration file (Source9)

* Fri Aug 12 2005 Austin Acton <austin@mandriva.org> 2.19-5mdk
- let's require the firmware just so everyone can join in the fun
  (bug #10785)

* Fri Aug 12 2005 Austin Acton <austin@mandriva.org> 2.19-4mdk
- fix firmware location (bugs 10786, 17474)

* Thu Aug 11 2005 Nicolas Lécureuil <neoclust@mandriva.org> 2.19-3mdk
- fix rpmlint errors (PreReq)

* Thu Aug 11 2005 Nicolas Lécureuil <neoclust@mandriva.org> 2.19-2mdk
- fix rpmlint errors (PreReq) 

* Mon Aug 08 2005 Nicolas Lécureuil <neoclust@mandriva.org> 2.19-1mdk
- New release 2.19

* Fri Jul 29 2005 Olivier Blin <oblin@mandriva.com> 2.18-2mdk
- remove the rfcomm module when the service is stopped,
  to avoid some laptops to hang at shutdown

* Mon Jul 04 2005 Nicolas Lécureuil <neoclust@mandriva.org> 2.18-1mdk
- New release 2.18

* Tue May 10 2005 Nicolas Lécureuil <neoclust@mandriva.org> 2.17-1mdk
- New release 2.17

* Sat Apr 30 2005 Christiaan Welvaart <cjw@daneel.dyndns.org> 2.16-2mdk
- add BuildRequires: libalsa-devel

* Fri Apr 29 2005 Nicolas Lecureuil <neoclust@mandriva.org> 2.16-1mdk
- New release 2.16
- Fix buildrequires
- Fix Files section thanks couriousous for your Help and advices 

* 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