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
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}%{_libdir}/systemd/system/
159 mkdir -p %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/
161 # This usage of profile macro does NOT conflict 4.0 configurability.
162 #%if "%{?profile}" != "mobile" && "%{?profile}" != "tv"
163 # Original: wearable, ivi. Added: common, "undefined"
164 #mkdir -p %{buildroot}%{_datadir}/dbus-1/system-services
165 #mkdir -p %{buildroot}%{_bindir}/
166 #install -D -m 0644 %{buildroot}/usr/share/dbus-1/system-services/org.bluez.hf_agent.service %{buildroot}%{_datadir}/dbus-1/system-services/
167 #install -D -m 0644 %{buildroot}/usr/share/dbus-1/system-services/org.bluez.ipsp_agent.service %{buildroot}%{_datadir}/dbus-1/system-services/
168 #install -D -m 0644 %{buildroot}/usr/bin/bluetooth-hf-agent %{buildroot}%{_bindir}/
169 #install -D -m 0644 %{buildroot}/usr/bin/bluetooth-ipsp-agent %{buildroot}%{_bindir}/
171 install -D -m 0644 packaging/bluetooth-map-agent.service %{buildroot}%{_unitdir}/bluetooth-map-agent.service
172 install -D -m 0644 packaging/bluetooth-pbap-agent.service %{buildroot}%{_unitdir}/bluetooth-pbap-agent.service
173 install -D -m 0644 packaging/bluetooth-ag-agent.service %{buildroot}%{_unitdir}/bluetooth-ag-agent.service
174 install -D -m 0644 packaging/bluetooth-hf-agent.service %{buildroot}%{_unitdir}/bluetooth-hf-agent.service
175 install -D -m 0644 packaging/bluetooth-hid-agent.service %{buildroot}%{_unitdir}/bluetooth-hid-agent.service
178 mkdir -p %{buildroot}%{_datadir}/gcov/obj/%{name}
179 install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj/%{name}/
189 install -D -m 0644 packaging/bluetooth-hf-agent.service %{buildroot}%{_libdir}/systemd/system/bluetooth-hf-agent.service
190 ln -s ../bluetooth-hf-agent.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/bluetooth-hf-agent.service
193 %manifest %{name}.manifest
195 %defattr(-, root, root)
196 %exclude %{_bindir}/gtest-bluetooth-agent
197 %exclude %{_libdir}/lib*
198 %exclude %{_datadir}/gcov/obj/*
201 %manifest %{name}.manifest
203 %{_bindir}/bluetooth-ag-agent
204 %attr(0666,-,-) /var/lib/bluetooth/voice-recognition-blacklist
205 %{_datadir}/dbus-1/system-services/org.bluez.ag_agent.service
206 %{_sysconfdir}/dbus-1/system.d/bluetooth-ag-agent.conf
207 %{_unitdir}/bluetooth-ag-agent.service
208 #%exclude %{_unitdir}/bluetooth-map-agent.service
209 #%exclude %{_unitdir}/bluetooth-pbap-agent.service
212 %manifest %{name}.manifest
214 %{_bindir}/bluetooth-hf-agent
215 %{_datadir}/dbus-1/system-services/org.bluez.hf_agent.service
216 %{_sysconfdir}/dbus-1/system.d/bluetooth-hf-agent.conf
217 %{_unitdir}/bluetooth-hf-agent.service
218 #%exclude %{_unitdir}/bluetooth-map-agent.service
219 #%exclude %{_unitdir}/bluetooth-pbap-agent.service
220 %{_libdir}/systemd/system/bluetooth-hf-agent.service
221 %{_libdir}/systemd/system/multi-user.target.wants/bluetooth-hf-agent.service
224 %manifest %{name}.manifest
226 %{_bindir}/bluetooth-map-agent
227 %{_datadir}/dbus-1/system-services/org.bluez.map_agent.service
228 %{_unitdir}/bluetooth-map-agent.service
229 %{_sysconfdir}/dbus-1/system.d/bluetooth_map_agent.conf
232 %manifest %{name}.manifest
234 %{_bindir}/bluetooth-pb-agent
235 %{_datadir}/dbus-1/system-services/org.bluez.pb_agent.service
236 %{_unitdir}/bluetooth-pbap-agent.service
237 %{_sysconfdir}/dbus-1/system.d/bluetooth_pb_agent.conf
240 %manifest %{name}.manifest
242 %{_bindir}/bluetooth-hid-agent
243 %{_datadir}/dbus-1/system-services/org.bluez.hid_agent.service
244 %{_unitdir}/bluetooth-hid-agent.service
245 %{_sysconfdir}/dbus-1/system.d/bluetooth-hid-agent.conf
248 %manifest %{name}.manifest
250 %{_bindir}/bluetooth-ipsp-agent
251 %{_datadir}/dbus-1/system-services/org.bluez.ipsp_agent.service
252 %{_sysconfdir}/dbus-1/system.d/bluetooth-ipsp-agent.conf