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"
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
75 Summary: Bluetooth agent for MAP(Message Access Profile) server
76 Requires: %{name} = %{version}-%{release}
77 Group: Network & Connectivity/Bluetooth
79 Bluetooth agent binary compiled for MAP(Message Access Profile) server
82 Summary: Bluetooth agent for PBAP(PhoneBook Access Profile) server
83 Requires: %{name} = %{version}-%{release}
84 Group: Network & Connectivity/Bluetooth
86 Bluetooth agent binary compiled for PBAP(PhoneBook Access Profile) server
89 Summary: Bluetooth agent for HID(Human Interface Device)'s device role
90 Requires: %{name} = %{version}-%{release}
91 Group: Network & Connectivity/Bluetooth
93 Bluetooth agent binary compiled for HID(Human Interface Device)'s device role
96 Summary: Bluetooth agent for IPSP(Internet Protocol Support Profile)
97 Requires: %{name} = %{version}-%{release}
98 Group: Network & Connectivity/Bluetooth
100 Bluetooth agent binary compiled for IPSP(Internet Protocol Support Profile)
103 Summary: Test Application for HF
106 Test Application for HF
113 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
114 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
115 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
116 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_MEDIA_ENHANCE"
117 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_HFP_AG"
118 export CFLAGS="$CFLAGS -DTIZEN_SUPPORT_DUAL_HF"
120 %ifarch aarch64 x86_64 riscv64
122 export CFLAGS+=" -DARCH64"
123 export CXXFLAGS+=" -DARCH64"
124 export FFLAGS+=" -DARCH64"
127 export CFLAGS+=" -fpie -DTIZEN_FEATURE_BP_PBAP_SIM -fvisibility=hidden "
128 export CXXFLAGS+=" -fpie -DTIZEN_FEATURE_BP_PBAP_SIM -fvisibility=hidden "
130 export LDFLAGS+=" -Wl,--rpath=/usr/lib -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
132 export CFLAGS_DEFAULT="$CFLAGS"
135 export CFLAGS+=" -fprofile-arcs -ftest-coverage"
136 export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
137 export FFLAGS+=" -fprofile-arcs -ftest-coverage"
138 export LDFLAGS+=" -lgcov"
141 # Build All (wearalbe/ivi/common/tv/mobile)
142 %cmake . -DCMAKE_INSTALL_PREFIX=/usr \
143 -DTIZEN_FEATURE_BT_HFP_AG=1 \
144 -DBUILD_GTESTS=%{?gcov:1}%{!?gcov:0} \
145 -DBUILD_GCOV=%{?gcov:1}%{!?gcov:0}
151 find . -name '*.gcno' -exec cp '{}' gcov-obj ';'
158 mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants/
160 # This usage of profile macro does NOT conflict 4.0 configurability.
161 #%if "%{?profile}" != "mobile" && "%{?profile}" != "tv"
162 # Original: wearable, ivi. Added: common, "undefined"
163 #mkdir -p %{buildroot}%{_datadir}/dbus-1/system-services
164 #mkdir -p %{buildroot}%{_bindir}/
165 #install -D -m 0644 %{buildroot}/usr/share/dbus-1/system-services/org.bluez.hf_agent.service %{buildroot}%{_datadir}/dbus-1/system-services/
166 #install -D -m 0644 %{buildroot}/usr/share/dbus-1/system-services/org.bluez.ipsp_agent.service %{buildroot}%{_datadir}/dbus-1/system-services/
167 #install -D -m 0644 %{buildroot}/usr/bin/bluetooth-hf-agent %{buildroot}%{_bindir}/
168 #install -D -m 0644 %{buildroot}/usr/bin/bluetooth-ipsp-agent %{buildroot}%{_bindir}/
170 install -D -m 0644 packaging/bluetooth-map-agent.service %{buildroot}%{_unitdir}/bluetooth-map-agent.service
171 install -D -m 0644 packaging/bluetooth-pbap-agent.service %{buildroot}%{_unitdir}/bluetooth-pbap-agent.service
172 install -D -m 0644 packaging/bluetooth-ag-agent.service %{buildroot}%{_unitdir}/bluetooth-ag-agent.service
173 install -D -m 0644 packaging/bluetooth-hf-agent.service %{buildroot}%{_unitdir}/bluetooth-hf-agent.service
174 install -D -m 0644 packaging/bluetooth-hid-agent.service %{buildroot}%{_unitdir}/bluetooth-hid-agent.service
175 ln -s ../bluetooth-hf-agent.service %{buildroot}%{_unitdir}/multi-user.target.wants/bluetooth-hf-agent.service
178 mkdir -p %{buildroot}%{_datadir}/gcov/obj/%{name}
179 install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj/%{name}/
190 %manifest %{name}.manifest
192 %defattr(-, root, root)
193 %exclude %{_bindir}/gtest-bluetooth-agent
194 %exclude %{_libdir}/lib*
195 %exclude %{_datadir}/gcov/obj/*
198 %manifest %{name}.manifest
200 %{_bindir}/bluetooth-ag-agent
201 %attr(0666,-,-) /var/lib/bluetooth/voice-recognition-blacklist
202 %{_datadir}/dbus-1/system-services/org.bluez.ag_agent.service
203 %{_sysconfdir}/dbus-1/system.d/bluetooth-ag-agent.conf
204 %{_unitdir}/bluetooth-ag-agent.service
205 #%exclude %{_unitdir}/bluetooth-map-agent.service
206 #%exclude %{_unitdir}/bluetooth-pbap-agent.service
209 %manifest %{name}.manifest
211 %{_bindir}/bluetooth-hf-agent
212 %{_datadir}/dbus-1/system-services/org.bluez.hf_agent.service
213 %{_sysconfdir}/dbus-1/system.d/bluetooth-hf-agent.conf
214 %{_unitdir}/bluetooth-hf-agent.service
215 %{_unitdir}/multi-user.target.wants/bluetooth-hf-agent.service
216 #%exclude %{_unitdir}/bluetooth-map-agent.service
217 #%exclude %{_unitdir}/bluetooth-pbap-agent.service
220 %manifest %{name}.manifest
222 %{_bindir}/bluetooth-map-agent
223 %{_datadir}/dbus-1/system-services/org.bluez.map_agent.service
224 %{_unitdir}/bluetooth-map-agent.service
225 %{_sysconfdir}/dbus-1/system.d/bluetooth_map_agent.conf
228 %manifest %{name}.manifest
230 %{_bindir}/bluetooth-pb-agent
231 %{_datadir}/dbus-1/system-services/org.bluez.pb_agent.service
232 %{_unitdir}/bluetooth-pbap-agent.service
233 %{_sysconfdir}/dbus-1/system.d/bluetooth_pb_agent.conf
236 %manifest %{name}.manifest
238 %{_bindir}/bluetooth-hid-agent
239 %{_datadir}/dbus-1/system-services/org.bluez.hid_agent.service
240 %{_unitdir}/bluetooth-hid-agent.service
241 %{_sysconfdir}/dbus-1/system.d/bluetooth-hid-agent.conf
244 %manifest %{name}.manifest
246 %{_bindir}/bluetooth-ipsp-agent
247 %{_datadir}/dbus-1/system-services/org.bluez.ipsp_agent.service
248 %{_sysconfdir}/dbus-1/system.d/bluetooth-ipsp-agent.conf