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: %{name}-compat = %{version}-%{release}
13 Recommends: %{name}-profile_common = %{version}-%{release}
16 Tools fo bluetooth run/stop and set address
18 %package profile_common
19 Summary: Bluetooth-tools extension for common/tv
20 Provides: %{name}-compat = %{version}-%{release}
21 Provides: %{name}-profile_tv = %{version}-%{release}
22 Conflicts: %{name}-profile_mobile = %{version}-%{release}
23 Conflicts: %{name}-profile_wearable = %{version}-%{release}
24 Conflicts: %{name}-profile_ivi = %{version}-%{release}
25 %description profile_common
26 Bluetooth-tools extension for Tizen common / tv profile.
28 %package profile_mobile
29 Summary: Bluetooth-tools extension for mobile/tv
30 Provides: %{name}-compat = %{version}-%{release}
31 Conflicts: %{name}-profile_common = %{version}-%{release}
32 Conflicts: %{name}-profile_wearable = %{version}-%{release}
33 Conflicts: %{name}-profile_ivi = %{version}-%{release}
34 %description profile_mobile
35 Bluetooth-tools extension for Tizen mobile profile.
37 %package profile_wearable
38 Summary: Bluetooth-tools extension for wearable/tv
39 Provides: %{name}-compat = %{version}-%{release}
40 Conflicts: %{name}-profile_common = %{version}-%{release}
41 Conflicts: %{name}-profile_mobile = %{version}-%{release}
42 Conflicts: %{name}-profile_ivi = %{version}-%{release}
43 %description profile_wearable
44 Bluetooth-tools extension for Tizen wearable profile.
47 Summary: Bluetooth-tools extension for ivi/tv
48 Provides: %{name}-compat = %{version}-%{release}
49 Conflicts: %{name}-profile_common = %{version}-%{release}
50 Conflicts: %{name}-profile_mobile = %{version}-%{release}
51 Conflicts: %{name}-profile_wearable = %{version}-%{release}
52 %description profile_ivi
53 Bluetooth-tools extension for Tizen ivi profile.
56 Summary: On/Off Bluetooth adapter
57 Group: Network & Connectivity/Bluetooth
58 Requires: %{name} = %{version}-%{release}
59 Conflicts: bluetooth-firmware-bcm
61 %description no-firmware
62 On/Off bluetooth device
68 export CFLAGS+=" -fpie -fvisibility=hidden"
69 export CXXFLAGS+=" -fpie -fvisibility=hidden"
70 export LDFLAGS+=" -Wl,--rpath=/usr/lib -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
73 %cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
74 %if 0%{?tizen_build_binary_release_type_eng}
80 %__make %{?_smp_mflags}
86 mkdir -p %{buildroot}%{_prefix}/etc/bluetooth/
87 mkdir -p %{buildroot}/run/bluetooth
88 install -m 0755 scripts/bt-dev-start.sh %{buildroot}%{_prefix}/etc/bluetooth/bt-dev-start.sh
89 install -m 0755 scripts/bt-dev-end.sh %{buildroot}%{_prefix}/etc/bluetooth/bt-dev-end.sh
91 install -D -m 0644 packaging/bluetooth-stack-up.service %{buildroot}%{_unitdir}/bluetooth-stack-up.service
93 install -D -m 0644 packaging/bluetooth-stack-down.service %{buildroot}%{_unitdir}/bluetooth-stack-down.service
95 install -D -m 0644 packaging/bluetooth-stack-down-with-radio.service %{buildroot}%{_unitdir}/bluetooth-stack-down-with-radio.service
97 #install -D -m 0644 packaging/bluetooth-force-hci-logger.service %{buildroot}%{_unitdir}/bluetooth-force-hci-logger.service
98 #install -D -m 0644 packaging/bluetooth-hci-dump@.service %{buildroot}%{_unitdir}/bluetooth-hci-dump@.service
100 install -D -m 0644 packaging/bluetooth-hci-up.service %{buildroot}%{_unitdir}/bluetooth-hci-up.service
101 install -D -m 0644 packaging/bluetooth-hci-down.service %{buildroot}%{_unitdir}/bluetooth-hci-down.service
103 install -D -m 0644 packaging/bluetooth-stack-up-common.service %{buildroot}%{_unitdir}/bluetooth-stack-up-common.service
104 install -D -m 0644 packaging/bluetooth-stack-down-common.service %{buildroot}%{_unitdir}/bluetooth-stack-down-common.service
107 mkdir -p %{_unitdir}/multi-user.target.wants/
110 %manifest %{name}.manifest
111 %license LICENSE.APLv2
112 %defattr(-,root,root,-)
113 %attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-edutm-on.sh
114 %attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-edutm-dev-up.sh
115 %attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-edutm-mode-on.sh
116 %attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-edutm-off.sh
119 pushd %{_prefix}/etc/bluetooth/
120 ln -sf common/bt-stack-up.sh bt-stack-up.sh
121 ln -sf common/bt-stack-down.sh bt-stack-down.sh
122 ln -sf common/bt-reset-env.sh bt-reset-env.sh
125 mv bluetooth-stack-up-common.service bluetooth-stack-up.service
126 mv bluetooth-stack-down-common.service bluetooth-stack-down.service
128 %preun profile_common
129 pushd %{_prefix}/etc/bluetooth/
135 rm bluetooth-stack-up.service
136 rm bluetooth-stack-down.service
138 %files profile_common
139 %license LICENSE.APLv2
140 #%{_sysconfdir}/rc.d/init.d/bluetooth-address
141 %attr(0755,-,-) %{_prefix}/etc/bluetooth/common/bt-stack-up.sh
142 %attr(0755,-,-) %{_prefix}/etc/bluetooth/common/bt-stack-down.sh
143 %attr(0755,-,-) %{_prefix}/etc/bluetooth/common/bt-reset-env.sh
144 %{_unitdir}/bluetooth-stack-up-common.service
145 %{_unitdir}/bluetooth-stack-down-common.service
146 %{_unitdir}/bluetooth-hci-up.service
147 %{_unitdir}/bluetooth-hci-down.service
150 pushd %{_prefix}/etc/bluetooth/
151 ln -sf mobile/bt-stack-up.sh bt-stack-up.sh
152 ln -sf mobile/bt-stack-down.sh bt-stack-down.sh
153 ln -sf mobile/bt-stack-down-with-radio.sh bt-stack-down-with-radio.sh
154 ln -sf mobile/bt-reset-env.sh bt-reset-env.sh
156 %preun profile_mobile
157 pushd %{_prefix}/etc/bluetooth/
160 rm bt-stack-down-with-radio.sh
163 %files profile_mobile
164 %license LICENSE.APLv2
165 %attr(0755,-,-) %{_prefix}/etc/bluetooth/mobile/bt-stack-up.sh
166 %attr(0755,-,-) %{_prefix}/etc/bluetooth/mobile/bt-stack-down.sh
167 %attr(0755,-,-) %{_prefix}/etc/bluetooth/mobile/bt-reset-env.sh
168 %attr(0755,-,-) %{_prefix}/etc/bluetooth/mobile/bt-stack-down-with-radio.sh
169 %{_unitdir}/bluetooth-stack-down-with-radio.service
170 %{_unitdir}/bluetooth-stack-up.service
171 %{_unitdir}/bluetooth-stack-down.service
172 %{_unitdir}/bluetooth-hci-up.service
173 %{_unitdir}/bluetooth-hci-down.service
176 pushd %{_prefix}/etc/bluetooth/
177 ln -sf ivi/bt-stack-up.sh bt-stack-up.sh
178 ln -sf ivi/bt-stack-down.sh bt-stack-down.sh
179 ln -sf ivi/bt-reset-env.sh bt-reset-env.sh
182 pushd %{_prefix}/etc/bluetooth/
188 %license LICENSE.APLv2
189 %attr(0755,-,-) %{_prefix}/etc/bluetooth/ivi/bt-stack-up.sh
190 %attr(0755,-,-) %{_prefix}/etc/bluetooth/ivi/bt-stack-down.sh
191 %attr(0755,-,-) %{_prefix}/etc/bluetooth/ivi/bt-reset-env.sh
192 %{_unitdir}/bluetooth-stack-up.service
193 %{_unitdir}/bluetooth-stack-down.service
194 %{_unitdir}/bluetooth-hci-up.service
195 %{_unitdir}/bluetooth-hci-down.service
197 %post profile_wearable
198 pushd %{_prefix}/etc/bluetooth/
199 ln -sf wearable/bt-stack-up.sh bt-stack-up.sh
200 ln -sf wearable/bt-stack-down.sh bt-stack-down.sh
201 ln -sf wearable/bt-reset-env.sh bt-reset-env.sh
203 %preun profile_wearable
204 pushd %{_prefix}/etc/bluetooth/
209 %files profile_wearable
210 %license LICENSE.APLv2
211 %attr(0755,-,-) %{_prefix}/etc/bluetooth/wearable/bt-stack-up.sh
212 %attr(0755,-,-) %{_prefix}/etc/bluetooth/wearable/bt-stack-down.sh
213 %attr(0755,-,-) %{_prefix}/etc/bluetooth/wearable/bt-reset-env.sh
214 %{_unitdir}/bluetooth-stack-up.service
215 %{_unitdir}/bluetooth-stack-down.service
216 %{_unitdir}/bluetooth-hci-up.service
217 %{_unitdir}/bluetooth-hci-down.service
220 %manifest %{name}.manifest
221 %license LICENSE.APLv2
222 %defattr(-, root, root)
223 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-end.sh
224 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-start.sh
225 %{_unitdir}/bluetooth-stack-up.service
226 %{_unitdir}/bluetooth-stack-down.service
227 %{_unitdir}/bluetooth-hci-up.service
228 %{_unitdir}/bluetooth-hci-down.service