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)
10 Summary: Bluetooth-alsa Project
11 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
31 BuildRequires: libtool
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 This project provides a way to use a bluetooth headset with Linux. We
37 do this currently by making an alsa kernel driver which uses bluez to
38 reach the headset. It works well enough now to get voice-quality audio
39 to and from most headsets.
42 Dziêki temu oprogramowaniu mo¿na u¿ywaæ zestawów s³uchawkowych
43 Bluetooth Headset z Linuksem. Osi±gniêto to dziêki zbudowaniu alsowego
44 modu³u do j±dra, który to u¿ywa systemu bluez do komunikacji z takim
45 zestawem. Wspó³pracuje z wiêkszo¶ci± zestawów, ograniczeniem w
46 komunikacji jest czêsto urz±dzenie USB, które to mo¿e mieæ
47 nieobs³ugiwane czê¶ciowo protoko³y, wskazówka: hciconfig hciXXX
48 revision. W skrajnym wypadku mo¿na próbowaæ u¿yæ innego urz±dzenia
51 %package -n kernel-char-btsco
52 Summary: Linux ALSA kernel driver for Bluetooth Headset
53 Summary(pl): Sterownik ALSA do j±dra Linuksa dla Bluetooth Headset
54 Release: %{rel}@%{_kernel_ver_str}
56 %{?with_dist_kernel:%requires_releq_kernel_up}
57 Requires(post,postun): /sbin/depmod
58 Requires: kernel-sound-alsa
60 %description -n kernel-char-btsco
61 Linux ALSA kernel driver for Bluetooth Headset named snd_bt_sco.
63 %description -n kernel-char-btsco -l pl
64 Sterownik ALSA do j±dra Linuksa dla Bluetooth Headset o nazwie
67 %package -n kernel-smp-char-btsco
68 Summary: Linux ALSA kernel driver for Bluetooth Headset (SMP)
69 Summary(pl): Sterownik ALSA do j±dra Linuksa dla Bluetooth Headset (SMP)
70 Release: %{rel}@%{_kernel_ver_str}
72 %{?with_dist_kernel:%requires_releq_kernel_smp}
73 Requires(post,postun): /sbin/depmod
74 Requires: kernel-smp-sound-alsa
76 %description -n kernel-smp-char-btsco
77 Linux ALSA kernel (SMP) driver for Bluetooth Headset named snd_bt_sco.
79 %description -n kernel-smp-char-btsco -l pl
80 Sterownik ALSA do j±dra Linuksa SMP dla Bluetooth Headset o nazwie
101 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
102 if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
105 install -d o/include/linux
106 ln -sf %{_kernelsrcdir}/config-$cfg o/.config
107 ln -sf %{_kernelsrcdir}/Module.symvers-$cfg o/Module.symvers
108 ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h o/include/linux/autoconf.h
109 %if %{with dist_kernel}
110 %{__make} -C %{_kernelsrcdir} O=$PWD/o prepare scripts
112 install -d o/include/config
113 touch o/include/config/MARKER
114 ln -sf %{_kernelsrcdir}/scripts o/scripts
117 # patching/creating makefile(s) (optional)
118 %{__make} -C %{_kernelsrcdir} clean \
119 RCS_FIND_IGNORE="-name '*.ko' -o" \
120 SYSSRC=%{_kernelsrcdir} \
124 %{__make} -C %{_kernelsrcdir} modules \
125 CC="%{__cc}" CPP="%{__cpp}" \
126 SYSSRC=%{_kernelsrcdir} \
132 mod=$(echo "$mod" | sed -e 's#\.ko##g')
133 mv $mod.ko ../$mod-$cfg.ko
139 rm -rf $RPM_BUILD_ROOT
141 %if %{with userspace}
142 install -d $RPM_BUILD_ROOT%{_bindir}
144 for file in avdtp/avtest sbc/rcplay sbc/sbcenc sbc/sbcinfo a2play btsco2 btsco ; do
145 install $file $RPM_BUILD_ROOT%{_bindir}
150 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
151 %if %{without dist_kernel}
152 for mod in *-nondist.ko; do
153 nmod=$(echo "$mod" | sed -e 's#-nondist##g')
155 install $mod $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/$nmod
158 for mod in *-up.ko; do
159 nmod=$(echo "$mod" | sed -e 's#-up##g')
161 install $mod $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/$nmod
166 for mod in *-smp.ko; do
167 nmod=$(echo "$mod" | sed -e 's#-smp##g')
169 install $mod $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/$nmod
175 rm -rf $RPM_BUILD_ROOT
177 %post -n kernel-char-btsco
178 %depmod %{_kernel_ver}
179 echo "after install this package, remember add lines like this:"
180 echo "alias snd-card-1 snd-bt-sco"
181 echo "alias sound-slot-1 snd-bt-sco"
182 echo "to %{_sysconfdir}/modprobe.conf"
184 %postun -n kernel-char-btsco
185 %depmod %{_kernel_ver}
187 %post -n kernel-smp-char-btsco
188 %depmod %{_kernel_ver}smp
189 echo "after install this package, remember add lines like this:"
190 echo "alias snd-card-1 snd-bt-sco"
191 echo "alias sound-slot-1 snd-bt-sco"
192 echo "to %{_sysconfdir}/modprobe.conf"
194 %postun -n kernel-smp-char-btsco
195 %depmod %{_kernel_ver}smp
197 %if %{with userspace}
199 %defattr(644,root,root,755)
200 %doc README README.PL.txt
201 %attr(755,root,root) %{_bindir}/*
205 %files -n kernel-char-btsco
206 %defattr(644,root,root,755)
207 /lib/modules/%{_kernel_ver}/misc/snd-bt-sco.ko.gz
211 %files -n kernel-smp-char-btsco
212 %defattr(644,root,root,755)
213 /lib/modules/%{_kernel_ver}smp/misc/snd-bt-sco.ko.gz