]> git.pld-linux.org Git - packages/bluez.git/blob - bluez.spec
- up to 5.0 (note: rather big changes, packaging needs finishing; bluez 4.x left...
[packages/bluez.git] / bluez.spec
1 # TODO:
2 # - verify/update bluetooth init script
3 # - update (or drop if it's no longer applicable) rfcomm init script
4 # - separate obexd here? / separate -client in obexd.spec
5 Summary:        Bluetooth utilities
6 Summary(pl.UTF-8):      Narzędzia Bluetooth
7 Name:           bluez
8 Version:        5.0
9 Release:        0.1
10 License:        GPL v2+
11 Group:          Applications/System
12 #Source0Download: http://www.bluez.org/download.html
13 Source0:        http://www.kernel.org/pub/linux/bluetooth/%{name}-%{version}.tar.xz
14 # Source0-md5:  03230ccf44536087653b56a45c99e2b4
15 Source1:        %{name}.init
16 Source2:        %{name}.sysconfig
17 # FIXME: rfcomm.conf no longer supported
18 Source5:        rfcomm.init
19 Patch0:         %{name}-wacom-mode-2.patch
20 Patch1:         %{name}-audio_socket.patch
21 Patch2:         %{name}-am.patch
22 URL:            http://www.bluez.org/
23 BuildRequires:  autoconf >= 2.60
24 BuildRequires:  automake
25 BuildRequires:  check-devel >= 0.9.6
26 BuildRequires:  dbus-devel >= 1.4
27 BuildRequires:  glib2-devel >= 1:2.28
28 BuildRequires:  libical-devel
29 BuildRequires:  libtool
30 BuildRequires:  libusb-compat-devel >= 0.1
31 BuildRequires:  pkgconfig >= 1:0.9.0
32 BuildRequires:  readline-devel
33 BuildRequires:  rpmbuild(macros) >= 1.626
34 BuildRequires:  systemd-units >= 38
35 BuildRequires:  tar >= 1:1.22
36 BuildRequires:  udev-devel >= 1:143
37 BuildRequires:  xz
38 Requires(post,preun,postun):    systemd-units >= 38
39 Requires:       %{name}-libs = %{version}-%{release}
40 Requires:       dbus-libs >= 1.4
41 Requires:       glib2 >= 1:2.28
42 Requires:       hwdata >= 0.225
43 Requires:       rc-scripts
44 Requires:       systemd-units >= 38
45 Requires:       udev >= 1:143
46 Provides:       bluez-hcidump = %{version}
47 Provides:       bluez-utils = %{version}-%{release}
48 Provides:       obexd = %{version}
49 # moved somewhere or dropped?
50 #Obsoletes:     alsa-plugins-bluetooth
51 Obsoletes:      bluez-hcidump
52 Obsoletes:      bluez-hciemu
53 Obsoletes:      bluez-pan
54 Obsoletes:      bluez-sdp
55 Obsoletes:      bluez-systemd
56 Obsoletes:      bluez-utils
57 Obsoletes:      bluez-utils-init
58 Obsoletes:      obexd
59 # moved somewhere or dropped?
60 #Obsoletes:     gstreamer-bluetooth < 4.101-3
61 #Obsoletes:     gstreamer0.10-bluetooth < 5
62 Conflicts:      bluez-bluefw
63 ExcludeArch:    s390 s390x
64 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
65
66 # currently lib, not %{_lib} (see cups.spec)
67 %define         cupsdir         /usr/lib/cups/backend
68 %define         udevdir         /lib/udev
69
70 %description
71 Bluetooth utilities:
72  - bluetoothd
73  - hciattach
74  - hciconfig
75  - hcidump
76  - hcitool
77  - l2ping
78  - start scripts (PLD)
79
80 The BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A.
81
82 %description -l pl.UTF-8
83 Narzędzia Bluetooth:
84  - bluetoothd
85  - hciattach
86  - hciconfig
87  - hcidump
88  - hcitool
89  - l2ping
90  - skrypty startowe (PLD)
91
92 Znaki towarowe BLUETOOTH są własnością Bluetooth SIG, Inc. z USA.
93
94 %package -n cups-backend-bluetooth
95 Summary:        Bluetooth backend for CUPS
96 Summary(pl.UTF-8):      Backend Bluetooth dla CUPS-a
97 Group:          Applications/Printing
98 Requires:       bluez-libs >= %{version}-%{release}
99 Requires:       cups
100
101 %description -n cups-backend-bluetooth
102 Bluetooth backend for CUPS.
103
104 %description -n cups-backend-bluetooth -l pl.UTF-8
105 Backend Bluetooth dla CUPS-a.
106
107 %package libs
108 Summary:        Bluetooth libraries
109 Summary(pl.UTF-8):      Biblioteki Bluetooth
110 Group:          Libraries
111 Obsoletes:      bluez-sdp
112
113 %description libs
114 Libraries for use in Bluetooth applications.
115
116 The BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A.
117
118 %description libs -l pl.UTF-8
119 Biblioteki do używania w aplikacjach Bluetooth.
120
121 Znaki towarowe BLUETOOTH są własnością Bluetooth SIG, Inc. z USA.
122
123 %package libs-devel
124 Summary:        Header files for Bluetooth applications
125 Summary(pl.UTF-8):      Pliki nagłówkowe dla aplikacji Bluetooth
126 Group:          Development/Libraries
127 Requires:       %{name}-libs = %{version}-%{release}
128 Obsoletes:      bluez-sdp-devel
129
130 %description libs-devel
131 bluez-libs-devel contains header files for use in Bluetooth
132 applications.
133
134 %description libs-devel -l pl.UTF-8
135 Ten pakiet zawiera pliki nagłówkowe do używania w aplikacjach
136 Bluetooth.
137
138 %package libs-static
139 Summary:        Static Bluetooth libraries
140 Summary(pl.UTF-8):      Biblioteki statyczne Bluetooth
141 Group:          Development/Libraries
142 Requires:       %{name}-libs-devel = %{version}-%{release}
143 Obsoletes:      bluez-sdp-static
144
145 %description libs-static
146 bluez-libs-static contains development static libraries for use in
147 Bluetooth applications.
148
149 %description libs-static -l pl.UTF-8
150 Ten pakiet zawiera biblioteki statyczne, których można używać do
151 aplikacji Bluetooth.
152
153 %prep
154 %setup -q
155 %patch0 -p1
156 %patch1 -p1
157 %patch2 -p1
158
159 %build
160 %{__libtoolize}
161 %{__aclocal}
162 %{__autoconf}
163 %{__autoheader}
164 %{__automake}
165 %configure \
166         --disable-silent-rules \
167         --enable-library \
168         --enable-static
169 # these options are broken; BR systemd instead
170 #       --with-systemdsystemunitdir=%{systemdunitdir} \
171 #       --with-systemduserunitdir=%{_prefix}/lib/systemd/user \
172
173 %{__make} \
174         cupsdir=%{cupsdir} \
175         rulesdir=%{udevdir}/rules.d \
176         udevdir=%{udevdir}
177
178 %install
179 rm -rf $RPM_BUILD_ROOT
180 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} \
181         $RPM_BUILD_ROOT{%{_libdir}/bluetooth/plugins,%{_sysconfdir}/bluetooth}
182
183 %{__make} install \
184         DESTDIR=$RPM_BUILD_ROOT \
185         cupsdir=%{cupsdir} \
186         rulesdir=%{udevdir}/rules.d \
187         udevdir=%{udevdir}
188
189 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/bluetooth
190 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/bluetooth
191 install %{SOURCE5} $RPM_BUILD_ROOT/etc/rc.d/init.d/rfcomm
192
193 install profiles/audio/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/bluetooth
194 install profiles/input/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/bluetooth
195 install profiles/network/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/bluetooth
196 install profiles/proximity/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/bluetooth
197
198 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libbluetooth.la
199
200 %clean
201 rm -rf $RPM_BUILD_ROOT
202
203 %post
204 /sbin/chkconfig --add bluetooth
205 /sbin/chkconfig --add rfcomm
206 %service bluetooth restart
207 %service rfcomm restart
208 %systemd_post bluetooth.service
209
210 %preun
211 if [ "$1" = "0" ]; then
212         %service bluetooth stop
213         %service rfcomm stop
214         /sbin/chkconfig --del bluetooth
215         /sbin/chkconfig --del rfcomm
216 fi
217 %systemd_preun bluetooth.service
218
219 %postun
220 %systemd_reload
221
222 %triggerpostun -- bluez < 4.98-3
223 %systemd_trigger bluetooth.service
224
225 %post   libs -p /sbin/ldconfig
226 %postun libs -p /sbin/ldconfig
227
228 %files
229 %defattr(644,root,root,755)
230 %doc AUTHORS ChangeLog README
231 %attr(755,root,root) %{_bindir}/bccmd
232 %attr(755,root,root) %{_bindir}/bluetoothctl
233 %attr(755,root,root) %{_bindir}/btmon
234 %attr(755,root,root) %{_bindir}/ciptool
235 %attr(755,root,root) %{_bindir}/hciattach
236 %attr(755,root,root) %{_bindir}/hciconfig
237 %attr(755,root,root) %{_bindir}/hcidump
238 %attr(755,root,root) %{_bindir}/hcitool
239 %attr(755,root,root) %{_bindir}/l2ping
240 %attr(755,root,root) %{_bindir}/l2test
241 %attr(755,root,root) %{_bindir}/rctest
242 %attr(755,root,root) %{_bindir}/rfcomm
243 %attr(755,root,root) %{_bindir}/sdptool
244 %dir %{_libdir}/bluetooth
245 %attr(755,root,root) %{_libdir}/bluetooth/bluetoothd
246 %attr(755,root,root) %{_libdir}/bluetooth/obexd
247 %dir %{_libdir}/bluetooth/plugins
248 %dir %{_sysconfdir}/bluetooth
249 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bluetooth/audio.conf
250 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bluetooth/input.conf
251 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bluetooth/network.conf
252 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bluetooth/proximity.conf
253 %attr(754,root,root) /etc/rc.d/init.d/bluetooth
254 %attr(754,root,root) /etc/rc.d/init.d/rfcomm
255 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bluetooth
256 %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.d/bluetooth.conf
257 %{systemdunitdir}/bluetooth.service
258 %{_prefix}/lib/systemd/user/obex.service
259 %{_datadir}/dbus-1/system-services/org.bluez.service
260 %{_datadir}/dbus-1/services/org.bluez.obex.service
261 %attr(755,root,root) %{udevdir}/hid2hci
262 %{udevdir}/rules.d/97-hid2hci.rules
263 %{_mandir}/man1/bccmd.1*
264 %{_mandir}/man1/ciptool.1*
265 %{_mandir}/man1/hciattach.1*
266 %{_mandir}/man1/hciconfig.1*
267 %{_mandir}/man1/hcidump.1*
268 %{_mandir}/man1/hcitool.1*
269 %{_mandir}/man1/hid2hci.1*
270 %{_mandir}/man1/l2ping.1*
271 %{_mandir}/man1/rctest.1*
272 %{_mandir}/man1/rfcomm.1*
273 %{_mandir}/man1/sdptool.1*
274 %{_mandir}/man8/bluetoothd.8*
275
276 %files -n cups-backend-bluetooth
277 %defattr(644,root,root,755)
278 %attr(755,root,root) %{_prefix}/lib/cups/backend/bluetooth
279
280 %files libs
281 %defattr(644,root,root,755)
282 %attr(755,root,root) %{_libdir}/libbluetooth.so.*.*.*
283 %attr(755,root,root) %ghost %{_libdir}/libbluetooth.so.3
284
285 %files libs-devel
286 %defattr(644,root,root,755)
287 %attr(755,root,root) %{_libdir}/libbluetooth.so
288 %{_includedir}/bluetooth
289 %{_pkgconfigdir}/bluez.pc
290
291 %files libs-static
292 %defattr(644,root,root,755)
293 %{_libdir}/libbluetooth.a
This page took 0.092782 seconds and 3 git commands to generate.