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}%{_sysconfdir}/rc.d/rc3.d
90 mkdir -p %{buildroot}%{_sysconfdir}/rc.d/rc5.d
91 ln -s %{_sysconfdir}/rc.d/init.d/bluetooth-address %{buildroot}%{_sysconfdir}/rc.d/rc3.d/S60bluetooth-address
92 ln -s %{_sysconfdir}/rc.d/init.d/bluetooth-address %{buildroot}%{_sysconfdir}/rc.d/rc5.d/S60bluetooth-address
94 mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
95 install -m 0644 %{SOURCE1001} %{buildroot}%{_unitdir}
96 ln -s ../bluetooth-address.service %{buildroot}%{_unitdir}/multi-user.target.wants/bluetooth-address.service
98 mkdir -p %{buildroot}%{_prefix}/etc/bluetooth/
99 install -m 0755 scripts/bt-dev-start.sh %{buildroot}%{_prefix}/etc/bluetooth/bt-dev-start.sh
100 install -m 0755 scripts/bt-dev-end.sh %{buildroot}%{_prefix}/etc/bluetooth/bt-dev-end.sh
102 install -D -m 0644 packaging/bluetooth-hci-logger.service %{buildroot}%{_libdir}/systemd/system/bluetooth-hci-logger.service
103 install -D -m 0644 packaging/bluetooth-force-hci-logger.service %{buildroot}%{_libdir}/systemd/system/bluetooth-force-hci-logger.service
104 install -D -m 0644 packaging/bluetooth-hci-dump@.service %{buildroot}%{_libdir}/systemd/system/bluetooth-hci-dump@.service
107 mkdir -p %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
108 ln -sf %{_libdir}/systemd/system/bluetooth-hci-logger.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
109 ln -sf %{_libdir}/systemd/system/bluetooth-force-hci-logger.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
113 %manifest %{name}.manifest
114 %license LICENSE.APLv2
115 %defattr(-,root,root,-)
116 %exclude %{_sysconfdir}/rc.d/init.d/bluetooth-address
117 %{_sysconfdir}/rc.d/rc3.d/S60bluetooth-address
118 %{_sysconfdir}/rc.d/rc5.d/S60bluetooth-address
119 %attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-edutm-on.sh
120 %attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-edutm-dev-up.sh
121 %attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-edutm-mode-on.sh
122 %attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-edutm-off.sh
123 %attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-hci-logdump.sh
124 %attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-run-hci-logger.sh
125 %{_unitdir}/multi-user.target.wants/bluetooth-address.service
126 %{_unitdir}/bluetooth-address.service
127 %{_libdir}/systemd/system/bluetooth-hci-logger.service
128 %{_libdir}/systemd/system/bluetooth-force-hci-logger.service
129 %{_libdir}/systemd/system/bluetooth-hci-dump@.service
132 pushd %{_prefix}/etc/bluetooth/
133 ln -sf common/bt-stack-up.sh bt-stack-up.sh
134 ln -sf common/bt-stack-down.sh bt-stack-down.sh
135 ln -sf common/bt-reset-env.sh bt-reset-env.sh
137 %preun profile_common
138 pushd %{_prefix}/etc/bluetooth/
143 %files profile_common
144 %license LICENSE.APLv2
145 %{_sysconfdir}/rc.d/init.d/bluetooth-address
146 %attr(0755,-,-) %{_prefix}/etc/bluetooth/common/bt-stack-up.sh
147 %attr(0755,-,-) %{_prefix}/etc/bluetooth/common/bt-stack-down.sh
148 %attr(0755,-,-) %{_prefix}/etc/bluetooth/common/bt-reset-env.sh
151 pushd %{_prefix}/etc/bluetooth/
152 ln -sf mobile/bt-stack-up.sh bt-stack-up.sh
153 ln -sf mobile/bt-stack-down.sh bt-stack-down.sh
154 ln -sf mobile/bt-stack-down-with-radio.sh bt-stack-down-with-radio.sh
155 ln -sf mobile/bt-reset-env.sh bt-reset-env.sh
157 %preun profile_mobile
158 pushd %{_prefix}/etc/bluetooth/
161 rm bt-stack-down-with-radio.sh
164 %files profile_mobile
165 %license LICENSE.APLv2
166 %attr(0755,-,-) %{_prefix}/etc/bluetooth/mobile/bt-stack-up.sh
167 %attr(0755,-,-) %{_prefix}/etc/bluetooth/mobile/bt-stack-down.sh
168 %attr(0755,-,-) %{_prefix}/etc/bluetooth/mobile/bt-reset-env.sh
169 %attr(0755,-,-) %{_prefix}/etc/bluetooth/mobile/bt-stack-down-with-radio.sh
172 pushd %{_prefix}/etc/bluetooth/
173 ln -sf ivi/bt-stack-up.sh bt-stack-up.sh
174 ln -sf ivi/bt-stack-down.sh bt-stack-down.sh
175 ln -sf ivi/bt-reset-env.sh bt-reset-env.sh
178 pushd %{_prefix}/etc/bluetooth/
184 %license LICENSE.APLv2
185 %attr(0755,-,-) %{_prefix}/etc/bluetooth/ivi/bt-stack-up.sh
186 %attr(0755,-,-) %{_prefix}/etc/bluetooth/ivi/bt-stack-down.sh
187 %attr(0755,-,-) %{_prefix}/etc/bluetooth/ivi/bt-reset-env.sh
189 %post profile_wearable
190 pushd %{_prefix}/etc/bluetooth/
191 ln -sf wearable/bt-stack-up.sh bt-stack-up.sh
192 ln -sf wearable/bt-stack-down.sh bt-stack-down.sh
193 ln -sf wearable/bt-reset-env.sh bt-reset-env.sh
195 %preun profile_wearable
196 pushd %{_prefix}/etc/bluetooth/
201 %files profile_wearable
202 %license LICENSE.APLv2
203 %attr(0755,-,-) %{_prefix}/etc/bluetooth/wearable/bt-stack-up.sh
204 %attr(0755,-,-) %{_prefix}/etc/bluetooth/wearable/bt-stack-down.sh
205 %attr(0755,-,-) %{_prefix}/etc/bluetooth/wearable/bt-reset-env.sh
208 %manifest %{name}.manifest
209 %license LICENSE.APLv2
210 %defattr(-, root, root)
211 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-end.sh
212 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-start.sh