1 %bcond_with bluetooth_frwk_libnotify
2 %bcond_with bluetooth_frwk_libnotification
6 Summary: Bluetooth framework for BlueZ and Obexd
9 Group: Network & Connectivity/Bluetooth
11 Source0: %{name}-%{version}.tar.gz
12 Source1001: bluetooth-frwk.manifest
13 Source1002: bt-icon.png
14 URL: https://review.tizen.org/git/?p=platform/core/connectivity/bluetooth-frwk.git;a=summary
16 Requires: bluetooth-tools
17 BuildRequires: pkgconfig(aul)
18 BuildRequires: pkgconfig(dbus-glib-1)
19 BuildRequires: pkgconfig(dlog)
20 BuildRequires: pkgconfig(glib-2.0)
21 %if %{with bluetooth_frwk_libnotify}
22 BuildRequires: pkgconfig(libnotify)
23 BuildRequires: pkgconfig(gdk-pixbuf-2.0)
24 BuildRequires: pkgconfig(gtk+-3.0)
25 %elif %{without bluetooth_frwk_libnotification}
26 BuildRequires: pkgconfig(syspopup-caller)
29 BuildRequires: pkgconfig(vconf)
30 BuildRequires: pkgconfig(libxml-2.0)
31 BuildRequires: pkgconfig(dbus-1)
33 BuildRequires: pkgconfig(utilX)
35 BuildRequires: pkgconfig(capi-network-tethering)
36 BuildRequires: pkgconfig(libprivilege-control)
37 BuildRequires: pkgconfig(status)
38 BuildRequires: pkgconfig(alarm-service)
39 BuildRequires: pkgconfig(notification)
41 BuildRequires: pkgconfig(libtzplatform-config)
43 Requires(post): /usr/bin/vconftool
44 Requires(post): /sbin/ldconfig
45 Requires(postun): /sbin/ldconfig
48 Bluetooth framework for BlueZ and Obexd. This package is Bluetooth framework based on BlueZ and Obexd stack.
49 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
53 Summary: Bluetooth framework for BlueZ and Obexd
54 Group: Development/Libraries
55 Requires: %{name} = %{version}-%{release}
58 This package is development files for Bluetooth framework based on BlueZ and Obexd stack.
59 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
62 Summary: Bluetooth Service daemon
63 Group: Network & Connectivity/Bluetooth
64 Requires: %{name} = %{version}-%{release}
67 This package is Bluetooth Service daemon to manage BT services.
70 Summary: Bluetooth Core daemon
71 Group: Network & Connectivity/Bluetooth
72 Requires: %{name} = %{version}-%{release}
76 This package is Bluetooth core daemon to manage activation / deactivation.
86 export CFLAGS="${CFLAGS} -Wall -g -fvisibility=hidden -fPIC"
87 export LDFLAGS="${LDFLAGS} -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs"
89 export CFLAGS="${CFLAGS} -fpie"
90 export LDFLAGS="${LDFLAGS} -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
94 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
95 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
96 %if %{with bluetooth_frwk_libnotify}
97 -DLIBNOTIFY_SUPPORT=On \
99 -DLIBNOTIFY_SUPPORT=Off \
101 %if %{with bluetooth_frwk_libnotification}
102 -DLIBNOTIFICATION_SUPPORT=On
104 -DLIBNOTIFICATION_SUPPORT=Off
113 mkdir -p %{buildroot}%{_unitdir_user}
114 install -m 0644 bt-service/bluetooth-frwk-service.service %{buildroot}%{_unitdir_user}
116 %if %{with bluetooth_frwk_libnotify} || %{with bluetooth_frwk_libnotification}
117 mkdir -p %{buildroot}%{_datadir}/icons/default
118 install -m 0644 %{SOURCE1002} %{buildroot}%{_datadir}/icons/default/bt-icon.png
121 # On IVI bt-service needs to be run as 'app' even if there is a 'guest' user.
122 %if "%{profile}"=="ivi"
123 sed -i 's/%TZ_SYS_DEFAULT_USER/app/' %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service
128 vconftool set -f -t int db/bluetooth/status "0" -g 6520
129 vconftool set -f -t int file/private/bt-service/flight_mode_deactivated "0" -g 6520 -i
130 vconftool set -f -t string memory/bluetooth/sco_headset_name "" -g 6520 -i
131 vconftool set -f -t int memory/bluetooth/device "0" -g 6520 -i
132 vconftool set -f -t int memory/bluetooth/btsco "0" -g 6520 -i
133 # set 'User' smack label to vconf keys in order to allow bt-service to access them.
134 chsmack -a 'User' %TZ_SYS_CONFIG/db/bluetooth/status
135 chsmack -a 'User' %TZ_SYS_CONFIG/file/private/bt-service/flight_mode_deactivated
136 chsmack -a 'User' %TZ_SYS_CONFIG/memory_init/memory/bluetooth/sco_headset_name
137 chsmack -a 'User' %TZ_SYS_CONFIG/memory_init/memory/bluetooth/device
138 chsmack -a 'User' %TZ_SYS_CONFIG/memory_init/memory/bluetooth/btsco
140 %postun -p /sbin/ldconfig
143 %manifest %{name}.manifest
144 %defattr(-, root, root)
145 %{_libdir}/libbluetooth-api.so.*
148 %manifest %{name}.manifest
149 %defattr(-, root, root)
150 %{_includedir}/bt-service/bluetooth-api.h
151 %{_includedir}/bt-service/bluetooth-hid-api.h
152 %{_includedir}/bt-service/bluetooth-audio-api.h
153 %{_includedir}/bt-service/bluetooth-telephony-api.h
154 %{_includedir}/bt-service/bluetooth-media-control.h
155 %{_libdir}/pkgconfig/bluetooth-api.pc
156 %{_libdir}/libbluetooth-api.so
159 %manifest %{name}.manifest
160 %defattr(-, root, root)
161 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
163 %{_bindir}/bt-service
164 %{_unitdir_user}/bluetooth-frwk-service.service
165 %attr(0666,-,-) /opt/var/lib/bluetooth/auto-pair-blacklist
166 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-service.conf
167 %if %{with bluetooth_frwk_libnotify} || %{with bluetooth_frwk_libnotification}
168 %{_datadir}/icons/default/bt-icon.png
172 %manifest %{name}.manifest
173 %defattr(-, root, root)
174 %{_datadir}/dbus-1/system-services/org.projectx.bt_core.service
176 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-core.conf