]> git.pld-linux.org Git - packages/btsco.git/blob - btsco.spec
- use new kernel macros
[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     1
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 URL:            http://sourceforge.net/projects/bluetooth-alsa/
20 %if %{with kernel}
21 %{?with_dist_kernel:BuildRequires:      kernel%{_alt_kernel}-module-build}
22 %endif
23 %if %{with userspace}
24 BuildRequires:  alsa-driver-devel >= 1.0.9-1
25 BuildRequires:  alsa-lib-devel >= 1.0.9-1
26 BuildRequires:  autoconf
27 BuildRequires:  automake
28 BuildRequires:  bluez-libs-devel >= 2.21-1
29 BuildRequires:  libao-devel >= 0.8.6-1
30 BuildRequires:  libtool
31 BuildRequires:  rpmbuild(macros) >= 1.379
32 %endif
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %description
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.
40
41 %description -l pl.UTF-8
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
49 USB.
50
51 %package -n kernel%{_alt_kernel}-char-btsco
52 Summary:        Linux ALSA kernel driver for Bluetooth Headset
53 Summary(pl.UTF-8):      Sterownik ALSA do jądra Linuksa dla Bluetooth Headset
54 Release:        %{rel}@%{_kernel_ver_str}
55 Group:          Base/Kernel
56 %{?with_dist_kernel:%requires_releq_kernel}
57 Requires(post,postun):  /sbin/depmod
58 Requires:       kernel%{_alt_kernel}-sound-alsa
59
60 %description -n kernel%{_alt_kernel}-char-btsco
61 Linux ALSA kernel driver for Bluetooth Headset named snd_bt_sco.
62
63 %description -n kernel%{_alt_kernel}-char-btsco -l pl.UTF-8
64 Sterownik ALSA do jądra Linuksa dla Bluetooth Headset o nazwie
65 snd_bt_sco.
66
67 %prep
68 %setup -q
69 %patch0 -p1
70
71 %build
72 %if %{with userspace}
73 %{__aclocal}
74 %{__autoconf}
75 %{__autoheader}
76 %{__automake}
77 %configure
78
79 %{__make}
80 %endif
81
82 %if %{with kernel}
83 %build_kernel_modules -m snd-bt-sco -C kernel
84 %endif
85
86 %install
87 rm -rf $RPM_BUILD_ROOT
88
89 %if %{with userspace}
90 install -d $RPM_BUILD_ROOT%{_bindir}
91
92 for file in avdtp/avtest sbc/rcplay sbc/sbcenc sbc/sbcinfo a2play btsco2 btsco ; do
93         install $file $RPM_BUILD_ROOT%{_bindir}
94 done
95 %endif
96
97 %if %{with kernel}
98 %install_kernel_modules -m kernel/snd-bt-sco -d misc
99 %endif
100
101 %clean
102 rm -rf $RPM_BUILD_ROOT
103
104 %post -n kernel%{_alt_kernel}-char-btsco
105 %depmod %{_kernel_ver}
106 echo "after install this package, remember add lines like this:"
107 echo "alias snd-card-1 snd-bt-sco"
108 echo "alias sound-slot-1 snd-bt-sco"
109 echo "to %{_sysconfdir}/modprobe.conf"
110
111 %postun -n kernel%{_alt_kernel}-char-btsco
112 %depmod %{_kernel_ver}
113
114 %if %{with userspace}
115 %files
116 %defattr(644,root,root,755)
117 %doc README README.PL.txt
118 %attr(755,root,root) %{_bindir}/*
119 %endif
120
121 %if %{with kernel}
122 %files -n kernel%{_alt_kernel}-char-btsco
123 %defattr(644,root,root,755)
124 /lib/modules/%{_kernel_ver}/misc/snd-bt-sco.ko.gz
125 %endif
This page took 0.453247 seconds and 4 git commands to generate.