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)
14 %if "%{?profile}" == "wearable" || "%{?profile}" == "ivi"
15 BuildRequires: pkgconfig(alarm-service)
16 BuildRequires: pkgconfig(capi-appfw-app-manager)
17 BuildRequires: pkgconfig(capi-system-device)
19 BuildRequires: pkgconfig(contacts-service2)
20 BuildRequires: pkgconfig(msg-service)
21 BuildRequires: pkgconfig(email-service)
23 BuildRequires: pkgconfig(capi-system-info)
24 BuildRequires: pkgconfig(dbus-glib-1)
25 BuildRequires: pkgconfig(tapi)
26 BuildRequires: pkgconfig(dlog)
27 BuildRequires: pkgconfig(vconf)
28 BuildRequires: pkgconfig(appsvc)
29 BuildRequires: pkgconfig(capi-appfw-application)
30 BuildRequires: pkgconfig(capi-media-image-util)
31 BuildRequires: pkgconfig(contacts-service2)
32 BuildRequires: pkgconfig(libexif)
33 BuildRequires: pkgconfig(gio-2.0)
35 Requires: security-config
38 Bluetooth agent packages that support various external profiles
45 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
46 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
47 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
48 #export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_MEDIA_ENHANCE"
49 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_HFP_AG"
53 export CFLAGS+=" -DARCH64"
54 export CXXFLAGS+=" -DARCH64"
55 export FFLAGS+=" -DARCH64"
60 export CFLAGS+=" -DARCH64"
61 export CXXFLAGS+=" -DARCH64"
62 export FFLAGS+=" -DARCH64"
65 %if "%{?profile}" == "wearable"
66 export CFLAGS="$CFLAGS -DTIZEN_PROFILE_WEARABLE"
67 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_LUNAR_DEVICE"
69 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_KIRAN_DEVICE"
72 %if "%{?profile}" == "ivi"
73 export CFLAGS="$CFLAGS -DTIZEN_PROFILE_IVI"
76 export CFLAGS+=" -fpie -DTIZEN_FEATURE_BT_PBAP_SIM -fvisibility=hidden "
77 export CXXFLAGS+=" -fpie -DTIZEN_FEATURE_BT_PBAP_SIM -fvisibility=hidden "
79 export LDFLAGS+=" -Wl,--rpath=/usr/lib -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
81 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
82 %if "%{?profile}" == "wearable"
83 -DTIZEN_PROFILE_WEARABLE=1 \
85 -DTIZEN_PROFILE_WEARABLE=0 \
87 %if "%{?profile}" == "ivi"
88 -DTIZEN_PROFILE_IVI=1 \
90 -DTIZEN_FEATURE_BT_HFP_AG=1
98 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-agent
99 #mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
100 #%if "%{?profile}" != "wearable"
101 #install -m 0644 packaging/bluetooth-ag-agent.service %{buildroot}%{_unitdir}/
102 #ln -s ../bluetooth-ag-agent.service %{buildroot}%{_unitdir}/multi-user.target.wants/bluetooth-ag-agent.service
104 #%if 0%{?sec_product_feature_bt_map_server_enable}
105 install -D -m 0644 packaging/bluetooth-map-agent.service %{buildroot}%{_libdir}/systemd/user/bluetooth-map-agent.service
107 install -D -m 0644 packaging/bluetooth-pbap-agent.service %{buildroot}%{_libdir}/systemd/system/bluetooth-pbap-agent.service
110 %if 0%{?sec_product_feature_bt_map_server_enable}
111 ln -sf %{_libdir}/systemd/user/bluetooth-map-agent.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
113 ln -sf %{_libdir}/systemd/system/bluetooth-pbap-agent.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
116 %manifest %{name}.manifest
117 %defattr(-, root, root)
118 %if "%{?profile}" == "wearable" || "%{?profile}" == "ivi"
119 %{_bindir}/bluetooth-hf-agent
120 %{_datadir}/dbus-1/system-services/org.bluez.hf_agent.service
121 %exclude %{_libdir}/systemd/user/bluetooth-map-agent.service
122 %exclude %{_libdir}/systemd/system/bluetooth-pbap-agent.service
124 %{_bindir}/bluetooth-ag-agent
125 %{_bindir}/bluetooth-map-agent
126 %{_bindir}/bluetooth-pb-agent
127 %{_datadir}/dbus-1/system-services/org.bluez.pb_agent.service
128 %{_datadir}/dbus-1/services/org.bluez.map_agent.service
129 %{_datadir}/dbus-1/system-services/org.bluez.ag_agent.service
130 #%{_usrlibdir}/systemd/system/bluetooth-ag-agent.service
131 #%{_usrlibdir}/systemd/system/multi-user.target.wants/bluetooth-ag-agent.service
132 %attr(0666,-,-) /var/lib/bluetooth/voice-recognition-blacklist
133 %{_sysconfdir}/dbus-1/system.d/bluetooth-ag-agent.conf
134 %{_libdir}/systemd/user/bluetooth-map-agent.service
135 %{_libdir}/systemd/system/bluetooth-pbap-agent.service
137 %{_datadir}/license/bluetooth-agent