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