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 mkdir -p %{buildroot}%{_unitdir_user}/tizen-middleware.target.wants
116 install -m 0644 bt-service/bluetooth-frwk-service.service %{buildroot}%{_unitdir_user}
117 ln -s ../bluetooth-frwk-service.service %{buildroot}%{_unitdir_user}/tizen-middleware.target.wants/bluetooth-frwk-service.service
119 %if %{with bluetooth_frwk_libnotify} || %{with bluetooth_frwk_libnotification}
120 mkdir -p %{buildroot}%{_datadir}/icons/default
121 install -m 0644 %{SOURCE1002} %{buildroot}%{_datadir}/icons/default/bt-icon.png
124 # On IVI bt-service needs to be run as 'app' even if there is a 'guest' user.
125 %if "%{profile}"=="ivi"
126 sed -i 's/%TZ_SYS_DEFAULT_USER/app/' %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service
131 vconftool set -f -t int db/bluetooth/status "0" -g 6520
132 vconftool set -f -t int file/private/bt-service/flight_mode_deactivated "0" -g 6520 -i
133 vconftool set -f -t string memory/bluetooth/sco_headset_name "" -g 6520 -i
134 vconftool set -f -t int memory/bluetooth/device "0" -g 6520 -i
135 vconftool set -f -t int memory/bluetooth/btsco "0" -g 6520 -i
136 # set 'User' smack label to vconf keys in order to allow bt-service to access them.
137 chsmack -a 'User' %TZ_SYS_CONFIG/db/bluetooth/status
138 chsmack -a 'User' %TZ_SYS_CONFIG/file/private/bt-service/flight_mode_deactivated
139 chsmack -a 'User' %TZ_SYS_CONFIG/memory_init/memory/bluetooth/sco_headset_name
140 chsmack -a 'User' %TZ_SYS_CONFIG/memory_init/memory/bluetooth/device
141 chsmack -a 'User' %TZ_SYS_CONFIG/memory_init/memory/bluetooth/btsco
143 %postun -p /sbin/ldconfig
146 %manifest %{name}.manifest
147 %defattr(-, root, root)
148 %{_libdir}/libbluetooth-api.so.*
151 %manifest %{name}.manifest
152 %defattr(-, root, root)
153 %{_includedir}/bt-service/bluetooth-api.h
154 %{_includedir}/bt-service/bluetooth-hid-api.h
155 %{_includedir}/bt-service/bluetooth-audio-api.h
156 %{_includedir}/bt-service/bluetooth-telephony-api.h
157 %{_includedir}/bt-service/bluetooth-media-control.h
158 %{_libdir}/pkgconfig/bluetooth-api.pc
159 %{_libdir}/libbluetooth-api.so
162 %manifest %{name}.manifest
163 %defattr(-, root, root)
164 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
166 %{_bindir}/bt-service
167 %{_unitdir_user}/tizen-middleware.target.wants/bluetooth-frwk-service.service
168 %{_unitdir_user}/bluetooth-frwk-service.service
169 %attr(0666,-,-) /opt/var/lib/bluetooth/auto-pair-blacklist
170 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-service.conf
171 %if %{with bluetooth_frwk_libnotify} || %{with bluetooth_frwk_libnotification}
172 %{_datadir}/icons/default/bt-icon.png
176 %manifest %{name}.manifest
177 %defattr(-, root, root)
178 %{_datadir}/dbus-1/system-services/org.projectx.bt_core.service
180 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-core.conf