3 %bcond_without dist_kernel # without kernel from distribution
4 %bcond_without kernel # don't build kernel modules
5 %bcond_without userspace # don't build userspace utilities
6 %bcond_without smp # don't build SMP module
7 %bcond_with verbose # verbose build (V=1)
9 Summary: Bluetooth-alsa Project
10 Summary(pl): Projekt Bluetooth-alsa
16 Group: Applications/Sound
17 Source0: http://dl.sourceforge.net/bluetooth-alsa/%{name}-%{version}.tar.gz
18 # Source0-md5: 3f46d45db6f0e399044ae6a31b1f23c7
19 Patch0: %{name}-readme-pl.diff
20 URL: http://sourceforge.net/projects/bluetooth-alsa/
21 BuildRequires: autoconf
22 BuildRequires: automake
23 BuildRequires: libtool
25 %{?with_dist_kernel:BuildRequires: kernel-module-build}
28 BuildRequires: alsa-driver-devel >= 1.0.9-1
29 BuildRequires: alsa-lib-devel >= 1.0.9-1
30 BuildRequires: bluez-libs-devel >= 2.21-1
31 BuildRequires: libao-devel >= 0.8.6-1
33 ExclusiveArch: %{ix86}
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 This project provides a way to use a bluetooth headset with Linux. We
38 do this currently by making an alsa kernel driver which uses bluez to
39 reach the headset. It works well enough now to get voice-quality audio
40 to and from most headsets.
43 Dziêki temu oprogramowaniu mo¿na u¿ywaæ zestawów s³uchawkowych
44 Bluetooth Headset z Linuksem. Osi±gniêto to dziêki zbudowaniu alsowego
45 modu³u do j±dra, który to u¿ywa systemu bluez do komunikacji z takim
46 zestawem. Wspó³pracuje z wiêkszo¶ci± zestawów, ograniczeniem w
47 komunikacji jest czêsto urz±dzenie USB, które to mo¿e mieæ
48 nieobs³ugiwane czê¶ciowo protoko³y, wskazówka: hciconfig hciXXX
49 revision. W skrajnym wypadku mo¿na próbowaæ u¿yæ innego urz±dzenia
52 %package -n kernel-char-btsco
53 Summary: Linux ALSA kernel driver for Bluetooth Headset
54 Summary(pl): Sterownik ALSA do j±dra Linuksa dla Bluetooth Headset
55 Release: %{rel}@%{_kernel_ver_str}
57 %{?with_dist_kernel:%requires_releq_kernel_up}
58 Requires(post,postun): /sbin/depmod
59 Requires: kernel-sound-alsa
61 %description -n kernel-char-btsco
62 Linux ALSA kernel driver for Bluetooth Headset named snd_bt_sco.
64 %description -n kernel-char-btsco -l pl
65 Sterownik ALSA do j±dra Linuksa dla Bluetooth Headset o nazwie
68 %package -n kernel-smp-char-btsco
69 Summary: Linux ALSA kernel driver for Bluetooth Headset (SMP)
70 Summary(pl): Sterownik ALSA do j±dra Linuksa dla Bluetooth Headset (SMP)
71 Release: %{rel}@%{_kernel_ver_str}
73 %{?with_dist_kernel:%requires_releq_kernel_smp}
74 Requires(post,postun): /sbin/depmod
75 Requires: kernel-smp-sound-alsa
77 %description -n kernel-smp-char-btsco
78 Linux ALSA kernel (SMP) driver for Bluetooth Headset named snd_bt_sco.
80 %description -n kernel-smp-char-btsco -l pl
81 Sterownik ALSA do j±dra Linuksa SMP dla Bluetooth Headset o nazwie
102 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
103 if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
107 install -d include/{linux,config}
108 ln -sf %{_kernelsrcdir}/config-$cfg .config
109 ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h include/linux/autoconf.h
110 ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
111 ln -sf %{_kernelsrcdir}/Module.symvers-$cfg Module.symvers
112 touch include/config/MARKER
114 # patching/creating makefile(s) (optional)
115 %{__make} -C %{_kernelsrcdir} clean \
116 RCS_FIND_IGNORE="-name '*.ko' -o" \
119 %{__make} -C %{_kernelsrcdir} modules \
120 CC="%{__cc}" CPP="%{__cpp}" \
124 mod=$(echo "$mod" | sed -e 's#\.ko##g')
125 mv $mod.ko ../$mod-$cfg.ko
131 rm -rf $RPM_BUILD_ROOT
133 %if %{with userspace}
134 install -d $RPM_BUILD_ROOT%{_bindir}
136 for file in avdtp/avtest sbc/rcplay sbc/sbcenc sbc/sbcinfo a2play btsco2 btsco ; do
137 install $file $RPM_BUILD_ROOT%{_bindir}
142 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
143 %if %{without dist_kernel}
144 for mod in *-nondist.ko; do
145 nmod=$(echo "$mod" | sed -e 's#-nondist##g')
147 install $mod $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/$nmod
150 for mod in *-up.ko; do
151 nmod=$(echo "$mod" | sed -e 's#-up##g')
153 install $mod $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/$nmod
158 for mod in *-smp.ko; do
159 nmod=$(echo "$mod" | sed -e 's#-smp##g')
161 install $mod $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/$nmod
167 rm -rf $RPM_BUILD_ROOT
169 %post -n kernel-char-btsco
170 %depmod %{_kernel_ver}
171 echo "after install this package, remember add lines like this:"
172 echo "alias snd-card-1 snd-bt-sco"
173 echo "alias sound-slot-1 snd-bt-sco"
174 echo "to %{_sysconfdir}/modprobe.conf"
176 %postun -n kernel-char-btsco
177 %depmod %{_kernel_ver}
179 %post -n kernel-smp-char-btsco
180 %depmod %{_kernel_ver}
181 echo "after install this package, remember add lines like this:"
182 echo "alias snd-card-1 snd-bt-sco"
183 echo "alias sound-slot-1 snd-bt-sco"
184 echo "to %{_sysconfdir}/modprobe.conf"
186 %postun -n kernel-smp-char-btsco
187 %depmod %{_kernel_ver}
189 %if %{with userspace}
191 %defattr(644,root,root,755)
192 %doc COPYING README README.PL.txt NEWS AUTHORS ChangeLog INSTALL
193 %attr(755,root,root) %{_bindir}/*
197 %files -n kernel-char-btsco
198 %defattr(644,root,root,755)
199 /lib/modules/%{_kernel_ver}/misc/snd-bt-sco.ko.gz
203 %files -n kernel-smp-char-btsco
204 %defattr(644,root,root,755)
205 /lib/modules/%{_kernel_ver}smp/misc/snd-bt-sco.ko.gz