Merge branch 'master' into tizen_2.1
[platform/core/connectivity/bluetooth-frwk.git] / packaging / bluetooth-frwk.spec
1 Name:       bluetooth-frwk
2 Summary:    Bluetooth framework for BlueZ and Obexd. This package is Bluetooth framework based on BlueZ and Obexd stack.
3 Version:    0.2.56
4 Release:    1
5 Group:      TO_BE/FILLED_IN
6 License:    Apache License, Version 2.0
7 Source0:    %{name}-%{version}.tar.gz
8 Requires: sys-assert
9 Requires: dbus
10 Requires: syspopup
11 BuildRequires:  pkgconfig(aul)
12 BuildRequires:  pkgconfig(dbus-glib-1)
13 BuildRequires:  pkgconfig(dlog)
14 BuildRequires:  pkgconfig(glib-2.0)
15 BuildRequires:  pkgconfig(syspopup-caller)
16 BuildRequires:  pkgconfig(vconf)
17 BuildRequires:  pkgconfig(libxml-2.0)
18 BuildRequires:  pkgconfig(dbus-1)
19 BuildRequires:  pkgconfig(utilX)
20 BuildRequires:  pkgconfig(capi-network-tethering)
21 BuildRequires:  pkgconfig(libprivilege-control)
22 BuildRequires:  pkgconfig(status)
23 BuildRequires:  pkgconfig(alarm-service)
24 BuildRequires:  cmake
25
26 Requires(post): vconf
27 Requires(postun): eglibc
28
29 %description
30 Bluetooth framework for BlueZ and Obexd. This package is Bluetooth framework based on BlueZ and Obexd stack.
31  This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
32
33
34 %package devel
35 Summary:    Bluetooth framework for BlueZ and Obexd
36 Group:      TO_BE/FILLED
37 Requires:   %{name} = %{version}-%{release}
38
39 %description devel
40 This package is development files for Bluetooth framework based on BlueZ and Obexd stack.
41 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
42
43 %package service
44 Summary:    Bluetooth Service daemon
45 Group:      TO_BE/FILLED
46 Requires:   %{name} = %{version}-%{release}
47
48 %description service
49 This package is Bluetooth Service daemon to manage BT services.
50
51 %package core
52 Summary:    Bluetooth Core daemon
53 Group:      TO_BE/FILLED
54 Requires:   %{name} = %{version}-%{release}
55
56 %description core
57 This package is Bluetooth core daemon to manage activation / deactivation.
58
59 %prep
60 %setup -q
61
62
63 %build
64 export CFLAGS+=" -fpie"
65 export LDFLAGS+=" -Wl,--rpath=/usr/lib -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
66
67 cmake . -DCMAKE_INSTALL_PREFIX=/usr
68
69 make
70
71 %install
72 rm -rf %{buildroot}
73 %make_install
74
75 mkdir -p %{buildroot}%{_sysconfdir}/rc.d/rc3.d/
76 mkdir -p %{buildroot}%{_sysconfdir}/rc.d/rc5.d/
77 ln -s %{_sysconfdir}/rc.d/init.d/bluetooth-frwk-service %{buildroot}%{_sysconfdir}/rc.d/rc3.d/S80bluetooth-frwk-service
78 ln -s %{_sysconfdir}/rc.d/init.d/bluetooth-frwk-service %{buildroot}%{_sysconfdir}/rc.d/rc5.d/S80bluetooth-frwk-service
79
80 mkdir -p %{buildroot}%{_libdir}/systemd/user
81 mkdir -p %{buildroot}%{_libdir}/systemd/user/tizen-middleware.target.wants
82 install -m 0644 bt-service/bluetooth-frwk-service.service %{buildroot}%{_libdir}/systemd/user/
83 ln -s ../bluetooth-frwk-service.service %{buildroot}%{_libdir}/systemd/user/tizen-middleware.target.wants/bluetooth-frwk-service.service
84
85
86 %post
87 vconftool set -tf int db/bluetooth/status "0" -g 6520
88 vconftool set -tf int file/private/bt-service/flight_mode_deactivated "0" -g 6520 -i
89 vconftool set -tf string memory/bluetooth/sco_headset_name "" -g 6520 -i
90 vconftool set -tf int memory/bluetooth/device "0" -g 6520 -i
91 vconftool set -tf int memory/bluetooth/btsco "0" -g 6520 -i
92
93 %postun -p /sbin/ldconfig
94
95 %files
96 %defattr(-, root, root)
97 %{_libdir}/libbluetooth-api.so.*
98
99 %files devel
100 %defattr(-, root, root)
101 %{_includedir}/bt-service/bluetooth-api.h
102 %{_includedir}/bt-service/bluetooth-hid-api.h
103 %{_includedir}/bt-service/bluetooth-audio-api.h
104 %{_includedir}/bt-service/bluetooth-telephony-api.h
105 %{_includedir}/bt-service/bluetooth-media-control.h
106 %{_libdir}/pkgconfig/bluetooth-api.pc
107 %{_libdir}/libbluetooth-api.so
108
109 %files service
110 %manifest bluetooth-frwk.manifest
111 %defattr(-, root, root)
112 %{_sysconfdir}/rc.d/init.d/bluetooth-frwk-service
113 %{_sysconfdir}/rc.d/rc3.d/S80bluetooth-frwk-service
114 %{_sysconfdir}/rc.d/rc5.d/S80bluetooth-frwk-service
115 %{_datadir}/dbus-1/services/org.projectx.bt.service
116 %{_bindir}/bt-service
117 %{_libdir}/systemd/user/tizen-middleware.target.wants/bluetooth-frwk-service.service
118 %{_libdir}/systemd/user/bluetooth-frwk-service.service
119 %attr(0666,-,-) /opt/var/lib/bluetooth/auto-pair-blacklist
120
121 %files core
122 %defattr(-, root, root)
123 %{_datadir}/dbus-1/services/org.projectx.bt_core.service
124 %{_bindir}/bt-core