Fix hid-agent service name
[platform/core/connectivity/bluetooth-agent.git] / packaging / bluetooth-agent.spec
index df66624..88f1443 100644 (file)
@@ -119,20 +119,13 @@ export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_HFP_AG"
 export CFLAGS="$CFLAGS -DTIZEN_SUPPORT_DUAL_HF"
 
-%ifarch aarch64
+%ifarch aarch64 x86_64
 echo arch64
 export CFLAGS+=" -DARCH64"
 export CXXFLAGS+=" -DARCH64"
 export FFLAGS+=" -DARCH64"
 %endif
 
-%ifarch x86_64
-echo x86_64
-export CFLAGS+=" -DARCH64"
-export CXXFLAGS+=" -DARCH64"
-export FFLAGS+=" -DARCH64"
-%endif
-
 export CFLAGS+=" -fpie -DTIZEN_FEATURE_BP_PBAP_SIM -fvisibility=hidden "
 export CXXFLAGS+=" -fpie -DTIZEN_FEATURE_BP_PBAP_SIM -fvisibility=hidden "
 
@@ -140,8 +133,15 @@ export LDFLAGS+=" -Wl,--rpath=/usr/lib -Wl,--as-needed -Wl,--unresolved-symbols=
 
 export CFLAGS_DEFAULT="$CFLAGS"
 
+%if 0%{?gcov:1}
+export CFLAGS+=" -fprofile-arcs -ftest-coverage"
+export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
+export FFLAGS+=" -fprofile-arcs -ftest-coverage"
+export LDFLAGS+=" -lgcov"
+%endif
+
 # Build All (wearalbe/ivi/common/tv/mobile)
-cmake . -DCMAKE_INSTALL_PREFIX=/usr \
+%cmake . -DCMAKE_INSTALL_PREFIX=/usr \
        -DTIZEN_FEATURE_BT_HFP_AG=1 \
        -DBUILD_GTESTS=%{?gcov:1}%{!?gcov:0} \
        -DBUILD_GCOV=%{?gcov:1}%{!?gcov:0}
@@ -152,7 +152,6 @@ make VERBOSE=1
 rm -rf %{buildroot}
 %make_install
 
-install -D -m 0644 packaging/bluetooth-map-agent.service %{buildroot}%{_libdir}/systemd/system/bluetooth-map-agent.service
 # This usage of profile macro does NOT conflict 4.0 configurability.
 #%if "%{?profile}" != "mobile" && "%{?profile}" != "tv"
 # Original: wearable, ivi. Added: common, "undefined"
@@ -163,13 +162,11 @@ install -D -m 0644 packaging/bluetooth-map-agent.service %{buildroot}%{_libdir}/
 #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
-
-%post
-%if 0%{?sec_product_feature_bt_map_server_enable}
-ln -sf %{_libdir}/systemd/user/bluetooth-map-agent.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
-%endif
-ln -sf %{_libdir}/systemd/system/bluetooth-pbap-agent.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
+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
 
 %files
 %manifest %{name}.manifest
@@ -183,6 +180,7 @@ ln -sf %{_libdir}/systemd/system/bluetooth-pbap-agent.service %{_sysconfdir}/sys
 %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
 
@@ -192,6 +190,7 @@ ln -sf %{_libdir}/systemd/system/bluetooth-pbap-agent.service %{_sysconfdir}/sys
 %{_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
 
@@ -201,6 +200,7 @@ ln -sf %{_libdir}/systemd/system/bluetooth-pbap-agent.service %{_sysconfdir}/sys
 %{_bindir}/bluetooth-map-agent
 %{_datadir}/dbus-1/system-services/org.bluez.map_agent.service
 %{_libdir}/systemd/system/bluetooth-map-agent.service
+%{_sysconfdir}/dbus-1/system.d/bluetooth_map_agent.conf
 
 %files pbap
 %manifest %{name}.manifest
@@ -208,12 +208,15 @@ ln -sf %{_libdir}/systemd/system/bluetooth-pbap-agent.service %{_sysconfdir}/sys
 %{_bindir}/bluetooth-pb-agent
 %{_datadir}/dbus-1/system-services/org.bluez.pb_agent.service
 %{_libdir}/systemd/system/bluetooth-pbap-agent.service
+%{_sysconfdir}/dbus-1/system.d/bluetooth_pb_agent.conf
 
 %files hid
 %manifest %{name}.manifest
 %license LICENSE
 %{_bindir}/bluetooth-hid-agent
 %{_datadir}/dbus-1/system-services/org.bluez.hid_agent.service
+%{_libdir}/systemd/system/bluetooth-hid-agent.service
+%{_sysconfdir}/dbus-1/system.d/bluetooth-hid-agent.conf
 
 %files ipsp
 %manifest %{name}.manifest
@@ -227,6 +230,4 @@ ln -sf %{_libdir}/systemd/system/bluetooth-pbap-agent.service %{_sysconfdir}/sys
 %manifest %{name}.manifest
 %{_bindir}/gtest-bluetooth-agent
 %{_libdir}/lib*
-%exclude %{_libdir}/debug/*
-%exclude %{_libdir}/debug/.build-id/*
 %endif