2 Summary: Bluetooth-tools
5 Group: Network & Connectivity/Bluetooth
7 Source0: %{name}-%{version}.tar.gz
8 #Source1001: bluetooth-address.service
10 Suggests: bluetooth-share
11 Requires: tizen-platform-config-tools
12 Requires: bluetooth-scripts
13 Requires: %{name}-compat = %{version}-%{release}
14 Recommends: %{name}-profile_common = %{version}-%{release}
17 Tools fo bluetooth run/stop and set address
19 %package profile_common
20 Summary: Bluetooth-tools extension for common/tv
21 Provides: %{name}-compat = %{version}-%{release}
22 Provides: %{name}-profile_tv = %{version}-%{release}
23 Conflicts: %{name}-profile_mobile = %{version}-%{release}
24 Conflicts: %{name}-profile_wearable = %{version}-%{release}
25 Conflicts: %{name}-profile_ivi = %{version}-%{release}
26 %description profile_common
27 Bluetooth-tools extension for Tizen common / tv profile.
29 %package profile_mobile
30 Summary: Bluetooth-tools extension for mobile/tv
31 Provides: %{name}-compat = %{version}-%{release}
32 Conflicts: %{name}-profile_common = %{version}-%{release}
33 Conflicts: %{name}-profile_wearable = %{version}-%{release}
34 Conflicts: %{name}-profile_ivi = %{version}-%{release}
35 %description profile_mobile
36 Bluetooth-tools extension for Tizen mobile profile.
38 %package profile_wearable
39 Summary: Bluetooth-tools extension for wearable/tv
40 Provides: %{name}-compat = %{version}-%{release}
41 Conflicts: %{name}-profile_common = %{version}-%{release}
42 Conflicts: %{name}-profile_mobile = %{version}-%{release}
43 Conflicts: %{name}-profile_ivi = %{version}-%{release}
44 %description profile_wearable
45 Bluetooth-tools extension for Tizen wearable profile.
48 Summary: Bluetooth-tools extension for ivi/tv
49 Provides: %{name}-compat = %{version}-%{release}
50 Conflicts: %{name}-profile_common = %{version}-%{release}
51 Conflicts: %{name}-profile_mobile = %{version}-%{release}
52 Conflicts: %{name}-profile_wearable = %{version}-%{release}
53 %description profile_ivi
54 Bluetooth-tools extension for Tizen ivi profile.
57 Summary: On/Off Bluetooth adapter
58 Group: Network & Connectivity/Bluetooth
59 Requires: %{name} = %{version}-%{release}
61 Provides: bluetooth-scripts
62 Conflicts: bluetooth-firmware-bcm
64 %description no-firmware
65 On/Off bluetooth device
71 export CFLAGS+=" -fpie -fvisibility=hidden"
72 export CXXFLAGS+=" -fpie -fvisibility=hidden"
73 export LDFLAGS+=" -Wl,--rpath=/usr/lib -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
76 %cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
77 %if 0%{?tizen_build_binary_release_type_eng}
83 %__make %{?_smp_mflags}
89 mkdir -p %{buildroot}%{_prefix}/etc/bluetooth/
90 mkdir -p %{buildroot}/run/bluetooth
91 install -m 0755 scripts/bt-dev-start.sh %{buildroot}%{_prefix}/etc/bluetooth/bt-dev-start.sh
92 install -m 0755 scripts/bt-dev-end.sh %{buildroot}%{_prefix}/etc/bluetooth/bt-dev-end.sh
94 install -D -m 0644 packaging/bluetooth-hci-logger.service %{buildroot}%{_libdir}/systemd/system/bluetooth-hci-logger.service
95 install -D -m 0644 packaging/bluetooth-hci-logger.path %{buildroot}%{_libdir}/systemd/system/bluetooth-hci-logger.path
97 install -D -m 0644 packaging/bluetooth-hci-logger-stop.service %{buildroot}%{_libdir}/systemd/system/bluetooth-hci-logger-stop.service
98 install -D -m 0644 packaging/bluetooth-hci-logger-stop.path %{buildroot}%{_libdir}/systemd/system/bluetooth-hci-logger-stop.path
100 install -D -m 0644 packaging/bluez-start.service %{buildroot}%{_libdir}/systemd/system/bluez-start.service
101 install -D -m 0644 packaging/bluez-start.path %{buildroot}%{_libdir}/systemd/system/bluez-start.path
103 install -D -m 0644 packaging/bluetooth-stack-down.service %{buildroot}%{_libdir}/systemd/system/bluetooth-stack-down.service
104 install -D -m 0644 packaging/bluetooth-stack-down.path %{buildroot}%{_libdir}/systemd/system/bluetooth-stack-down.path
106 install -D -m 0644 packaging/bluetooth-stack-down-with-radio.service %{buildroot}%{_libdir}/systemd/system/bluetooth-stack-down-with-radio.service
107 install -D -m 0644 packaging/bluetooth-stack-down-with-radio.path %{buildroot}%{_libdir}/systemd/system/bluetooth-stack-down-with-radio.path
109 install -D -m 0644 packaging/bluetooth-force-hci-logger.service %{buildroot}%{_libdir}/systemd/system/bluetooth-force-hci-logger.service
110 install -D -m 0644 packaging/bluetooth-hci-dump@.service %{buildroot}%{_libdir}/systemd/system/bluetooth-hci-dump@.service
113 mkdir -p %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
114 mkdir -p %{_libdir}/systemd/system/multi-user.target.wants/
115 ln -sf %{_libdir}/systemd/system/bluetooth-hci-logger.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
116 ln -sf %{_libdir}/systemd/system/bluetooth-hci-logger.path %{_libdir}/systemd/system/multi-user.target.wants/bluetooth-hci-logger.path
117 ln -sf %{_libdir}/systemd/system/bluetooth-hci-logger.path %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
119 ln -sf %{_libdir}/systemd/system/bluetooth-hci-logger-stop.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
120 ln -sf %{_libdir}/systemd/system/bluetooth-hci-logger-stop.path %{_libdir}/systemd/system/multi-user.target.wants/bluetooth-hci-logger-stop.path
121 ln -sf %{_libdir}/systemd/system/bluetooth-hci-logger-stop.path %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
123 ln -sf %{_libdir}/systemd/system/bluez-start.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
124 ln -sf %{_libdir}/systemd/system/bluez-start.path %{_libdir}/systemd/system/multi-user.target.wants/bluez-start.path
125 ln -sf %{_libdir}/systemd/system/bluez-start.path %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
127 ln -sf %{_libdir}/systemd/system/bluetooth-stack-down.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
128 ln -sf %{_libdir}/systemd/system/bluetooth-stack-down.path %{_libdir}/systemd/system/multi-user.target.wants/bluetooth-stack-down.path
129 ln -sf %{_libdir}/systemd/system/bluetooth-stack-down.path %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
131 ln -sf %{_libdir}/systemd/system/bluetooth-force-hci-logger.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
135 %manifest %{name}.manifest
136 %license LICENSE.APLv2
137 %defattr(-,root,root,-)
138 #%exclude %{_sysconfdir}/rc.d/init.d/bluetooth-address
139 #%{_sysconfdir}/rc.d/rc3.d/S60bluetooth-address
140 #%{_sysconfdir}/rc.d/rc5.d/S60bluetooth-address
141 %attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-edutm-on.sh
142 %attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-edutm-dev-up.sh
143 %attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-edutm-mode-on.sh
144 %attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-edutm-off.sh
145 %attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-hci-logdump.sh
146 %attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-run-hci-logger.sh
147 #%{_unitdir}/multi-user.target.wants/bluetooth-address.service
148 #%{_unitdir}/bluetooth-address.service
149 %{_libdir}/systemd/system/bluetooth-hci-logger.service
150 %{_libdir}/systemd/system/bluetooth-hci-logger.path
151 %{_libdir}/systemd/system/bluetooth-hci-logger-stop.service
152 %{_libdir}/systemd/system/bluetooth-hci-logger-stop.path
153 %{_libdir}/systemd/system/bluez-start.service
154 %{_libdir}/systemd/system/bluez-start.path
155 %{_libdir}/systemd/system/bluetooth-force-hci-logger.service
156 %{_libdir}/systemd/system/bluetooth-hci-dump@.service
157 %{_libdir}/systemd/system/bluetooth-stack-down.service
158 %{_libdir}/systemd/system/bluetooth-stack-down.path
161 pushd %{_prefix}/etc/bluetooth/
162 ln -sf common/bt-stack-up.sh bt-stack-up.sh
163 ln -sf common/bt-stack-down.sh bt-stack-down.sh
164 ln -sf common/bt-reset-env.sh bt-reset-env.sh
166 %preun profile_common
167 pushd %{_prefix}/etc/bluetooth/
172 %files profile_common
173 %license LICENSE.APLv2
174 #%{_sysconfdir}/rc.d/init.d/bluetooth-address
175 %attr(0755,-,-) %{_prefix}/etc/bluetooth/common/bt-stack-up.sh
176 %attr(0755,-,-) %{_prefix}/etc/bluetooth/common/bt-stack-down.sh
177 %attr(0755,-,-) %{_prefix}/etc/bluetooth/common/bt-reset-env.sh
180 pushd %{_prefix}/etc/bluetooth/
181 ln -sf mobile/bt-stack-up.sh bt-stack-up.sh
182 ln -sf mobile/bt-stack-down.sh bt-stack-down.sh
183 ln -sf mobile/bt-stack-down-with-radio.sh bt-stack-down-with-radio.sh
184 ln -sf mobile/bt-reset-env.sh bt-reset-env.sh
185 ln -sf %{_libdir}/systemd/system/bluetooth-stack-down-with-radio.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
186 ln -sf %{_libdir}/systemd/system/bluetooth-stack-down-with-radio.path %{_libdir}/systemd/system/multi-user.target.wants/bluetooth-stack-down-with-radio.path
187 ln -sf %{_libdir}/systemd/system/bluetooth-stack-down-with-radio.path %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
189 %preun profile_mobile
190 pushd %{_prefix}/etc/bluetooth/
193 rm bt-stack-down-with-radio.sh
196 %files profile_mobile
197 %license LICENSE.APLv2
198 %attr(0755,-,-) %{_prefix}/etc/bluetooth/mobile/bt-stack-up.sh
199 %attr(0755,-,-) %{_prefix}/etc/bluetooth/mobile/bt-stack-down.sh
200 %attr(0755,-,-) %{_prefix}/etc/bluetooth/mobile/bt-reset-env.sh
201 %attr(0755,-,-) %{_prefix}/etc/bluetooth/mobile/bt-stack-down-with-radio.sh
202 %{_libdir}/systemd/system/bluetooth-stack-down-with-radio.service
203 %{_libdir}/systemd/system/bluetooth-stack-down-with-radio.path
206 pushd %{_prefix}/etc/bluetooth/
207 ln -sf ivi/bt-stack-up.sh bt-stack-up.sh
208 ln -sf ivi/bt-stack-down.sh bt-stack-down.sh
209 ln -sf ivi/bt-reset-env.sh bt-reset-env.sh
212 pushd %{_prefix}/etc/bluetooth/
218 %license LICENSE.APLv2
219 %attr(0755,-,-) %{_prefix}/etc/bluetooth/ivi/bt-stack-up.sh
220 %attr(0755,-,-) %{_prefix}/etc/bluetooth/ivi/bt-stack-down.sh
221 %attr(0755,-,-) %{_prefix}/etc/bluetooth/ivi/bt-reset-env.sh
223 %post profile_wearable
224 pushd %{_prefix}/etc/bluetooth/
225 ln -sf wearable/bt-stack-up.sh bt-stack-up.sh
226 ln -sf wearable/bt-stack-down.sh bt-stack-down.sh
227 ln -sf wearable/bt-reset-env.sh bt-reset-env.sh
229 %preun profile_wearable
230 pushd %{_prefix}/etc/bluetooth/
235 %files profile_wearable
236 %license LICENSE.APLv2
237 %attr(0755,-,-) %{_prefix}/etc/bluetooth/wearable/bt-stack-up.sh
238 %attr(0755,-,-) %{_prefix}/etc/bluetooth/wearable/bt-stack-down.sh
239 %attr(0755,-,-) %{_prefix}/etc/bluetooth/wearable/bt-reset-env.sh
242 %manifest %{name}.manifest
243 %license LICENSE.APLv2
244 %defattr(-, root, root)
245 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-end.sh
246 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-start.sh