1 %define _usrlibdir /usr/lib
4 Summary: Bluetooth agent packages that support various external profiles
7 Group: Network & Connectivity/Bluetooth
9 Source0: %{name}-%{version}.tar.gz
10 Source1001: bluetooth-agent.manifest
12 BuildRequires: pkgconfig(aul)
13 BuildRequires: pkgconfig(bluetooth-api)
14 BuildRequires: pkgconfig(capi-media-audio-io)
16 # The profile macro usage with the following comments may be removed after
17 # Tizen OBS build projects are merged. However, each vendor may keep using
18 # such if/endif statement to skip building profiles not interested
20 # This usage of profile macro does NOT conflict 4.0 configurability.
21 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv"
22 # Original: wearable, ivi. Added: common, "undefined"
23 BuildRequires: pkgconfig(alarm-service)
24 BuildRequires: pkgconfig(capi-appfw-app-manager)
25 BuildRequires: pkgconfig(capi-system-device)
27 # This usage of profile macro does NOT conflict 4.0 configurability.
28 %if "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && !0%{?_with_da_profile:1}
29 # Original: common, mobile, tv. Added: "undefined"
30 BuildRequires: pkgconfig(contacts-service2)
31 BuildRequires: pkgconfig(msg-service)
32 BuildRequires: pkgconfig(email-service)
34 BuildRequires: pkgconfig(capi-system-info)
35 BuildRequires: pkgconfig(dbus-1)
36 BuildRequires: pkgconfig(tapi)
37 BuildRequires: pkgconfig(dlog)
38 BuildRequires: pkgconfig(vconf)
39 BuildRequires: pkgconfig(appsvc)
40 BuildRequires: pkgconfig(capi-appfw-application)
41 BuildRequires: pkgconfig(capi-network-connection)
42 BuildRequires: pkgconfig(capi-network-bluetooth)
43 BuildRequires: pkgconfig(capi-media-image-util)
44 BuildRequires: pkgconfig(contacts-service2)
45 BuildRequires: pkgconfig(libexif)
46 BuildRequires: pkgconfig(gio-2.0)
48 Requires: security-config
50 BuildRequires: gtest-devel
54 #Requires: %{name}-compat = %{version}-%{release}
55 #Recommends: %{name}-profile_common = %{version}-%{release}
58 Bluetooth agent packages that support various external profiles
61 Summary: Bluetooth agent for HFP(Hands-Free Profile)'s AG(Audio Gate) role
62 Requires: %{name} = %{version}-%{release}
63 Group: Network & Connectivity/Bluetooth
65 Bluetooth agent binary compiled for HFP(Hands-Free Profile)'s AG(Audio Gate) role
68 Summary: Bluetooth agent for HFP(Hands-Free Profile)'s HF(Hands-Free) role
69 Requires: %{name} = %{version}-%{release}
70 Group: Network & Connectivity/Bluetooth
72 Bluetooth agent binary compiled for HFP(Hands-Free Profile)'s HF(Hands-Free) role
74 %if !0%{?_with_da_profile:1}
76 Summary: Bluetooth agent for MAP(Message Access Profile) server
77 Requires: %{name} = %{version}-%{release}
78 Group: Network & Connectivity/Bluetooth
80 Bluetooth agent binary compiled for MAP(Message Access Profile) server
84 Summary: Bluetooth agent for PBAP(PhoneBook Access Profile) server
85 Requires: %{name} = %{version}-%{release}
86 Group: Network & Connectivity/Bluetooth
88 Bluetooth agent binary compiled for PBAP(PhoneBook Access Profile) server
91 Summary: Bluetooth agent for HID(Human Interface Device)'s device role
92 Requires: %{name} = %{version}-%{release}
93 Group: Network & Connectivity/Bluetooth
95 Bluetooth agent binary compiled for HID(Human Interface Device)'s device role
98 Summary: Bluetooth agent for IPSP(Internet Protocol Support Profile)
99 Requires: %{name} = %{version}-%{release}
100 Group: Network & Connectivity/Bluetooth
102 Bluetooth agent binary compiled for IPSP(Internet Protocol Support Profile)
105 Summary: Test Application for HF
108 Test Application for HF
115 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
116 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
117 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
118 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_MEDIA_ENHANCE"
119 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_HFP_AG"
120 export CFLAGS="$CFLAGS -DTIZEN_SUPPORT_DUAL_HF"
122 %ifarch aarch64 x86_64 riscv64
124 export CFLAGS+=" -DARCH64"
125 export CXXFLAGS+=" -DARCH64"
126 export FFLAGS+=" -DARCH64"
129 export CFLAGS+=" -fpie -DTIZEN_FEATURE_BP_PBAP_SIM -fvisibility=hidden "
130 export CXXFLAGS+=" -fpie -DTIZEN_FEATURE_BP_PBAP_SIM -fvisibility=hidden "
132 export LDFLAGS+=" -Wl,--rpath=/usr/lib -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
134 export CFLAGS_DEFAULT="$CFLAGS"
137 export CFLAGS+=" -fprofile-arcs -ftest-coverage"
138 export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
139 export FFLAGS+=" -fprofile-arcs -ftest-coverage"
140 export LDFLAGS+=" -lgcov"
143 # Build All (wearalbe/ivi/common/tv/mobile)
144 %cmake . -DCMAKE_INSTALL_PREFIX=/usr \
145 -DTIZEN_FEATURE_BT_HFP_AG=1 \
146 -DBUILD_GTESTS=%{?gcov:1}%{!?gcov:0} \
147 -DBUILD_GCOV=%{?gcov:1}%{!?gcov:0} \
148 -DDA_PROFILE=%{?_with_da_profile:1}%{!?_with_da_profile:0}
154 find . -name '*.gcno' -exec cp '{}' gcov-obj ';'
161 mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants/
163 # This usage of profile macro does NOT conflict 4.0 configurability.
164 #%if "%{?profile}" != "mobile" && "%{?profile}" != "tv"
165 # Original: wearable, ivi. Added: common, "undefined"
166 #mkdir -p %{buildroot}%{_datadir}/dbus-1/system-services
167 #mkdir -p %{buildroot}%{_bindir}/
168 #install -D -m 0644 %{buildroot}/usr/share/dbus-1/system-services/org.bluez.hf_agent.service %{buildroot}%{_datadir}/dbus-1/system-services/
169 #install -D -m 0644 %{buildroot}/usr/share/dbus-1/system-services/org.bluez.ipsp_agent.service %{buildroot}%{_datadir}/dbus-1/system-services/
170 #install -D -m 0644 %{buildroot}/usr/bin/bluetooth-hf-agent %{buildroot}%{_bindir}/
171 #install -D -m 0644 %{buildroot}/usr/bin/bluetooth-ipsp-agent %{buildroot}%{_bindir}/
173 %if !0%{?_with_da_profile:1}
174 install -D -m 0644 packaging/bluetooth-map-agent.service %{buildroot}%{_unitdir}/bluetooth-map-agent.service
176 install -D -m 0644 packaging/bluetooth-pbap-agent.service %{buildroot}%{_unitdir}/bluetooth-pbap-agent.service
177 install -D -m 0644 packaging/bluetooth-ag-agent.service %{buildroot}%{_unitdir}/bluetooth-ag-agent.service
178 install -D -m 0644 packaging/bluetooth-hf-agent.service %{buildroot}%{_unitdir}/bluetooth-hf-agent.service
179 install -D -m 0644 packaging/bluetooth-hid-agent.service %{buildroot}%{_unitdir}/bluetooth-hid-agent.service
180 ln -s ../bluetooth-hf-agent.service %{buildroot}%{_unitdir}/multi-user.target.wants/bluetooth-hf-agent.service
183 mkdir -p %{buildroot}%{_datadir}/gcov/obj/%{name}
184 install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj/%{name}/
195 %manifest %{name}.manifest
197 %defattr(-, root, root)
198 %exclude %{_bindir}/gtest-bluetooth-agent
199 %exclude %{_libdir}/lib*
200 %exclude %{_datadir}/gcov/obj/*
203 %manifest %{name}.manifest
205 %{_bindir}/bluetooth-ag-agent
206 %attr(0666,-,-) /var/lib/bluetooth/voice-recognition-blacklist
207 %{_datadir}/dbus-1/system-services/org.bluez.ag_agent.service
208 %{_sysconfdir}/dbus-1/system.d/bluetooth-ag-agent.conf
209 %{_unitdir}/bluetooth-ag-agent.service
210 #%exclude %{_unitdir}/bluetooth-map-agent.service
211 #%exclude %{_unitdir}/bluetooth-pbap-agent.service
214 %manifest %{name}.manifest
216 %{_bindir}/bluetooth-hf-agent
217 %{_datadir}/dbus-1/system-services/org.bluez.hf_agent.service
218 %{_sysconfdir}/dbus-1/system.d/bluetooth-hf-agent.conf
219 %{_unitdir}/bluetooth-hf-agent.service
220 %{_unitdir}/multi-user.target.wants/bluetooth-hf-agent.service
221 #%exclude %{_unitdir}/bluetooth-map-agent.service
222 #%exclude %{_unitdir}/bluetooth-pbap-agent.service
224 %if !0%{?_with_da_profile:1}
226 %manifest %{name}.manifest
228 %{_bindir}/bluetooth-map-agent
229 %{_datadir}/dbus-1/system-services/org.bluez.map_agent.service
230 %{_unitdir}/bluetooth-map-agent.service
231 %{_sysconfdir}/dbus-1/system.d/bluetooth_map_agent.conf
235 %manifest %{name}.manifest
237 %{_bindir}/bluetooth-pb-agent
238 %{_datadir}/dbus-1/system-services/org.bluez.pb_agent.service
239 %{_unitdir}/bluetooth-pbap-agent.service
240 %{_sysconfdir}/dbus-1/system.d/bluetooth_pb_agent.conf
243 %manifest %{name}.manifest
245 %{_bindir}/bluetooth-hid-agent
246 %{_datadir}/dbus-1/system-services/org.bluez.hid_agent.service
247 %{_unitdir}/bluetooth-hid-agent.service
248 %{_sysconfdir}/dbus-1/system.d/bluetooth-hid-agent.conf
251 %manifest %{name}.manifest
253 %{_bindir}/bluetooth-ipsp-agent
254 %{_datadir}/dbus-1/system-services/org.bluez.ipsp_agent.service
255 %{_sysconfdir}/dbus-1/system.d/bluetooth-ipsp-agent.conf