%bcond_with x %define _dumpdir /opt/etc/dump.d/module.d %define _varlibdir /opt/var/lib Name: bluetooth-frwk Summary: Bluetooth framework for BlueZ and Obexd. This package is Bluetooth framework based on BlueZ and Obexd stack. Version: 0.2.157 Release: 1 Group: Network & Connectivity/Bluetooth License: Apache-2.0 Source0: %{name}-%{version}.tar.gz Source1001: bluetooth-frwk.manifest Requires: syspopup %if "%{?profile}" != "mobile" Requires: bluetooth-tools %endif BuildRequires: pkgconfig(aul) BuildRequires: pkgconfig(dlog) BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(gio-2.0) BuildRequires: pkgconfig(gio-unix-2.0) BuildRequires: pkgconfig(syspopup-caller) BuildRequires: pkgconfig(vconf) BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(capi-network-connection) BuildRequires: pkgconfig(alarm-service) BuildRequires: pkgconfig(capi-content-mime-type) BuildRequires: pkgconfig(appcore-efl) BuildRequires: pkgconfig(pkgmgr) #BuildRequires: pkgconfig(journal) BuildRequires: pkgconfig(eventsystem) BuildRequires: pkgconfig(libsoup-2.4) BuildRequires: pkgconfig(capi-network-tethering) BuildRequires: cmake BuildRequires: pkgconfig(cynara-client) BuildRequires: pkgconfig(cynara-creds-gdbus) BuildRequires: pkgconfig(libtzplatform-config) BuildRequires: pkgconfig(storage) BuildRequires: pkgconfig(capi-system-info) Requires(post): /usr/bin/vconftool Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig Requires: psmisc %description Bluetooth framework for BlueZ and Obexd. This package is Bluetooth framework based on BlueZ and Obexd stack. This package contains API set for BT GAP, BT SDP, and BT RFCOMM. %package profile_common Summary: bluetooth-frwk service and conf files for common profile Requires: %{name} = %{version}-%{release} Conflicts: %{name}-profile_mobile Conflicts: %{name}-profile_wearable Conflicts: %{name}-profile_tv Conflicts: %{name}-profile_ivi %description profile_common Bluetooth framework configuration and service files for Tizen common profile %package profile_mobile Summary: bluetooth-frwk service and conf files for mobile profile Requires: %{name} = %{version}-%{release} Conflicts: %{name}-profile_common Conflicts: %{name}-profile_wearable Conflicts: %{name}-profile_tv Conflicts: %{name}-profile_ivi %description profile_mobile Bluetooth framework configuration and service files for Tizen mobile profile # extension-TM1 %ifarch %{ix86} || %{arm} %package extension-TM1 Summary: bluetooth-frwk service and conf files for mobile TM1 Requires: %{name}-profile_mobile = %{version}-%{release} %description extension-TM1 Bluetooth framework configuration and service files for Tizen mobile TM1 %endif %package profile_wearable Summary: bluetooth-frwk service and conf files for wearable profile Requires: %{name} = %{version}-%{release} Conflicts: %{name}-profile_mobile Conflicts: %{name}-profile_common Conflicts: %{name}-profile_tv Conflicts: %{name}-profile_ivi %description profile_wearable Bluetooth framework configuration and service files for Tizen wearable profile %package profile_tv Summary: bluetooth-frwk service and conf files for tv profile Requires: %{name} = %{version}-%{release} Conflicts: %{name}-profile_mobile Conflicts: %{name}-profile_wearable Conflicts: %{name}-profile_common Conflicts: %{name}-profile_ivi %description profile_tv Bluetooth framework configuration and service files for Tizen tv profile %package profile_ivi Summary: bluetooth-frwk service and conf files for ivi profile Requires: %{name} = %{version}-%{release} Conflicts: %{name}-profile_mobile Conflicts: %{name}-profile_wearable Conflicts: %{name}-profile_tv Conflicts: %{name}-profile_common %description profile_ivi Bluetooth framework configuration and service files for Tizen ivi profile %package devel Summary: Bluetooth framework for BlueZ and Obexd Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel This package is development files for Bluetooth framework based on BlueZ and Obexd stack. This package contains API set for BT GAP, BT SDP, and BT RFCOMM. %package service Summary: Bluetooth Service daemon Group: Network & Connectivity/Bluetooth Requires: %{name} = %{version}-%{release} %description service This package is Bluetooth Service daemon to manage BT services. %package httpproxy Summary: Bluetooth HTTP Proxy Service daemon Group: TO_BE/FILLED Requires: %{name} = %{version}-%{release} %description httpproxy This package is Bluetooth HTTP Proxy Service daemon %package core Summary: Bluetooth Core daemon Group: Network & Connectivity/Bluetooth Requires: %{name} = %{version}-%{release} %description core This package is Bluetooth core daemon to manage activation / deactivation. %package test Summary: Bluetooth test application Group: Network & Connectivity/Bluetooth Requires: %{name} = %{version}-%{release} %description test This package is Bluetooth test application. %prep %setup -q cp %{SOURCE1001} . %build export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE" export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE" export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE" %ifarch x86_64 export CFLAGS="$CFLAGS -Wall -g -fvisibility=hidden -fPIC" export CFLAGS+=" -DARCH64" export CXXFLAGS+=" -DARCH64" export FFLAGS+=" -DARCH64" %else export CFLAGS="$CFLAGS -fpie" export LDFLAGS="$CFLAGS -pie" %endif export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_RFCOMM_DIRECT" export LDFLAGS="$CFLAGS -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs" %if "%{?_with_emulator}" == "1" export CFLAGS="$CFLAGS -DTIZEN_TEST_EMUL" export CXXFLAGS="$CXXFLAGS -DTIZEN_TEST_EMUL" export FFLAGS="$FFLAGS -DTIZEN_TEST_EMUL" %endif %ifarch aarch64 echo arch64 export CFLAGS+=" -DARCH64" export CXXFLAGS+=" -DARCH64" export FFLAGS+=" -DARCH64" %endif export CFLAGS_DEFAULT="$CFLAGS" export CXXFLAGS_DEFAULT="$CXXFLAGS" export FFLAGS_DEFAULT="$FFLAGS" # extension-TM1 %ifarch %{ix86} || %{arm} mkdir -p tm1 export CFLAGS="$CFLAGS_DEFAULT -DTIZEN_FEATURE_RADIO" export CXXFLAGS="$CXXFLAGS_DEFAULT -DTIZEN_FEATURE_RADIO" export FFLAGS="$FFLAGS_DEFAULT -DTIZEN_FEATURE_RADIO" cmake . -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_LIB_DIR=%{_libdir} \ -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \ -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \ -DLIBNOTIFY_SUPPORT=Off \ -DLIBNOTIFICATION_SUPPORT=Off make %cmake %make_install cp %{buildroot}%{_bindir}/bt-core tm1/bt-core.tm1 %endif # non-extension-TM1 export CFLAGS="$CFLAGS_DEFAULT" export CXXFLAGS="$CXXFLAGS_DEFAULT" export FFLAGS="$FFLAGS_DEFAULT" cmake . -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_LIB_DIR=%{_libdir} \ -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \ -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \ -DLIBNOTIFY_SUPPORT=Off \ -DLIBNOTIFICATION_SUPPORT=Off make %cmake %install rm -rf %{buildroot} %make_install install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-service install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-httpproxy install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-devel mkdir -p %{buildroot}%{_unitdir}/starter.target.wants mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants # Rename the postfix (.mobile, .tv, ..) at post script # mobile install -m 0644 packaging/bluetooth-frwk-mobile.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.mobile # extension-TM1 %ifarch %{ix86} || %{arm} cp tm1/bt-core.tm1 %{buildroot}%{_bindir}/ install -m 0644 packaging/bluetooth-frwk-mobile-sprd.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.tm1 %endif # wearable / ivi install -m 0644 packaging/bluetooth-frwk-wearable.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.wearable # On IVI bt-service needs to be run as 'app' even if there is a 'guest' user. cp %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service.ivi sed -i 's/%TZ_SYS_DEFAULT_USER/app/' %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service.ivi # tv install -m 0644 packaging/bluetooth-frwk-tv.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.tv # common install -m 0644 packaging/bluetooth-frwk-common.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.common ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/multi-user.target.wants/bluetooth-frwk.service ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/starter.target.wants/bluetooth-frwk.service %postun -p /sbin/ldconfig %files %manifest %{name}.manifest %defattr(-, root, root) %{_libdir}/libbluetooth-api.so.* %{_datadir}/license/bluetooth-frwk %files devel %defattr(-, root, root) %{_includedir}/bt-service/bluetooth-api.h %{_includedir}/bt-service/bluetooth-hid-api.h %{_includedir}/bt-service/bluetooth-audio-api.h %{_includedir}/bt-service/bluetooth-telephony-api.h %{_includedir}/bt-service/bluetooth-media-control.h %{_includedir}/bt-service/bluetooth-scmst-api.h %{_includedir}/bt-service/bluetooth-ipsp-api.h %{_libdir}/pkgconfig/bluetooth-api.pc %{_libdir}/libbluetooth-api.so %{_datadir}/license/bluetooth-frwk-devel %files service %manifest %{name}.manifest %defattr(-, root, root) %{_bindir}/bt-service %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-service.conf %{_bindir}/bluetooth-frwk-test %{_varlibdir}/bluetooth %{_prefix}/etc/bluetooth %{_datadir}/license/bluetooth-frwk-service %files httpproxy %manifest %{name}.manifest %defattr(-, root, root) %{_bindir}/bt-httpproxy %{_datadir}/license/bluetooth-frwk-httpproxy %{_datadir}/dbus-1/system-services/org.projectx.httpproxy.service %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-httpproxy.conf %files core %manifest %{name}.manifest %defattr(-, root, root) %{_datadir}/dbus-1/system-services/org.projectx.bt_core.service %{_bindir}/bt-core %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-core.conf %files test %manifest %{name}.manifest %defattr(-, root, root) %{_bindir}/bluetooth-frwk-test #{_bindir}/bluetooth-gatt-test #{_bindir}/bluetooth-advertising-test %post profile_common pushd %{_unitdir} mv bluetooth-frwk.service.common bluetooth-frwk.service popd %preun profile_common pushd %{_unitdir} mv bluetooth-frwk.service bluetooth-frwk.service.common popd %files profile_common %{_unitdir}/starter.target.wants/bluetooth-frwk.service %{_unitdir}/bluetooth-frwk.service.common %{_datadir}/dbus-1/system-services/org.projectx.bt.service %post profile_mobile pushd %{_unitdir} mv bluetooth-frwk.service.mobile bluetooth-frwk.service popd %preun profile_mobile pushd %{_unitdir} mv bluetooth-frwk.service bluetooth-frwk.service.mobile popd %files profile_mobile %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service %{_unitdir}/bluetooth-frwk.service.mobile %{_datadir}/dbus-1/system-services/org.projectx.bt.service # extension-TM1 %ifarch %{ix86} || %{arm} %post extension-TM1 pushd %{_unitdir} mv bluetooth-frwk.service.tm1 bluetooth-frwk.service popd pushd %{_bindir} mv bt-core.tm1 bt-core popd %preun extension-TM1 pushd %{_unitdir} mv bluetooth-frwk.service bluetooth-frwk.service.tm1 popd pushd %{_bindir} mv bt-core bt-core.tm1 popd %files extension-TM1 %{_unitdir}/bluetooth-frwk.service.tm1 %defattr(-, root, root) %{_bindir}/bt-core.tm1 %endif %post profile_wearable pushd %{_unitdir} mv bluetooth-frwk.service.wearable bluetooth-frwk.service popd %preun profile_wearable pushd %{_unitdir} mv bluetooth-frwk.service bluetooth-frwk.service.wearable popd %files profile_wearable %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service %{_unitdir}/bluetooth-frwk.service.wearable %{_datadir}/dbus-1/system-services/org.projectx.bt.service %post profile_tv pushd %{_unitdir} mv bluetooth-frwk.service.tv bluetooth-frwk.service popd %preun profile_tv pushd %{_unitdir} mv bluetooth-frwk.service bluetooth-frwk.service.tv popd %files profile_tv %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service %{_unitdir}/bluetooth-frwk.service.tv %{_datadir}/dbus-1/system-services/org.projectx.bt.service # Note: ivi reuses bluetooth-frwk.service.wearable %post profile_ivi pushd %{_unitdir} mv bluetooth-frwk.service.wearable bluetooth-frwk.service popd pushd %{_datadir}/dbus-1/system-services mv org.projectx.bt.service.ivi org.projectx.bt.service popd %preun profile_ivi pushd %{_unitdir} mv bluetooth-frwk.service bluetooth-frwk.service.wearable popd pushd %{_datadir}/dbus-1/system-services mv org.projectx.bt.service org.projectx.bt.service.ivi popd %files profile_ivi %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service %{_unitdir}/bluetooth-frwk.service.wearable %{_datadir}/dbus-1/system-services/org.projectx.bt.service.ivi ### added /usr/etc/bluetooth/wearable/stack_info (others: /usr/etc/bluetooth/stack_info)) # (for PROFILE WEARABLE)