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}
60 Provides: bluetooth-scripts
61 Conflicts: bluetooth-firmware-bcm
63 %description no-firmware
64 On/Off bluetooth device
70 export CFLAGS+=" -fpie -fvisibility=hidden"
71 export CXXFLAGS+=" -fpie -fvisibility=hidden"
72 export LDFLAGS+=" -Wl,--rpath=/usr/lib -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
75 %cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
76 %if 0%{?tizen_build_binary_release_type_eng}
82 %__make %{?_smp_mflags}
88 mkdir -p %{buildroot}%{_prefix}/etc/bluetooth/
89 mkdir -p %{buildroot}/run/bluetooth
90 install -m 0755 scripts/bt-dev-start.sh %{buildroot}%{_prefix}/etc/bluetooth/bt-dev-start.sh
91 install -m 0755 scripts/bt-dev-end.sh %{buildroot}%{_prefix}/etc/bluetooth/bt-dev-end.sh
93 install -D -m 0644 packaging/bluetooth-stack-up.service %{buildroot}%{_unitdir}/bluetooth-stack-up.service
95 install -D -m 0644 packaging/bluetooth-stack-down.service %{buildroot}%{_unitdir}/bluetooth-stack-down.service
97 install -D -m 0644 packaging/bluetooth-stack-down-with-radio.service %{buildroot}%{_unitdir}/bluetooth-stack-down-with-radio.service
99 #install -D -m 0644 packaging/bluetooth-force-hci-logger.service %{buildroot}%{_unitdir}/bluetooth-force-hci-logger.service
100 #install -D -m 0644 packaging/bluetooth-hci-dump@.service %{buildroot}%{_unitdir}/bluetooth-hci-dump@.service
102 install -D -m 0644 packaging/bluetooth-hci-up.service %{buildroot}%{_unitdir}/bluetooth-hci-up.service
103 install -D -m 0644 packaging/bluetooth-hci-down.service %{buildroot}%{_unitdir}/bluetooth-hci-down.service
105 install -D -m 0644 packaging/bluetooth-stack-up-common.service %{buildroot}%{_unitdir}/bluetooth-stack-up-common.service
106 install -D -m 0644 packaging/bluetooth-stack-down-common.service %{buildroot}%{_unitdir}/bluetooth-stack-down-common.service
109 mkdir -p %{_unitdir}/multi-user.target.wants/
112 %manifest %{name}.manifest
113 %license LICENSE.APLv2
114 %defattr(-,root,root,-)
115 %attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-edutm-on.sh
116 %attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-edutm-dev-up.sh
117 %attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-edutm-mode-on.sh
118 %attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-edutm-off.sh
121 pushd %{_prefix}/etc/bluetooth/
122 ln -sf common/bt-stack-up.sh bt-stack-up.sh
123 ln -sf common/bt-stack-down.sh bt-stack-down.sh
124 ln -sf common/bt-reset-env.sh bt-reset-env.sh
127 mv bluetooth-stack-up-common.service bluetooth-stack-up.service
128 mv bluetooth-stack-down-common.service bluetooth-stack-down.service
130 %preun profile_common
131 pushd %{_prefix}/etc/bluetooth/
137 rm bluetooth-stack-up.service
138 rm bluetooth-stack-down.service
140 %files profile_common
141 %license LICENSE.APLv2
142 #%{_sysconfdir}/rc.d/init.d/bluetooth-address
143 %attr(0755,-,-) %{_prefix}/etc/bluetooth/common/bt-stack-up.sh
144 %attr(0755,-,-) %{_prefix}/etc/bluetooth/common/bt-stack-down.sh
145 %attr(0755,-,-) %{_prefix}/etc/bluetooth/common/bt-reset-env.sh
146 %{_unitdir}/bluetooth-stack-up-common.service
147 %{_unitdir}/bluetooth-stack-down-common.service
148 %{_unitdir}/bluetooth-hci-up.service
149 %{_unitdir}/bluetooth-hci-down.service
152 pushd %{_prefix}/etc/bluetooth/
153 ln -sf mobile/bt-stack-up.sh bt-stack-up.sh
154 ln -sf mobile/bt-stack-down.sh bt-stack-down.sh
155 ln -sf mobile/bt-stack-down-with-radio.sh bt-stack-down-with-radio.sh
156 ln -sf mobile/bt-reset-env.sh bt-reset-env.sh
158 %preun profile_mobile
159 pushd %{_prefix}/etc/bluetooth/
162 rm bt-stack-down-with-radio.sh
165 %files profile_mobile
166 %license LICENSE.APLv2
167 %attr(0755,-,-) %{_prefix}/etc/bluetooth/mobile/bt-stack-up.sh
168 %attr(0755,-,-) %{_prefix}/etc/bluetooth/mobile/bt-stack-down.sh
169 %attr(0755,-,-) %{_prefix}/etc/bluetooth/mobile/bt-reset-env.sh
170 %attr(0755,-,-) %{_prefix}/etc/bluetooth/mobile/bt-stack-down-with-radio.sh
171 %{_unitdir}/bluetooth-stack-down-with-radio.service
172 %{_unitdir}/bluetooth-stack-up.service
173 %{_unitdir}/bluetooth-stack-down.service
174 %{_unitdir}/bluetooth-hci-up.service
175 %{_unitdir}/bluetooth-hci-down.service
178 pushd %{_prefix}/etc/bluetooth/
179 ln -sf ivi/bt-stack-up.sh bt-stack-up.sh
180 ln -sf ivi/bt-stack-down.sh bt-stack-down.sh
181 ln -sf ivi/bt-reset-env.sh bt-reset-env.sh
184 pushd %{_prefix}/etc/bluetooth/
190 %license LICENSE.APLv2
191 %attr(0755,-,-) %{_prefix}/etc/bluetooth/ivi/bt-stack-up.sh
192 %attr(0755,-,-) %{_prefix}/etc/bluetooth/ivi/bt-stack-down.sh
193 %attr(0755,-,-) %{_prefix}/etc/bluetooth/ivi/bt-reset-env.sh
194 %{_unitdir}/bluetooth-stack-up.service
195 %{_unitdir}/bluetooth-stack-down.service
196 %{_unitdir}/bluetooth-hci-up.service
197 %{_unitdir}/bluetooth-hci-down.service
199 %post profile_wearable
200 pushd %{_prefix}/etc/bluetooth/
201 ln -sf wearable/bt-stack-up.sh bt-stack-up.sh
202 ln -sf wearable/bt-stack-down.sh bt-stack-down.sh
203 ln -sf wearable/bt-reset-env.sh bt-reset-env.sh
205 %preun profile_wearable
206 pushd %{_prefix}/etc/bluetooth/
211 %files profile_wearable
212 %license LICENSE.APLv2
213 %attr(0755,-,-) %{_prefix}/etc/bluetooth/wearable/bt-stack-up.sh
214 %attr(0755,-,-) %{_prefix}/etc/bluetooth/wearable/bt-stack-down.sh
215 %attr(0755,-,-) %{_prefix}/etc/bluetooth/wearable/bt-reset-env.sh
216 %{_unitdir}/bluetooth-stack-up.service
217 %{_unitdir}/bluetooth-stack-down.service
218 %{_unitdir}/bluetooth-hci-up.service
219 %{_unitdir}/bluetooth-hci-down.service
222 %manifest %{name}.manifest
223 %license LICENSE.APLv2
224 %defattr(-, root, root)
225 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-end.sh
226 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-start.sh
227 %{_unitdir}/bluetooth-stack-up.service
228 %{_unitdir}/bluetooth-stack-down.service
229 %{_unitdir}/bluetooth-hci-up.service
230 %{_unitdir}/bluetooth-hci-down.service