Modify the service file path for 64bit target
[platform/core/connectivity/bluetooth-agent.git] / packaging / bluetooth-agent.spec
index ef5fde1..953be0e 100644 (file)
@@ -47,6 +47,7 @@ BuildRequires:  cmake
 Requires: security-config
 %if 0%{?gcov:1}
 BuildRequires:  pkgconfig(gmock)
+BuildRequires:  lcov
 %endif
 
 #Requires:     %{name}-compat = %{version}-%{release}
@@ -98,12 +99,12 @@ Group:      Network & Connectivity/Bluetooth
 Bluetooth agent binary compiled for IPSP(Internet Protocol Support Profile)
 
 %if 0%{?gcov:1}
-%package test
+%package gcov
 Summary: Test package for bluetooth-agent
 Group:   TO_BE/FILLED
 Requires: %{name} = %{version}-%{release}
 
-%description test
+%description gcov
 This package is C-API test application.
 %endif
 
@@ -115,7 +116,7 @@ cp %{SOURCE1001} .
 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
-#export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_MEDIA_ENHANCE"
+export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_MEDIA_ENHANCE"
 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_HFP_AG"
 export CFLAGS="$CFLAGS -DTIZEN_SUPPORT_DUAL_HF"
 
@@ -148,10 +149,20 @@ export LDFLAGS+=" -lgcov"
 
 make VERBOSE=1
 
+%if 0%{?gcov:1}
+mkdir -p gcov-obj
+find . -name '*.gcno' -exec cp '{}' gcov-obj ';'
+%endif
+
 %install
 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
+
 # This usage of profile macro does NOT conflict 4.0 configurability.
 #%if "%{?profile}" != "mobile" && "%{?profile}" != "tv"
 # Original: wearable, ivi. Added: common, "undefined"
@@ -162,11 +173,11 @@ rm -rf %{buildroot}
 #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-hf-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
 
 %files
 %manifest %{name}.manifest
@@ -180,9 +191,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
@@ -190,16 +201,16 @@ 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
+#%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
@@ -207,7 +218,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
@@ -215,6 +226,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
+%{_unitdir}/bluetooth-hid-agent.service
 %{_sysconfdir}/dbus-1/system.d/bluetooth-hid-agent.conf
 
 %files ipsp
@@ -225,8 +237,9 @@ install -D -m 0644 packaging/bluetooth-hid-agent.service %{buildroot}%{_libdir}/
 %{_sysconfdir}/dbus-1/system.d/bluetooth-ipsp-agent.conf
 
 %if 0%{?gcov:1}
-%files test
+%files gcov
 %manifest %{name}.manifest
 %{_bindir}/gtest-bluetooth-agent
 %{_libdir}/lib*
+%{_datadir}/gcov/obj/*
 %endif