Name: bluetooth-agent
Summary: Bluetooth agent packages that support various external profiles
-Version: 0.6.0
+Version: 0.9.0
Release: 1
Group: Network & Connectivity/Bluetooth
License: Apache-2.0
BuildRequires: pkgconfig(aul)
BuildRequires: pkgconfig(bluetooth-api)
+BuildRequires: pkgconfig(capi-media-audio-io)
# The profile macro usage with the following comments may be removed after
# Tizen OBS build projects are merged. However, each vendor may keep using
BuildRequires: pkgconfig(capi-system-device)
%endif
# This usage of profile macro does NOT conflict 4.0 configurability.
-%if "%{?profile}" != "wearable" && "%{?profile}" != "ivi"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && !0%{?_with_da_profile:1}
# Original: common, mobile, tv. Added: "undefined"
BuildRequires: pkgconfig(contacts-service2)
BuildRequires: pkgconfig(msg-service)
%description hfp_hf
Bluetooth agent binary compiled for HFP(Hands-Free Profile)'s HF(Hands-Free) role
+%if !0%{?_with_da_profile:1}
%package map
Summary: Bluetooth agent for MAP(Message Access Profile) server
Requires: %{name} = %{version}-%{release}
Group: Network & Connectivity/Bluetooth
%description map
Bluetooth agent binary compiled for MAP(Message Access Profile) server
+%endif
%package pbap
Summary: Bluetooth agent for PBAP(PhoneBook Access Profile) server
%description ipsp
Bluetooth agent binary compiled for IPSP(Internet Protocol Support Profile)
-%if 0%{?gcov:1}
-%package gcov
-Summary: Test package for bluetooth-agent
-Group: TO_BE/FILLED
-Requires: %{name} = %{version}-%{release}
+%package tool
+Summary: Test Application for HF
-%description gcov
-This package is C-API test application.
-%endif
+%description tool
+Test Application for HF
%prep
%setup -q
export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_HFP_AG"
export CFLAGS="$CFLAGS -DTIZEN_SUPPORT_DUAL_HF"
-%ifarch aarch64 x86_64
+%ifarch aarch64 x86_64 riscv64
echo arch64
export CFLAGS+=" -DARCH64"
export CXXFLAGS+=" -DARCH64"
%cmake . -DCMAKE_INSTALL_PREFIX=/usr \
-DTIZEN_FEATURE_BT_HFP_AG=1 \
-DBUILD_GTESTS=%{?gcov:1}%{!?gcov:0} \
- -DBUILD_GCOV=%{?gcov:1}%{!?gcov:0}
+ -DBUILD_GCOV=%{?gcov:1}%{!?gcov:0} \
+ -DDA_PROFILE=%{?_with_da_profile:1}%{!?_with_da_profile:0}
make VERBOSE=1
rm -rf %{buildroot}
%make_install
+mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants/
+
# This usage of profile macro does NOT conflict 4.0 configurability.
#%if "%{?profile}" != "mobile" && "%{?profile}" != "tv"
# Original: wearable, ivi. Added: common, "undefined"
#install -D -m 0644 %{buildroot}/usr/bin/bluetooth-hf-agent %{buildroot}%{_bindir}/
#install -D -m 0644 %{buildroot}/usr/bin/bluetooth-ipsp-agent %{buildroot}%{_bindir}/
#%endif
+%if !0%{?_with_da_profile:1}
install -D -m 0644 packaging/bluetooth-map-agent.service %{buildroot}%{_unitdir}/bluetooth-map-agent.service
+%endif
install -D -m 0644 packaging/bluetooth-pbap-agent.service %{buildroot}%{_unitdir}/bluetooth-pbap-agent.service
install -D -m 0644 packaging/bluetooth-ag-agent.service %{buildroot}%{_unitdir}/bluetooth-ag-agent.service
install -D -m 0644 packaging/bluetooth-hf-agent.service %{buildroot}%{_unitdir}/bluetooth-hf-agent.service
install -D -m 0644 packaging/bluetooth-hid-agent.service %{buildroot}%{_unitdir}/bluetooth-hid-agent.service
+ln -s ../bluetooth-hf-agent.service %{buildroot}%{_unitdir}/multi-user.target.wants/bluetooth-hf-agent.service
%if 0%{?gcov:1}
mkdir -p %{buildroot}%{_datadir}/gcov/obj/%{name}
%manifest %{name}.manifest
%license LICENSE
%defattr(-, root, root)
+%exclude %{_bindir}/gtest-bluetooth-agent
+%exclude %{_libdir}/lib*
+%exclude %{_datadir}/gcov/obj/*
%files hfp_ag
%manifest %{name}.manifest
%{_datadir}/dbus-1/system-services/org.bluez.hf_agent.service
%{_sysconfdir}/dbus-1/system.d/bluetooth-hf-agent.conf
%{_unitdir}/bluetooth-hf-agent.service
+%{_unitdir}/multi-user.target.wants/bluetooth-hf-agent.service
#%exclude %{_unitdir}/bluetooth-map-agent.service
#%exclude %{_unitdir}/bluetooth-pbap-agent.service
+%if !0%{?_with_da_profile:1}
%files map
%manifest %{name}.manifest
%license LICENSE
%{_datadir}/dbus-1/system-services/org.bluez.map_agent.service
%{_unitdir}/bluetooth-map-agent.service
%{_sysconfdir}/dbus-1/system.d/bluetooth_map_agent.conf
+%endif
%files pbap
%manifest %{name}.manifest
%{_datadir}/dbus-1/system-services/org.bluez.ipsp_agent.service
%{_sysconfdir}/dbus-1/system.d/bluetooth-ipsp-agent.conf
-%if 0%{?gcov:1}
-%files gcov
-%manifest %{name}.manifest
-%{_bindir}/gtest-bluetooth-agent
-%{_libdir}/lib*
-%{_datadir}/gcov/obj/*
-%endif
+%files tool
+%{_bindir}/hf-test