]> git.pld-linux.org Git - packages/btsco.git/blob - btsco.spec
- release 42
[packages/btsco.git] / btsco.spec
1 #
2 # Conditional build:
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_with     verbose         # verbose build (V=1)
7 #
8 %define         rel     42
9 Summary:        Bluetooth-alsa Project
10 Summary(pl.UTF-8):      Projekt Bluetooth-alsa
11 Name:           btsco
12 Version:        0.5
13 Release:        %{rel}
14 License:        GPL
15 Group:          Applications/Sound
16 Source0:        http://dl.sourceforge.net/bluetooth-alsa/%{name}-%{version}.tgz
17 # Source0-md5:  d9fdd63a9e22ba839a41c8a9b89c2dda
18 Patch0:         %{name}-readme-pl.diff
19 Patch1:         %{name}-kernel.patch
20 Patch2:         %{name}-2.6.27.patch
21 URL:            http://sourceforge.net/projects/bluetooth-alsa/
22 %if %{with kernel}
23 %{?with_dist_kernel:BuildRequires:      kernel%{_alt_kernel}-module-build >= 3:2.6.20.2}
24 %endif
25 %if %{with userspace}
26 BuildRequires:  alsa-driver-devel >= 1.0.9-1
27 BuildRequires:  alsa-lib-devel >= 1.0.9-1
28 BuildRequires:  autoconf
29 BuildRequires:  automake
30 BuildRequires:  bluez-libs-devel >= 2.21-1
31 BuildRequires:  libao-devel >= 0.8.6-1
32 BuildRequires:  libtool
33 BuildRequires:  rpmbuild(macros) >= 1.379
34 %endif
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %description
38 This project provides a way to use a bluetooth headset with Linux. We
39 do this currently by making an alsa kernel driver which uses bluez to
40 reach the headset. It works well enough now to get voice-quality audio
41 to and from most headsets.
42
43 %description -l pl.UTF-8
44 Dzięki temu oprogramowaniu można używać zestawów słuchawkowych
45 Bluetooth Headset z Linuksem. Osiągnięto to dzięki zbudowaniu alsowego
46 modułu do jądra, który to używa systemu bluez do komunikacji z takim
47 zestawem. Współpracuje z większością zestawów, ograniczeniem w
48 komunikacji jest często urządzenie USB, które to może mieć
49 nieobsługiwane częściowo protokoły, wskazówka: hciconfig hciXXX
50 revision. W skrajnym wypadku można próbować użyć innego urządzenia
51 USB.
52
53 %package -n kernel%{_alt_kernel}-char-btsco
54 Summary:        Linux ALSA kernel driver for Bluetooth Headset
55 Summary(pl.UTF-8):      Sterownik ALSA do jądra Linuksa dla Bluetooth Headset
56 Release:        %{rel}@%{_kernel_ver_str}
57 Group:          Base/Kernel
58 %{?with_dist_kernel:%requires_releq_kernel}
59 Requires(post,postun):  /sbin/depmod
60 Requires:       kernel%{_alt_kernel}-sound-alsa
61
62 %description -n kernel%{_alt_kernel}-char-btsco
63 Linux ALSA kernel driver for Bluetooth Headset named snd_bt_sco.
64
65 %description -n kernel%{_alt_kernel}-char-btsco -l pl.UTF-8
66 Sterownik ALSA do jądra Linuksa dla Bluetooth Headset o nazwie
67 snd_bt_sco.
68
69 %prep
70 %setup -q
71 %patch0 -p1
72 %patch1 -p1
73 %patch2 -p1
74
75 %build
76 %if %{with userspace}
77 %{__libtoolize}
78 %{__aclocal}
79 %{__autoconf}
80 %{__autoheader}
81 %{__automake}
82 %configure
83 %{__make}
84 %endif
85
86 %if %{with kernel}
87 %build_kernel_modules -m snd-bt-sco -C kernel
88 %endif
89
90 %install
91 rm -rf $RPM_BUILD_ROOT
92
93 %if %{with userspace}
94 install -d $RPM_BUILD_ROOT%{_bindir}
95
96 for file in avdtp/avtest sbc/rcplay sbc/sbcenc sbc/sbcinfo a2play btsco2 btsco ; do
97         install $file $RPM_BUILD_ROOT%{_bindir}
98 done
99 %endif
100
101 %if %{with kernel}
102 %install_kernel_modules -m kernel/snd-bt-sco -d misc
103 %endif
104
105 %clean
106 rm -rf $RPM_BUILD_ROOT
107
108 %post -n kernel%{_alt_kernel}-char-btsco
109 %depmod %{_kernel_ver}
110 echo "after install this package, remember add lines like this:"
111 echo "alias snd-card-1 snd-bt-sco"
112 echo "alias sound-slot-1 snd-bt-sco"
113 echo "to %{_sysconfdir}/modprobe.conf"
114
115 %postun -n kernel%{_alt_kernel}-char-btsco
116 %depmod %{_kernel_ver}
117
118 %if %{with userspace}
119 %files
120 %defattr(644,root,root,755)
121 %doc README README.PL.txt
122 %attr(755,root,root) %{_bindir}/*
123 %endif
124
125 %if %{with kernel}
126 %files -n kernel%{_alt_kernel}-char-btsco
127 %defattr(644,root,root,755)
128 /lib/modules/%{_kernel_ver}/misc/snd-bt-sco.ko.gz
129 %endif
This page took 0.056286 seconds and 3 git commands to generate.