1 %define _usrlibdir /usr/lib
4 Summary: Bluetooth agent packages that support various external profiles
7 Group: Network & Connectivity/Bluetooth
9 Source0: %{name}-%{version}.tar.gz
10 Source1001: bluetooth-agent.manifest
12 BuildRequires: pkgconfig(aul)
13 BuildRequires: pkgconfig(bluetooth-api)
15 # The profile macro usage with the following comments may be removed after
16 # Tizen OBS build projects are merged. However, each vendor may keep using
17 # such if/endif statement to skip building profiles not interested
19 # This usage of profile macro does NOT conflict 4.0 configurability.
20 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv"
21 # Original: wearable, ivi. Added: common, "undefined"
22 BuildRequires: pkgconfig(alarm-service)
23 BuildRequires: pkgconfig(capi-appfw-app-manager)
24 BuildRequires: pkgconfig(capi-system-device)
26 # This usage of profile macro does NOT conflict 4.0 configurability.
27 %if "%{?profile}" != "wearable" && "%{?profile}" != "ivi"
28 # Original: common, mobile, tv. Added: "undefined"
29 BuildRequires: pkgconfig(contacts-service2)
30 BuildRequires: pkgconfig(msg-service)
31 BuildRequires: pkgconfig(email-service)
33 BuildRequires: pkgconfig(capi-system-info)
34 BuildRequires: pkgconfig(dbus-glib-1)
35 BuildRequires: pkgconfig(tapi)
36 BuildRequires: pkgconfig(dlog)
37 BuildRequires: pkgconfig(vconf)
38 BuildRequires: pkgconfig(appsvc)
39 BuildRequires: pkgconfig(capi-appfw-application)
40 BuildRequires: pkgconfig(capi-media-image-util)
41 BuildRequires: pkgconfig(contacts-service2)
42 BuildRequires: pkgconfig(libexif)
43 BuildRequires: pkgconfig(gio-2.0)
45 Requires: security-config
46 Requires: %{name}-compat = %{version}-%{release}
47 Recommends: %{name}-profile_common = %{version}-%{release}
50 Bluetooth agent packages that support various external profiles
52 %package profile_common
53 Summary: Bluetooth agent for common/tv/mobile
54 Provides: %{name}-compat = %{version}-%{release}
55 Provides: %{name}-profile_mobile = %{version}-%{release}
56 Provides: %{name}-profile_tv = %{version}-%{release}
57 Conflicts: %{name}-profile_ivi
58 Conflicts: %{name}-profile_wearable
59 %description profile_common
60 Bluetooth agent binary compiled for common, tv, mobile profiles
63 Summary: Bluetooth agent for ivi
64 Provides: %{name}-compat = %{version}-%{release}
65 Conflicts: %{name}-profile_common
66 Conflicts: %{name}-profile_wearable
67 %description profile_ivi
68 Bluetooth agent binary compiled for ivi profile
70 %package profile_wearable
71 Summary: Bluetooth agent for wearable
72 Provides: %{name}-compat = %{version}-%{release}
73 Conflicts: %{name}-profile_common
74 Conflicts: %{name}-profile_ivi
75 %description profile_wearable
76 Bluetooth agent binary compiled for wearable profile
83 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
84 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
85 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
86 #export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_MEDIA_ENHANCE"
87 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_HFP_AG"
88 export CFLAGS="$CFLAGS -DTIZEN_SUPPORT_DUAL_HF"
92 export CFLAGS+=" -DARCH64"
93 export CXXFLAGS+=" -DARCH64"
94 export FFLAGS+=" -DARCH64"
99 export CFLAGS+=" -DARCH64"
100 export CXXFLAGS+=" -DARCH64"
101 export FFLAGS+=" -DARCH64"
104 export CFLAGS+=" -fpie -DTIZEN_FEATURE_BP_PBAP_SIM -fvisibility=hidden "
105 export CXXFLAGS+=" -fpie -DTIZEN_FEATURE_BP_PBAP_SIM -fvisibility=hidden "
107 export LDFLAGS+=" -Wl,--rpath=/usr/lib -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
109 export CFLAGS_DEFAULT="$CFLAGS"
111 # This usage of profile macro does NOT conflict 4.0 configurability.
112 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv"
113 # Original: wearable, ivi. Added: common, "undefined"
116 export CFLAGS="$CFLAGS_DEFAULT -DTIZEN_PROFILE_WEARABLE"
117 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_LUNAR_DEVICE"
118 mkdir -p wearable_build
120 cmake .. -DCMAKE_INSTALL_PREFIX=/usr/wearable -DTIZEN_PROFILE_WEARABLE=1 -DTIZEN_FEATURE_BT_HFP_AG=1
126 # TODO: BT-Agent Developers, Please Check if TIZEN_KIRAN is really need for ALL NON-WEARABLES.
127 export CFLAGS="$CFLAGS_DEFAULT -DTIZEN_FEATURE_BT_KIRAN_DEVICE"
128 export CFLAGS="$CFLAGS -DTIZEN_PROFILE_IVI"
131 cmake .. -DCMAKE_INSTALL_PREFIX=/usr/ivi -DTIZEN_PROFILE_WEARABLE=0 -DTIZEN_PROFILE_IVI=1 -DTIZEN_FEATURE_BT_HFP_AG=1
138 # This usage of profile macro does NOT conflict 4.0 configurability.
139 %if "%{?profile}" != "wearable" && "%{?profile}" != "ivi"
140 # Original: common, mobile, tv. Added: "undefined"
142 # Build All Others (common/tv/mobile)
143 # TODO: BT-Agent Developers, Please Check if TIZEN_KIRAN is really need for ALL NON-WEARABLES.
144 export CFLAGS="$CFLAGS_DEFAULT -DTIZEN_FEATURE_BT_KIRAN_DEVICE"
145 mkdir -p common_build
147 cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DTIZEN_PROFILE_WEARABLE=0 -DTIZEN_FEATURE_BT_HFP_AG=1
155 # This usage of profile macro does NOT conflict 4.0 configurability.
156 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv"
157 # Original: wearable, ivi. Added: common, "undefined"
166 # This usage of profile macro does NOT conflict 4.0 configurability.
167 %if "%{?profile}" != "wearable" && "%{?profile}" != "ivi"
168 # Original: common, mobile, tv. Added: "undefined"
174 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-agent
175 install -D -m 0644 packaging/bluetooth-map-agent.service %{buildroot}%{_libdir}/systemd/user/bluetooth-map-agent.service
176 # This usage of profile macro does NOT conflict 4.0 configurability.
177 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv"
178 # Original: wearable, ivi. Added: common, "undefined"
179 mv %{buildroot}/usr/wearable/share/dbus-1/system-services/org.bluez.hf_agent.service %{buildroot}%{_datadir}/dbus-1/system-services/
180 mv %{buildroot}/usr/wearable/bin/bluetooth-hf-agent %{buildroot}%{_bindir}/
181 mv %{buildroot}/usr/ivi/bin/bluetooth-hf-agent %{buildroot}%{_bindir}/bluetooth-hf-agent.ivi
182 rm -Rf %{buildroot}/usr/ivi
183 rm -Rf %{buildroot}/usr/wearable
185 install -D -m 0644 packaging/bluetooth-pbap-agent.service %{buildroot}%{_libdir}/systemd/system/bluetooth-pbap-agent.service
188 %if 0%{?sec_product_feature_bt_map_server_enable}
189 ln -sf %{_libdir}/systemd/user/bluetooth-map-agent.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
191 ln -sf %{_libdir}/systemd/system/bluetooth-pbap-agent.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
193 # This usage of profile macro does NOT conflict 4.0 configurability.
194 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv"
195 # Original: wearable, ivi. Added: common, "undefined"
197 ln -sf bluetooth-hf-agent.ivi %{_bindir}/bluetooth-hf-agent
199 rm %{_bindir}/bluetooth-hf-agent
203 %manifest %{name}.manifest
204 %defattr(-, root, root)
205 %{_datadir}/license/bluetooth-agent
207 # This usage of profile macro does NOT conflict 4.0 configurability.
208 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv"
209 # Original: wearable, ivi. Added: common, "undefined"
210 %files profile_wearable
211 %{_bindir}/bluetooth-hf-agent
212 %{_datadir}/dbus-1/system-services/org.bluez.hf_agent.service
213 %exclude %{_libdir}/systemd/user/bluetooth-map-agent.service
214 %exclude %{_libdir}/systemd/system/bluetooth-pbap-agent.service
217 %{_bindir}/bluetooth-hf-agent.ivi
218 %{_datadir}/dbus-1/system-services/org.bluez.hf_agent.service
219 %exclude %{_libdir}/systemd/user/bluetooth-map-agent.service
220 %exclude %{_libdir}/systemd/system/bluetooth-pbap-agent.service
223 # This usage of profile macro does NOT conflict 4.0 configurability.
224 %if "%{?profile}" != "wearable" && "%{?profile}" != "ivi"
225 # Original: common, mobile, tv. Added: "undefined"
226 %files profile_common
227 %{_bindir}/bluetooth-ag-agent
228 %{_bindir}/bluetooth-map-agent
229 %{_bindir}/bluetooth-pb-agent
230 %{_datadir}/dbus-1/system-services/org.bluez.pb_agent.service
231 %{_datadir}/dbus-1/services/org.bluez.map_agent.service
232 %{_datadir}/dbus-1/system-services/org.bluez.ag_agent.service
233 %attr(0666,-,-) /var/lib/bluetooth/voice-recognition-blacklist
234 %{_sysconfdir}/dbus-1/system.d/bluetooth-ag-agent.conf
235 %{_libdir}/systemd/user/bluetooth-map-agent.service
236 %{_libdir}/systemd/system/bluetooth-pbap-agent.service