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)
40 BuildRequires: pkgconfig(security-server)
42 BuildRequires: pkgconfig(libtzplatform-config)
44 Requires(post): /usr/bin/vconftool
45 Requires(post): /sbin/ldconfig
46 Requires(postun): /sbin/ldconfig
49 Bluetooth framework for BlueZ and Obexd. This package is Bluetooth framework based on BlueZ and Obexd stack.
50 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
54 Summary: Bluetooth framework for BlueZ and Obexd
55 Group: Development/Libraries
56 Requires: %{name} = %{version}-%{release}
59 This package is development files for Bluetooth framework based on BlueZ and Obexd stack.
60 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
63 Summary: Bluetooth Service daemon
64 Group: Network & Connectivity/Bluetooth
65 Requires: %{name} = %{version}-%{release}
68 This package is Bluetooth Service daemon to manage BT services.
71 Summary: Bluetooth Core daemon
72 Group: Network & Connectivity/Bluetooth
73 Requires: %{name} = %{version}-%{release}
77 This package is Bluetooth core daemon to manage activation / deactivation.
87 export CFLAGS="${CFLAGS} -Wall -g -fvisibility=hidden -fPIC"
88 export LDFLAGS="${LDFLAGS} -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs"
90 export CFLAGS="${CFLAGS} -fpie"
91 export LDFLAGS="${LDFLAGS} -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
95 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
96 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
97 %if %{with bluetooth_frwk_libnotify}
98 -DLIBNOTIFY_SUPPORT=On \
100 -DLIBNOTIFY_SUPPORT=Off \
102 %if %{with bluetooth_frwk_libnotification}
103 -DLIBNOTIFICATION_SUPPORT=On
105 -DLIBNOTIFICATION_SUPPORT=Off
114 mkdir -p %{buildroot}%{_unitdir_user}
115 install -m 0644 bt-service/bluetooth-frwk-service.service %{buildroot}%{_unitdir_user}
117 %if %{with bluetooth_frwk_libnotify} || %{with bluetooth_frwk_libnotification}
118 mkdir -p %{buildroot}%{_datadir}/icons/default
119 install -m 0644 %{SOURCE1002} %{buildroot}%{_datadir}/icons/default/bt-icon.png
122 # On IVI bt-service needs to be run as 'app' even if there is a 'guest' user.
123 %if "%{profile}"=="ivi"
124 sed -i 's/%TZ_SYS_DEFAULT_USER/app/' %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service
129 vconftool set -f -t int db/bluetooth/status "0" -g 6520
130 vconftool set -f -t int file/private/bt-service/flight_mode_deactivated "0" -g 6520 -i
131 vconftool set -f -t string memory/bluetooth/sco_headset_name "" -g 6520 -i
132 vconftool set -f -t int memory/bluetooth/device "0" -g 6520 -i
133 vconftool set -f -t int memory/bluetooth/btsco "0" -g 6520 -i
134 # set 'User' smack label to vconf keys in order to allow bt-service to access them.
135 chsmack -a 'User' %TZ_SYS_CONFIG/db/bluetooth/status
136 chsmack -a 'User' %TZ_SYS_CONFIG/file/private/bt-service/flight_mode_deactivated
137 chsmack -a 'User' %TZ_SYS_CONFIG/memory_init/memory/bluetooth/sco_headset_name
138 chsmack -a 'User' %TZ_SYS_CONFIG/memory_init/memory/bluetooth/device
139 chsmack -a 'User' %TZ_SYS_CONFIG/memory_init/memory/bluetooth/btsco
141 %postun -p /sbin/ldconfig
144 %manifest %{name}.manifest
145 %defattr(-, root, root)
146 %{_libdir}/libbluetooth-api.so.*
149 %manifest %{name}.manifest
150 %defattr(-, root, root)
151 %{_includedir}/bt-service/bluetooth-api.h
152 %{_includedir}/bt-service/bluetooth-hid-api.h
153 %{_includedir}/bt-service/bluetooth-audio-api.h
154 %{_includedir}/bt-service/bluetooth-telephony-api.h
155 %{_includedir}/bt-service/bluetooth-media-control.h
156 %{_libdir}/pkgconfig/bluetooth-api.pc
157 %{_libdir}/libbluetooth-api.so
160 %manifest %{name}.manifest
161 %defattr(-, root, root)
162 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
164 %{_bindir}/bt-service
165 %{_unitdir_user}/bluetooth-frwk-service.service
166 %attr(0666,-,-) /opt/var/lib/bluetooth/auto-pair-blacklist
167 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-service.conf
168 %if %{with bluetooth_frwk_libnotify} || %{with bluetooth_frwk_libnotification}
169 %{_datadir}/icons/default/bt-icon.png
173 %manifest %{name}.manifest
174 %defattr(-, root, root)
175 %{_datadir}/dbus-1/system-services/org.projectx.bt_core.service
177 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-core.conf