Sophie

Sophie

distrib > Mandriva > 2007.0 > x86_64 > media > main-updates-src > by-pkgid > 92a06ac9caf718c0c089b13d937f26d1 > files > 7

bluez-utils-3.4-4.1mdv2007.0.src.rpm

%define version 3.4
%define subrel	1
%define release %mkrel 4
%define xinit_level 80

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
# (fc) 2.25-4mdk fix cups backend location for x86-64
Patch3:         bluez-utils-2.25-fixcups.patch
# kmobiletools backport of standard auth by pin exec prog
# http://kmobiletools.org/files/bluez-pin-exec-patch-r2.diff.bz2
Patch4:         bluez-utils-3.7-pin-exec.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 >= %version  libusb-devel
BuildRequires:  libalsa-devel
BuildRequires:  udev-tools
BuildRequires:  automake1.9
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
%patch3 -p1 -b .fixcups
%patch4 -p1 -b .auth


#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|#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

#needed by patch3
aclocal-1.9
automake-1.9

#fix build
autoconf


%build
%configure2_5x --enable-all --with-bluez-libs=%{_libdir} --disable-csrinit
%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

mkdir -p  $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit.d
cat << EOF > $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit.d/%{xinit_level}%{name}
exec %{_bindir}/passkey-agent --default /bin/bluepin
EOF
chmod 755 $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit.d/%{xinit_level}%{name}

mkdir -p $RPM_BUILD_ROOT/sbin
cp $RPM_BUILD_ROOT%{_bindir}/hidd $RPM_BUILD_ROOT/sbin/
cp $RPM_BUILD_ROOT%{_sbindir}/hcid $RPM_BUILD_ROOT/sbin/
cp hcid/passkey-agent $RPM_BUILD_ROOT%{_bindir}
cp hcid/dbus-test $RPM_BUILD_ROOT%{_bindir}/bluez-dbus-test

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

%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/bluetooth.rules
%{_sysconfdir}/udev/rules.d/60-bluetooth.rules
%{_libdir}/udev/bluetooth_serial
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/bluez-hcid.conf
%config(noreplace) %{_sysconfdir}/bluetooth
%config(noreplace) %{_sysconfdir}/rc.d/init.d/*
%config(noreplace) %{_sysconfdir}/sysconfig/*
%{_sysconfdir}/X11/xinit.d/%{xinit_level}%{name}
%{_mandir}/man*/*

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


%changelog
* Fri Jan 12 2007 Stew Benedict <sbenedict@mandriva.com> 3.4-4.1mdv2007.0
- rebuild for 2007.0 updates
- disable perl s replacements for files no longer present in %%prep

* Thu Jan 11 2007 Olivier Blin <oblin@mandriva.com> 3.4-4mdv2007.0
+ Revision: 107686
- start passkey-agent at X11 session startup (#24359)
- update passkey-agent patch to latest upstream version

* Tue Sep 12 2006 Helio Chissini de Castro <helio@mandriva.com> 3.4-3mdv2007.0
+ Revision: 61038
- Added pin helper patch to enable old non dbus behavior as a fallback

  + Nicolas Lécureuil <neoclust@mandriva.org>
    - Fix some rpmlint errors

* Thu Aug 31 2006 Nicolas Lécureuil <neoclust@mandriva.org> 3.4-1mdv2007.0
+ Revision: 58990
- New version 3.4
- import bluez-utils-3.2-2mdv2007.0


* Mon Aug 14 2006 Austin Acton <austin@mandriva.org> 3.2-2mdv2007.0
- include passkey-agent and dbus-test (#24359)

* Sun Aug 13 2006 Austin Acton <austin@mandriva.org> 3.2-1mdv2007.0
- 3.2
- drop patch 1, bluepin gone
- drop patch 2, merged upstream

* Tue Aug 01 2006 Frederic Crozat <fcrozat@mandriva.com> 2.25-6mdv2007.0
- Rebuild with latest dbus

* Fri Jun 16 2006 Austin Acton <austin@mandriva.org> 2.25-1mdv2007.0
- Rebuild

* Fri Apr 07 2006 Frederic Crozat <fcrozat@mandriva.com> 2.25-4mdk
- Fix cups backend location for x86-64

* Tue Mar 14 2006 Götz Waschk <waschk@mandriva.org> 2.25-3mdk
- rebuild for new dbus on x86_64

* Wed Jan 25 2006 Frederic Crozat <fcrozat@mandriva.com> 2.25-2mdk
- Rebuild with new dbus

* Thu Jan 19 2006 Nicolas Lécureuil <neoclust@mandriva.org> 2.25-1mdk
- New release 2.25

* Mon Jan 09 2006 Olivier Blin <oblin@mandriva.com> 2.24-4mdk
- fix typo in initscript

* Mon Jan 09 2006 Olivier Blin <oblin@mandriva.com> 2.24-3mdk
- convert parallel init to LSB (Sources 1, 2, 3, 4)

* Tue Jan 03 2006 Frederic Crozat <fcrozat@mandriva.com> 2.24-2mdk
- Update sources 1, 2, 3 with parallel init info

* Sun Dec 25 2005 Nicolas Lécureuil <neoclust@mandriva.org> 2.24-1mdk
- New release 2.24
- Remove Patch 3 : Merged upstream

* Fri Oct 28 2005 Frederic Crozat <fcrozat@mandriva.com> 2.21-3mdk
- Patch3 (Fedora): allow late use of dbus

* Fri Oct 28 2005 Frederic Crozat <fcrozat@mandriva.com> 2.21-2mdk
- Rebuild with new dbus

* Tue Oct 04 2005 Nicolas Lécureuil <neoclust@mandriva.org> 2.21-1mdk
- New release 2.21

* 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 01 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