/[packages]/cauldron/bluez/current/SPECS/bluez.spec
ViewVC logotype

Contents of /cauldron/bluez/current/SPECS/bluez.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 273158 - (show annotations) (download)
Sat Jul 21 17:42:31 2012 UTC (11 years, 8 months ago) by colin
File size: 8066 byte(s)
Update for usrmove
1 %define major 3
2 %define libname %mklibname %{name} %{major}
3 %define devname %mklibname -d %{name}
4
5 Name: bluez
6 Summary: Official Linux Bluetooth protocol stack
7 Version: 4.101
8 Release: %mkrel 2
9 License: GPLv2+
10 Group: Communications
11 URL: http://bluez.org/
12 Source0: http://www.kernel.org/pub/linux/bluetooth/%{name}-%{version}.tar.xz
13 Source6: pand.conf
14 Source7: dund.conf
15 Source8: hidd.conf
16 Source9: rfcomm.conf
17
18 # (cg) Mageia+Friends Patches
19 Patch0500: 0500-Add-support-for-CF-Personal-Network-Card-Rev-2.5-fro.patch
20 Patch0501: 0501-Add-sixaxis-cable-pairing-plugin.patch
21 Patch0502: 0502-systemd-Use-standard-argument-name-for-systemd.patch
22 Patch0503: 0503-systemd-Fix-unit-to-correct-path-to-bluetoothd.patch
23
24
25 BuildRequires: dbus-devel
26 BuildRequires: flex
27 BuildRequires: bison
28 BuildRequires: libusb-devel
29 BuildRequires: libalsa-devel
30 BuildRequires: readline-devel
31 BuildRequires: udev
32 BuildRequires: libgstreamer0.10-plugins-base-devel
33 BuildRequires: gstreamer0.10-devel
34 BuildRequires: expat-devel
35 BuildRequires: udev-devel
36 BuildRequires: libcap-ng-devel
37 BuildRequires: pkgconfig(systemd)
38 # for simple-agent
39 Requires: python-gobject
40 Requires: bluez-pin
41 Requires: obex-data-server
42 Requires(pre): filesystem >= 2.1.9-18
43 Requires(post): rpm-helper >= 0.24.8-1
44 Requires(preun): rpm-helper >= 0.24.8-1
45 Suggests: bluez-firmware
46
47 %description
48 These are the official Bluetooth communication libraries for Linux.
49
50 %post
51 update-alternatives --install /bin/bluepin bluepin /usr/bin/bluepin 5
52 #migrate old configuration
53 if [ "$1" = "2" -a -d %{_var}/lib/lib/bluetooth ]; then
54 mv -f %{_var}/lib/lib/bluetooth/* %{_var}/lib/bluetooth/ > /dev/null 2>&1 || exit 0
55 rmdir %{_var}/lib/lib/bluetooth/ > /dev/null 2>&1 || exit 0
56 rmdir %{_var}/lib/lib/ > /dev/null 2>&1 || exit 0
57 fi
58 %_post_service bluetooth
59
60 %postun
61 if [ "$1" = "0" ]; then
62 update-alternatives --remove bluepin /usr/bin/bluepin
63 fi
64
65 %files
66 %{_bindir}/*
67 %{_sbindir}/*
68 %{_mandir}/man?/*
69 %exclude %{_mandir}/man8/hid2hci.8*
70 %config(noreplace) %{_sysconfdir}/sysconfig/*
71 %config(noreplace) %{_sysconfdir}/dbus-1/system.d/*.conf
72 %config(noreplace) %{_sysconfdir}/bluetooth
73 /lib/udev/bluetooth_serial
74 /lib/udev/rules.d/97-bluetooth-serial.rules
75 %{_localstatedir}/lib/bluetooth
76 %{_unitdir}/bluetooth.service
77 %{_datadir}/dbus-1/system-services/org.bluez.service
78
79 #--------------------------------------------------------------------
80
81 %package cups
82 Summary: CUPS printer backend for Bluetooth printers
83 Group: System/Servers
84 Requires: cups
85
86 %description cups
87 This package contains the CUPS backend for Bluetooth printers.
88
89 %files cups
90 %{_prefix}/lib/cups/backend/bluetooth
91
92 #--------------------------------------------------------------------
93
94 %package gstreamer
95 Summary: Gstreamer support for SBC audio format
96 Group: Sound
97
98 %description gstreamer
99 This package contains gstreamer plugins for the Bluetooth SBC audio format
100
101 %files gstreamer
102 %{_libdir}/gstreamer-*/*.so
103
104 #--------------------------------------------------------------------
105
106 %package alsa
107 Summary: ALSA support for Bluetooth audio devices
108 Group: Sound
109
110 %description alsa
111 This package contains ALSA support for Bluetooth audio devices
112
113 %files alsa
114 %{_libdir}/alsa-lib/*.so
115 %{_datadir}/alsa/bluetooth.conf
116
117 #--------------------------------------------------------------------
118
119 %package hid2hci
120 Summary: Put HID proxying bluetooth HCI's into HCI mode
121 Group: Communications
122 Conflicts: %{name} < 4.99-1
123 Requires(post): filesystem >= 2.1.9-18
124
125 %description hid2hci
126 Most allinone PC's and bluetooth keyboard / mouse sets which include a
127 bluetooth dongle, ship with a so called HID proxying bluetooth HCI.
128 The HID proxying makes the keyboard / mouse show up as regular USB HID
129 devices (after connecting using the connect button on the device + keyboard),
130 which makes them work without requiring any manual configuration.
131
132 The bluez-hid2hci package contains the hid2hci utility and udev rules to
133 automatically switch supported Bluetooth devices into regular HCI mode.
134
135 Install this package if you want to use the bluetooth function of the HCI
136 with other bluetooth devices like for example a mobile phone.
137
138 Note that after installing this package you will first need to pair your
139 bluetooth keyboard and mouse with the bluetooth adapter before you can use
140 them again. Since you cannot use your bluetooth keyboard and mouse until
141 they are paired, this will require the use of a regular (wired) USB keyboard
142 and mouse.
143
144 %files hid2hci
145 /lib/udev/hid2hci
146 /lib/udev/rules.d/97-bluetooth-hid2hci.rules
147 %{_mandir}/man8/hid2hci.8*
148
149 %post hid2hci
150 %{_bindir}/udevadm trigger --subsystem-match=usb
151
152 #--------------------------------------------------------------------
153
154 %package -n %{libname}
155 Summary: Official Linux Bluetooth protocol stack
156 Group: System/Libraries
157 Requires(pre): filesystem >= 2.1.9-18
158
159 %description -n %{libname}
160 These are the official Bluetooth communication libraries for Linux.
161
162 %files -n %{libname}
163 %{_libdir}/lib*.so.%{major}*
164
165 #--------------------------------------------------------------------
166
167 %package -n %{devname}
168 Summary: Headers for developing programs that will use %name
169 Group: Development/C++
170 Requires(pre): filesystem >= 2.1.9-18
171 Requires: %{libname} = %{version}
172 Provides: lib%{name}-devel = %{version}-%{release}
173 Provides: %{name}-devel = %{version}-%{release}
174
175 %description -n %{devname}
176 This package contains the headers that programmers will need to develop
177 applications which will use libraries from %{name}.
178
179 %files -n %{devname}
180 %doc AUTHORS ChangeLog README
181 %dir %{_includedir}/bluetooth
182 %{_includedir}/bluetooth/*.h
183 %{_libdir}/*.so
184 %{_libdir}/pkgconfig/bluez.pc
185
186 #--------------------------------------------------------------------
187
188 %prep
189 %setup -q -n %name-%{version}
190 %apply_patches
191
192 %build
193 libtoolize -f -c
194 autoreconf
195 # fix mdv bug 35444
196 %define _localstatedir %{_var}
197 %configure2_5x \
198 --enable-cups \
199 --enable-dfutool \
200 --enable-tools \
201 --enable-bccmd \
202 --enable-gstreamer \
203 --enable-hidd \
204 --enable-pand \
205 --enable-dund \
206 --enable-hid2hci \
207 --enable-pcmcia \
208 --enable-udevrules \
209 --enable-capng \
210 --with-systemdsystemunitdir=%{_unitdir}
211
212 %make
213
214 %install
215 %makeinstall_std rulesdir=/lib/udev/rules.d udevdir=/lib/udev
216
217
218 #mkdir -p %{buildroot}%{_libdir}
219 #mv %{buildroot}/%{_lib}/gstreamer-0.10 %{buildroot}%{_libdir}
220
221 echo "1234" > %{buildroot}%{_sysconfdir}/bluetooth/pin
222
223 chmod 600 %{buildroot}%{_sysconfdir}/bluetooth/pin
224
225 rm -f %{buildroot}/etc/default/bluetooth %{buildroot}/etc/init.d/bluetooth
226 for a in dund hidd pand ; do
227 install -D -m0644 $RPM_SOURCE_DIR/$a.conf %{buildroot}%{_sysconfdir}/sysconfig/$a
228 done
229
230 rm -rf %{buildroot}/%{_lib}/pkgconfig
231 install -m644 bluez.pc -D %{buildroot}%{_libdir}/pkgconfig/bluez.pc
232
233
234 # Remove the cups backend from libdir, and install it in /usr/lib whatever the install
235 %ifarch x86_64
236 if test -d %{buildroot}%{_libdir}/cups ; then
237 install -D -m0755 %{buildroot}%{_libdir}/cups/backend/bluetooth %{buildroot}/usr/lib/cups/backend/bluetooth
238 rm -rf %{buildroot}%{_libdir}/cups
239 fi
240 %endif
241
242 # (cg) can we drop this move+symlink?
243 mkdir -p %{buildroot}%{_sbindir}
244 mv %{buildroot}%{_bindir}/hidd %{buildroot}%{_sbindir}
245 ln -s %{_sbindir}/hidd %{buildroot}%{_bindir}/hidd
246
247 cp test/test-* %{buildroot}%{_bindir}
248 cp test/simple-agent %{buildroot}%{_bindir}/simple-agent
249
250 #install -D -m0755 %{SOURCE10} %{buildroot}/sbin/udev_bluetooth_helper
251 #install -D -m0644 %{SOURCE11} %{buildroot}%{_sysconfdir}/udev/rules.d/60-bluetooth.rules
252
253 #install more config files
254 install -m0644 audio/audio.conf %{buildroot}%{_sysconfdir}/bluetooth/
255 install -m0644 network/network.conf %{buildroot}%{_sysconfdir}/bluetooth/
256 install -m0644 input/input.conf %{buildroot}%{_sysconfdir}/bluetooth/
257 install -m0644 serial/serial.conf %{buildroot}%{_sysconfdir}/bluetooth/
258
259 #%__mkdir -p %{buildroot}%{_libdir}/alsa-lib/
260 #%__mv %{buildroot}/%{_lib}/alsa-lib/*.so %{buildroot}%{_libdir}/alsa-lib/
261
262 # remove unpackaged files
263 find %{buildroot} -name '*.la' -delete
264
265 install -d -m0755 %{buildroot}/%{_localstatedir}/lib/bluetooth

  ViewVC Help
Powered by ViewVC 1.1.30