+%bcond_with bluetooth_frwk_libnotify
Name: bluetooth-frwk
Summary: Bluetooth framework for BlueZ and Obexd
Version: 0.2.57
Group: Connectivity/Bluetooth
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
+Source1001: bluetooth-frwk.manifest
+Source1002: bt-icon.png
URL: https://review.tizen.org/git/?p=platform/core/connectivity/bluetooth-frwk.git;a=summary
-Requires: sys-assert
Requires: dbus
Requires: syspopup
+Requires:bluetooth-tools
BuildRequires: pkgconfig(aul)
BuildRequires: pkgconfig(dbus-glib-1)
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(glib-2.0)
+%if %{with bluetooth_frwk_libnotify}
+BuildRequires: pkgconfig(libnotify)
+BuildRequires: pkgconfig(gdk-pixbuf-2.0)
+BuildRequires: pkgconfig(gtk+-3.0)
+%else
BuildRequires: pkgconfig(syspopup-caller)
+%endif
BuildRequires: pkgconfig(vconf)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(dbus-1)
%prep
%setup -q
+cp %{SOURCE1001} .
%build
export CFLAGS+=" -fpie"
export LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
%endif
-%cmake .
+%cmake . \
+%if %{with bluetooth_frwk_libnotify}
+ -DLIBNOTIFY_SUPPORT=On
+%else
+ -DLIBNOTIFY_SUPPORT=Off
+%endif
make
install -m 0644 bt-service/bluetooth-frwk-service.service %{buildroot}%{_unitdir_user}
ln -s ../bluetooth-frwk-service.service %{buildroot}%{_unitdir_user}/tizen-middleware.target.wants/bluetooth-frwk-service.service
+%if %{with bluetooth_frwk_libnotify}
+mkdir -p %{buildroot}%{_datadir}/icons/default
+install -m 0644 %{SOURCE1002} %{buildroot}%{_datadir}/icons/default/bt-icon.png
+%endif
%post
/sbin/ldconfig
%postun -p /sbin/ldconfig
%files
+%manifest %{name}.manifest
%defattr(-, root, root)
%{_libdir}/libbluetooth-api.so.*
%files devel
+%manifest %{name}.manifest
%defattr(-, root, root)
%{_includedir}/bt-service/bluetooth-api.h
%{_includedir}/bt-service/bluetooth-hid-api.h
%{_libdir}/libbluetooth-api.so
%files service
-%manifest bluetooth-frwk.manifest
+%manifest %{name}.manifest
%defattr(-, root, root)
%{_sysconfdir}/rc.d/init.d/bluetooth-frwk-service
%{_sysconfdir}/rc.d/rc3.d/S80bluetooth-frwk-service
%{_sysconfdir}/rc.d/rc5.d/S80bluetooth-frwk-service
-%{_datadir}/dbus-1/services/org.projectx.bt.service
+%{_datadir}/dbus-1/system-services/org.projectx.bt.service
%{_bindir}/bt-service
%{_unitdir_user}/tizen-middleware.target.wants/bluetooth-frwk-service.service
%{_unitdir_user}/bluetooth-frwk-service.service
%attr(0666,-,-) /opt/var/lib/bluetooth/auto-pair-blacklist
+%{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-service.conf
+%if %{with bluetooth_frwk_libnotify}
+%{_datadir}/icons/default/bt-icon.png
+%endif
%files core
+%manifest %{name}.manifest
%defattr(-, root, root)
-%{_datadir}/dbus-1/services/org.projectx.bt_core.service
+%{_datadir}/dbus-1/system-services/org.projectx.bt_core.service
%{_bindir}/bt-core
+%{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-core.conf