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: 111efb0f7092c92c4dd376eec96aa2e7
19 Patch0: %{name}-readme-pl.diff
20 URL: http://sourceforge.net/projects/bluetooth-alsa/
22 %{?with_dist_kernel:BuildRequires: kernel-module-build}
25 BuildRequires: alsa-driver-devel >= 1.0.9-1
26 BuildRequires: alsa-lib-devel >= 1.0.9-1
27 BuildRequires: autoconf
28 BuildRequires: automake
29 BuildRequires: bluez-libs-devel >= 2.21-1
30 BuildRequires: libao-devel >= 0.8.6-1
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 This project provides a way to use a bluetooth headset with Linux. We
36 do this currently by making an alsa kernel driver which uses bluez to
37 reach the headset. It works well enough now to get voice-quality audio
38 to and from most headsets.
41 Dziêki temu oprogramowaniu mo¿na u¿ywaæ zestawów s³uchawkowych
42 Bluetooth Headset z Linuksem. Osi±gniêto to dziêki zbudowaniu alsowego
43 modu³u do j±dra, który to u¿ywa systemu bluez do komunikacji z takim
44 zestawem. Wspó³pracuje z wiêkszo¶ci± zestawów, ograniczeniem w
45 komunikacji jest czêsto urz±dzenie USB, które to mo¿e mieæ
46 nieobs³ugiwane czê¶ciowo protoko³y, wskazówka: hciconfig hciXXX
47 revision. W skrajnym wypadku mo¿na próbowaæ u¿yæ innego urz±dzenia
50 %package -n kernel-char-btsco
51 Summary: Linux ALSA kernel driver for Bluetooth Headset
52 Summary(pl): Sterownik ALSA do j±dra Linuksa dla Bluetooth Headset
53 Release: %{rel}@%{_kernel_ver_str}
55 %{?with_dist_kernel:%requires_releq_kernel_up}
56 Requires(post,postun): /sbin/depmod
57 Requires: kernel-sound-alsa
59 %description -n kernel-char-btsco
60 Linux ALSA kernel driver for Bluetooth Headset named snd_bt_sco.
62 %description -n kernel-char-btsco -l pl
63 Sterownik ALSA do j±dra Linuksa dla Bluetooth Headset o nazwie
66 %package -n kernel-smp-char-btsco
67 Summary: Linux ALSA kernel driver for Bluetooth Headset (SMP)
68 Summary(pl): Sterownik ALSA do j±dra Linuksa dla Bluetooth Headset (SMP)
69 Release: %{rel}@%{_kernel_ver_str}
71 %{?with_dist_kernel:%requires_releq_kernel_smp}
72 Requires(post,postun): /sbin/depmod
73 Requires: kernel-smp-sound-alsa
75 %description -n kernel-smp-char-btsco
76 Linux ALSA kernel (SMP) driver for Bluetooth Headset named snd_bt_sco.
78 %description -n kernel-smp-char-btsco -l pl
79 Sterownik ALSA do j±dra Linuksa SMP dla Bluetooth Headset o nazwie
100 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
101 if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
104 install -d o/include/linux
105 ln -sf %{_kernelsrcdir}/config-$cfg o/.config
106 ln -sf %{_kernelsrcdir}/Module.symvers-$cfg o/Module.symvers
107 ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h o/include/linux/autoconf.h
108 %if %{with dist_kernel}
109 %{__make} -C %{_kernelsrcdir} O=$PWD/o prepare scripts
111 install -d o/include/config
112 touch o/include/config/MARKER
113 ln -sf %{_kernelsrcdir}/scripts o/scripts
116 # patching/creating makefile(s) (optional)
117 %{__make} -C %{_kernelsrcdir} clean \
118 RCS_FIND_IGNORE="-name '*.ko' -o" \
119 SYSSRC=%{_kernelsrcdir} \
123 %{__make} -C %{_kernelsrcdir} modules \
124 CC="%{__cc}" CPP="%{__cpp}" \
125 SYSSRC=%{_kernelsrcdir} \
131 mod=$(echo "$mod" | sed -e 's#\.ko##g')
132 mv $mod.ko ../$mod-$cfg.ko
138 rm -rf $RPM_BUILD_ROOT
140 %if %{with userspace}
141 install -d $RPM_BUILD_ROOT%{_bindir}
143 for file in avdtp/avtest sbc/rcplay sbc/sbcenc sbc/sbcinfo a2play btsco2 btsco ; do
144 install $file $RPM_BUILD_ROOT%{_bindir}
149 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
150 %if %{without dist_kernel}
151 for mod in *-nondist.ko; do
152 nmod=$(echo "$mod" | sed -e 's#-nondist##g')
154 install $mod $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/$nmod
157 for mod in *-up.ko; do
158 nmod=$(echo "$mod" | sed -e 's#-up##g')
160 install $mod $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/$nmod
165 for mod in *-smp.ko; do
166 nmod=$(echo "$mod" | sed -e 's#-smp##g')
168 install $mod $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/$nmod
174 rm -rf $RPM_BUILD_ROOT
176 %post -n kernel-char-btsco
177 %depmod %{_kernel_ver}
178 echo "after install this package, remember add lines like this:"
179 echo "alias snd-card-1 snd-bt-sco"
180 echo "alias sound-slot-1 snd-bt-sco"
181 echo "to %{_sysconfdir}/modprobe.conf"
183 %postun -n kernel-char-btsco
184 %depmod %{_kernel_ver}
186 %post -n kernel-smp-char-btsco
187 %depmod %{_kernel_ver}smp
188 echo "after install this package, remember add lines like this:"
189 echo "alias snd-card-1 snd-bt-sco"
190 echo "alias sound-slot-1 snd-bt-sco"
191 echo "to %{_sysconfdir}/modprobe.conf"
193 %postun -n kernel-smp-char-btsco
194 %depmod %{_kernel_ver}smp
196 %if %{with userspace}
198 %defattr(644,root,root,755)
199 %doc README README.PL.txt
200 %attr(755,root,root) %{_bindir}/*
204 %files -n kernel-char-btsco
205 %defattr(644,root,root,755)
206 /lib/modules/%{_kernel_ver}/misc/snd-bt-sco.ko.gz
210 %files -n kernel-smp-char-btsco
211 %defattr(644,root,root,755)
212 /lib/modules/%{_kernel_ver}smp/misc/snd-bt-sco.ko.gz