X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=packaging%2Fbluetooth-agent.spec;h=3b5b4134423bc0258c24932584a4d429ec71f474;hb=4ef25ddcc24cea979bb2332121045024c324ef7c;hp=599db739c3c676fc5131849abe37fedf6f477ce5;hpb=5df973c1900877fcba401d7dc753bdc494ed55a5;p=platform%2Fcore%2Fconnectivity%2Fbluetooth-agent.git diff --git a/packaging/bluetooth-agent.spec b/packaging/bluetooth-agent.spec index 599db73..3b5b413 100644 --- a/packaging/bluetooth-agent.spec +++ b/packaging/bluetooth-agent.spec @@ -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 @@ -45,45 +46,64 @@ BuildRequires: pkgconfig(libexif) BuildRequires: pkgconfig(gio-2.0) BuildRequires: cmake Requires: security-config -Requires: %{name}-compat = %{version}-%{release} -Recommends: %{name}-profile_common = %{version}-%{release} +%if 0%{?gcov:1} +BuildRequires: gtest-devel +BuildRequires: lcov +%endif + +#Requires: %{name}-compat = %{version}-%{release} +#Recommends: %{name}-profile_common = %{version}-%{release} %description Bluetooth agent packages that support various external profiles -%package profile_common -Summary: Bluetooth agent for common/tv/mobile -Provides: %{name}-compat = %{version}-%{release} -Provides: %{name}-profile_mobile = %{version}-%{release} -Provides: %{name}-profile_tv = %{version}-%{release} -Conflicts: %{name}-profile_ivi -Conflicts: %{name}-profile_wearable -%description profile_common -Bluetooth agent binary compiled for common, tv, mobile profiles - -%package profile_ivi -Summary: Bluetooth agent for ivi -Provides: %{name}-compat = %{version}-%{release} -Conflicts: %{name}-profile_common -Conflicts: %{name}-profile_wearable -%description profile_ivi -Bluetooth agent binary compiled for ivi profile - -%package profile_wearable -Summary: Bluetooth agent for wearable -Provides: %{name}-compat = %{version}-%{release} -Conflicts: %{name}-profile_common -Conflicts: %{name}-profile_ivi -%description profile_wearable -Bluetooth agent binary compiled for wearable profile +%package hfp_ag +Summary: Bluetooth agent for HFP(Hands-Free Profile)'s AG(Audio Gate) role +Requires: %{name} = %{version}-%{release} +Group: Network & Connectivity/Bluetooth +%description hfp_ag +Bluetooth agent binary compiled for HFP(Hands-Free Profile)'s AG(Audio Gate) role -%package ipsp -Summary: Bluetooth Ipsp daemon +%package hfp_hf +Summary: Bluetooth agent for HFP(Hands-Free Profile)'s HF(Hands-Free) role +Requires: %{name} = %{version}-%{release} Group: Network & Connectivity/Bluetooth +%description hfp_hf +Bluetooth agent binary compiled for HFP(Hands-Free Profile)'s HF(Hands-Free) role + +%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 +%package pbap +Summary: Bluetooth agent for PBAP(PhoneBook Access Profile) server +Requires: %{name} = %{version}-%{release} +Group: Network & Connectivity/Bluetooth +%description pbap +Bluetooth agent binary compiled for PBAP(PhoneBook Access Profile) server + +%package hid +Summary: Bluetooth agent for HID(Human Interface Device)'s device role +Requires: %{name} = %{version}-%{release} +Group: Network & Connectivity/Bluetooth +%description hid +Bluetooth agent binary compiled for HID(Human Interface Device)'s device role + +%package ipsp +Summary: Bluetooth agent for IPSP(Internet Protocol Support Profile) +Requires: %{name} = %{version}-%{release} +Group: Network & Connectivity/Bluetooth %description ipsp -This package is Bluetooth ipsp daemon to manage activation / deactivation. +Bluetooth agent binary compiled for IPSP(Internet Protocol Support Profile) + +%package tool +Summary: Test Application for HF + +%description tool +Test Application for HF %prep %setup -q @@ -93,24 +113,17 @@ 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" -%ifarch aarch64 +%ifarch aarch64 x86_64 riscv64 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 " @@ -118,83 +131,121 @@ 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 -DTIZEN_FEATURE_BT_HFP_AG=1 +%cmake . -DCMAKE_INSTALL_PREFIX=/usr \ + -DTIZEN_FEATURE_BT_HFP_AG=1 \ + -DBUILD_GTESTS=%{?gcov:1}%{!?gcov:0} \ + -DBUILD_GCOV=%{?gcov:1}%{!?gcov:0} + 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 -install -D -m 0644 packaging/bluetooth-map-agent.service %{buildroot}%{_libdir}/systemd/system/bluetooth-map-agent.service +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" #mkdir -p %{buildroot}%{_datadir}/dbus-1/system-services #mkdir -p %{buildroot}%{_bindir}/ #install -D -m 0644 %{buildroot}/usr/share/dbus-1/system-services/org.bluez.hf_agent.service %{buildroot}%{_datadir}/dbus-1/system-services/ -#install -D -m 0644 %{buildroot}/usr/share/dbus-1/system-services/org.projectx.bt_ipsp.service %{buildroot}%{_datadir}/dbus-1/system-services/ +#install -D -m 0644 %{buildroot}/usr/share/dbus-1/system-services/org.bluez.ipsp_agent.service %{buildroot}%{_datadir}/dbus-1/system-services/ #install -D -m 0644 %{buildroot}/usr/bin/bluetooth-hf-agent %{buildroot}%{_bindir}/ -#install -D -m 0644 %{buildroot}/usr/bin/bt-ipsp %{buildroot}%{_bindir}/ +#install -D -m 0644 %{buildroot}/usr/bin/bluetooth-ipsp-agent %{buildroot}%{_bindir}/ #%endif -install -D -m 0644 packaging/bluetooth-pbap-agent.service %{buildroot}%{_libdir}/systemd/system/bluetooth-pbap-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 -%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/ +%check +%if 0%{?gcov:1} +pushd unittest +./run_coverage.sh +popd %endif -ln -sf %{_libdir}/systemd/system/bluetooth-pbap-agent.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/ %files %manifest %{name}.manifest %license LICENSE %defattr(-, root, root) +%exclude %{_bindir}/gtest-bluetooth-agent +%exclude %{_libdir}/lib* +%exclude %{_datadir}/gcov/obj/* -# This usage of profile macro does NOT conflict 4.0 configurability. -%if "%{?profile}" != "mobile" && "%{?profile}" != "tv" -# Original: wearable, ivi. Added: common, "undefined" -%files profile_wearable +%files hfp_ag +%manifest %{name}.manifest %license LICENSE -%{_bindir}/bluetooth-hf-agent %{_bindir}/bluetooth-ag-agent -%{_bindir}/bluetooth-hid-agent -%{_datadir}/dbus-1/system-services/org.bluez.hf_agent.service +%attr(0666,-,-) /var/lib/bluetooth/voice-recognition-blacklist %{_datadir}/dbus-1/system-services/org.bluez.ag_agent.service -%{_datadir}/dbus-1/system-services/org.bluez.hid_agent.service %{_sysconfdir}/dbus-1/system.d/bluetooth-ag-agent.conf -%{_sysconfdir}/dbus-1/system.d/bluetooth-hf-agent.conf -%exclude %{_libdir}/systemd/system/bluetooth-map-agent.service -%exclude %{_libdir}/systemd/system/bluetooth-pbap-agent.service -%endif +%{_unitdir}/bluetooth-ag-agent.service +#%exclude %{_unitdir}/bluetooth-map-agent.service +#%exclude %{_unitdir}/bluetooth-pbap-agent.service -%files profile_ivi +%files hfp_hf +%manifest %{name}.manifest %license LICENSE %{_bindir}/bluetooth-hf-agent %{_datadir}/dbus-1/system-services/org.bluez.hf_agent.service -%exclude %{_libdir}/systemd/system/bluetooth-map-agent.service -%exclude %{_libdir}/systemd/system/bluetooth-pbap-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 -# This usage of profile macro does NOT conflict 4.0 configurability. -%if "%{?profile}" != "wearable" && "%{?profile}" != "ivi" -# Original: common, mobile, tv. Added: "undefined" -%files profile_common +%files map +%manifest %{name}.manifest %license LICENSE -%{_bindir}/bluetooth-ag-agent %{_bindir}/bluetooth-map-agent +%{_datadir}/dbus-1/system-services/org.bluez.map_agent.service +%{_unitdir}/bluetooth-map-agent.service +%{_sysconfdir}/dbus-1/system.d/bluetooth_map_agent.conf + +%files pbap +%manifest %{name}.manifest +%license LICENSE %{_bindir}/bluetooth-pb-agent %{_datadir}/dbus-1/system-services/org.bluez.pb_agent.service -%{_datadir}/dbus-1/system-services/org.bluez.map_agent.service -%{_datadir}/dbus-1/system-services/org.bluez.ag_agent.service -%attr(0666,-,-) /var/lib/bluetooth/voice-recognition-blacklist -%{_sysconfdir}/dbus-1/system.d/bluetooth-ag-agent.conf -%{_libdir}/systemd/system/bluetooth-map-agent.service -%{_libdir}/systemd/system/bluetooth-pbap-agent.service -%endif +%{_unitdir}/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 +%{_unitdir}/bluetooth-hid-agent.service +%{_sysconfdir}/dbus-1/system.d/bluetooth-hid-agent.conf %files ipsp %manifest %{name}.manifest %license LICENSE -%defattr(-, root, root) -%{_datadir}/dbus-1/system-services/org.projectx.bt_ipsp.service -%{_bindir}/bt-ipsp -%{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-ipsp.conf +%{_bindir}/bluetooth-ipsp-agent +%{_datadir}/dbus-1/system-services/org.bluez.ipsp_agent.service +%{_sysconfdir}/dbus-1/system.d/bluetooth-ipsp-agent.conf + +%files tool +%{_bindir}/hf-test