Add BT agent functionality on Tizen 3.0
[platform/core/connectivity/bluetooth-agent.git] / packaging / bluetooth-agent.spec
1 Name:       bluetooth-agent
2 Summary:    Bluetooth agent packages that support various external profiles
3 Version:    0.1.0
4 Release:    1
5 Group:      Network & Connectivity/Bluetooth
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8 Source1001:     bluetooth-agent.manifest
9
10 Requires(post): sys-assert
11 BuildRequires:  pkgconfig(aul)
12 BuildRequires:  pkgconfig(bluetooth-api)
13 %if "%{?profile}" == "wearable"
14 BuildRequires:  pkgconfig(alarm-service)
15 BuildRequires:  pkgconfig(capi-appfw-app-manager)
16 BuildRequires:  pkgconfig(capi-system-device)
17 %else
18 BuildRequires:  pkgconfig(contacts-service2)
19 BuildRequires:  pkgconfig(msg-service)
20 %endif
21 BuildRequires:  pkgconfig(capi-system-info)
22 BuildRequires:  pkgconfig(dbus-glib-1)
23 BuildRequires:  pkgconfig(tapi)
24 BuildRequires:  pkgconfig(dlog)
25 BuildRequires:  pkgconfig(vconf)
26 BuildRequires:  pkgconfig(appsvc)
27 BuildRequires:  pkgconfig(capi-appfw-application)
28 BuildRequires:  pkgconfig(capi-media-image-util)
29 BuildRequires:  pkgconfig(libexif)
30 BuildRequires:  cmake
31
32 %description
33 Bluetooth agent packages that support various external profiles
34
35 %prep
36 %setup -q
37 cp %{SOURCE1001} .
38
39 %build
40 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
41 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
42 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
43 export CFLAGS="$CFLAGS -DTIZEN_MEDIA_ENHANCE"
44 export CFLAGS="$CFLAGS -DTIZEN_BT_HFP_AG_ENABLE"
45
46 %if "%{?profile}" == "wearable"
47 export CFLAGS="$CFLAGS -DTIZEN_WEARABLE"
48 export CFLAGS="$CFLAGS -DTIZEN_SUPPORT_LUNAR_DEVICE"
49 %else
50 %if "%{?tizen_target_name}" == "Z130H"
51 export CFLAGS="$CFLAGS -DTIZEN_KIRAN"
52 %endif
53 %endif
54
55 export CFLAGS+=" -fpie -DPBAP_SIM_ENABLE"
56
57 export CFLAGS+=" -fpie -fvisibility=hidden"
58 export LDFLAGS+=" -Wl,--rpath=/usr/lib -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
59
60 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
61 %if "%{?profile}" == "wearable"
62         -DTIZEN_WEARABLE=1 \
63 %else
64         -DTIZEN_WEARABLE=0 \
65 %endif
66         -DTIZEN_BT_HFP_AG_ENABLE=1
67
68 make VERBOSE=1
69
70 %install
71 rm -rf %{buildroot}
72 %make_install
73
74 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-agent
75
76 %files
77 %manifest %{name}.manifest
78 %defattr(-, root, root)
79 %if "%{?profile}" == "wearable"
80 %{_bindir}/bluetooth-hf-agent
81 %{_datadir}/dbus-1/system-services/org.bluez.hf_agent.service
82 %else
83 %{_bindir}/bluetooth-map-agent
84 %{_bindir}/bluetooth-pb-agent
85 %{_datadir}/dbus-1/system-services/org.bluez.pb_agent.service
86 %{_datadir}/dbus-1/system-services/org.bluez.map_agent.service
87 %{_datadir}/dbus-1/system-services/org.bluez.ag_agent.service
88 %{_bindir}/bluetooth-ag-agent
89 %attr(0666,-,-) /opt/var/lib/bluetooth/voice-recognition-blacklist
90 %endif
91 %{_datadir}/license/bluetooth-agent