Increase the version to 7.5
[platform/core/connectivity/bluetooth-agent.git] / packaging / bluetooth-agent.spec
index a1cf824..3b5b413 100644 (file)
@@ -2,7 +2,7 @@
 
 Name:       bluetooth-agent
 Summary:    Bluetooth agent packages that support various external profiles
-Version:    0.1.3
+Version:    0.7.5
 Release:    1
 Group:      Network & Connectivity/Bluetooth
 License:    Apache-2.0
@@ -11,6 +11,7 @@ Source1001:   bluetooth-agent.manifest
 
 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
@@ -46,7 +47,7 @@ BuildRequires:  pkgconfig(gio-2.0)
 BuildRequires:  cmake
 Requires: security-config
 %if 0%{?gcov:1}
-BuildRequires:  pkgconfig(gmock)
+BuildRequires:  gtest-devel
 BuildRequires:  lcov
 %endif
 
@@ -98,15 +99,11 @@ Group:      Network & Connectivity/Bluetooth
 %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
@@ -120,7 +117,7 @@ export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_MEDIA_ENHANCE"
 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"
@@ -158,10 +155,7 @@ find . -name '*.gcno' -exec cp '{}' gcov-obj ';'
 rm -rf %{buildroot}
 %make_install
 
-%if 0%{?gcov:1}
-mkdir -p %{buildroot}%{_datadir}/gcov/obj
-install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj
-%endif
+mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants/
 
 # This usage of profile macro does NOT conflict 4.0 configurability.
 #%if "%{?profile}" != "mobile" && "%{?profile}" != "tv"
@@ -173,16 +167,32 @@ install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj
 #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
-install -D -m 0644 packaging/bluetooth-map-agent.service %{buildroot}%{_libdir}/systemd/system/bluetooth-map-agent.service
-install -D -m 0644 packaging/bluetooth-pbap-agent.service %{buildroot}%{_libdir}/systemd/system/bluetooth-pbap-agent.service
-install -D -m 0644 packaging/bluetooth-ag-agent.service %{buildroot}%{_libdir}/systemd/system/bluetooth-ag-agent.service
-install -D -m 0644 packaging/bluetooth-hf-agent.service %{buildroot}%{_libdir}/systemd/system/bluetooth-hf-agent.service
-install -D -m 0644 packaging/bluetooth-hid-agent.service %{buildroot}%{_libdir}/systemd/system/bluetooth-hid-agent.service
+install -D -m 0644 packaging/bluetooth-map-agent.service %{buildroot}%{_unitdir}/bluetooth-map-agent.service
+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}
+install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj/%{name}/
+%endif
+
+%check
+%if 0%{?gcov:1}
+pushd unittest
+./run_coverage.sh
+popd
+%endif
 
 %files
 %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
@@ -191,9 +201,9 @@ install -D -m 0644 packaging/bluetooth-hid-agent.service %{buildroot}%{_libdir}/
 %attr(0666,-,-) /var/lib/bluetooth/voice-recognition-blacklist
 %{_datadir}/dbus-1/system-services/org.bluez.ag_agent.service
 %{_sysconfdir}/dbus-1/system.d/bluetooth-ag-agent.conf
-%{_libdir}/systemd/system/bluetooth-ag-agent.service
-#%exclude %{_libdir}/systemd/system/bluetooth-map-agent.service
-#%exclude %{_libdir}/systemd/system/bluetooth-pbap-agent.service
+%{_unitdir}/bluetooth-ag-agent.service
+#%exclude %{_unitdir}/bluetooth-map-agent.service
+#%exclude %{_unitdir}/bluetooth-pbap-agent.service
 
 %files hfp_hf
 %manifest %{name}.manifest
@@ -201,16 +211,17 @@ install -D -m 0644 packaging/bluetooth-hid-agent.service %{buildroot}%{_libdir}/
 %{_bindir}/bluetooth-hf-agent
 %{_datadir}/dbus-1/system-services/org.bluez.hf_agent.service
 %{_sysconfdir}/dbus-1/system.d/bluetooth-hf-agent.conf
-%{_libdir}/systemd/system/bluetooth-hf-agent.service
-#%exclude %{_libdir}/systemd/system/bluetooth-map-agent.service
-#%exclude %{_libdir}/systemd/system/bluetooth-pbap-agent.service
+%{_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
 
 %files map
 %manifest %{name}.manifest
 %license LICENSE
 %{_bindir}/bluetooth-map-agent
 %{_datadir}/dbus-1/system-services/org.bluez.map_agent.service
-%{_libdir}/systemd/system/bluetooth-map-agent.service
+%{_unitdir}/bluetooth-map-agent.service
 %{_sysconfdir}/dbus-1/system.d/bluetooth_map_agent.conf
 
 %files pbap
@@ -218,7 +229,7 @@ install -D -m 0644 packaging/bluetooth-hid-agent.service %{buildroot}%{_libdir}/
 %license LICENSE
 %{_bindir}/bluetooth-pb-agent
 %{_datadir}/dbus-1/system-services/org.bluez.pb_agent.service
-%{_libdir}/systemd/system/bluetooth-pbap-agent.service
+%{_unitdir}/bluetooth-pbap-agent.service
 %{_sysconfdir}/dbus-1/system.d/bluetooth_pb_agent.conf
 
 %files hid
@@ -226,7 +237,7 @@ install -D -m 0644 packaging/bluetooth-hid-agent.service %{buildroot}%{_libdir}/
 %license LICENSE
 %{_bindir}/bluetooth-hid-agent
 %{_datadir}/dbus-1/system-services/org.bluez.hid_agent.service
-%{_libdir}/systemd/system/bluetooth-hid-agent.service
+%{_unitdir}/bluetooth-hid-agent.service
 %{_sysconfdir}/dbus-1/system.d/bluetooth-hid-agent.conf
 
 %files ipsp
@@ -236,10 +247,5 @@ install -D -m 0644 packaging/bluetooth-hid-agent.service %{buildroot}%{_libdir}/
 %{_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