Implement User Space SMACK
[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.57
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:  pkgconfig(notification)
25 BuildRequires:  pkgconfig(security-server)
26 BuildRequires:  cmake
27
28 Requires(post): vconf
29 Requires(postun): eglibc
30
31 %description
32 Bluetooth framework for BlueZ and Obexd. This package is Bluetooth framework based on BlueZ and Obexd stack.
33  This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
34
35
36 %package devel
37 Summary:    Bluetooth framework for BlueZ and Obexd
38 Group:      TO_BE/FILLED
39 Requires:   %{name} = %{version}-%{release}
40
41 %description devel
42 This package is development files for Bluetooth framework based on BlueZ and Obexd stack.
43 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
44
45 %package service
46 Summary:    Bluetooth Service daemon
47 Group:      TO_BE/FILLED
48 Requires:   %{name} = %{version}-%{release}
49
50 %description service
51 This package is Bluetooth Service daemon to manage BT services.
52
53 %package core
54 Summary:    Bluetooth Core daemon
55 Group:      TO_BE/FILLED
56 Requires:   %{name} = %{version}-%{release}
57
58 %description core
59 This package is Bluetooth core daemon to manage activation / deactivation.
60
61 %prep
62 %setup -q
63
64
65 %build
66
67 %ifarch x86_64
68 export CFLAGS+="   -Wall -g -fvisibility=hidden -fPIC"
69 export LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs" 
70 %else
71 export CFLAGS+=" -fpie"
72 export LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
73 %endif
74 %cmake .
75
76 make
77
78 %install
79 rm -rf %{buildroot}
80 %make_install
81
82 mkdir -p %{buildroot}%{_sysconfdir}/rc.d/rc3.d/
83 mkdir -p %{buildroot}%{_sysconfdir}/rc.d/rc5.d/
84 ln -s %{_sysconfdir}/rc.d/init.d/bluetooth-frwk-service %{buildroot}%{_sysconfdir}/rc.d/rc3.d/S80bluetooth-frwk-service
85 ln -s %{_sysconfdir}/rc.d/init.d/bluetooth-frwk-service %{buildroot}%{_sysconfdir}/rc.d/rc5.d/S80bluetooth-frwk-service
86
87 mkdir -p %{buildroot}%{_libdir}/systemd/user
88 mkdir -p %{buildroot}%{_libdir}/systemd/user/tizen-middleware.target.wants
89 install -m 0644 bt-service/bluetooth-frwk-service.service %{buildroot}%{_libdir}/systemd/user/
90 ln -s ../bluetooth-frwk-service.service %{buildroot}%{_libdir}/systemd/user/tizen-middleware.target.wants/bluetooth-frwk-service.service
91
92
93 %post
94 vconftool set -tf int db/bluetooth/status "0" -g 6520
95 vconftool set -tf int file/private/bt-service/flight_mode_deactivated "0" -g 6520 -i
96 vconftool set -tf string memory/bluetooth/sco_headset_name "" -g 6520 -i
97 vconftool set -tf int memory/bluetooth/device "0" -g 6520 -i
98 vconftool set -tf int memory/bluetooth/btsco "0" -g 6520 -i
99
100 %postun -p /sbin/ldconfig
101
102 %files
103 %defattr(-, root, root)
104 %{_libdir}/libbluetooth-api.so.*
105
106 %files devel
107 %defattr(-, root, root)
108 %{_includedir}/bt-service/bluetooth-api.h
109 %{_includedir}/bt-service/bluetooth-hid-api.h
110 %{_includedir}/bt-service/bluetooth-audio-api.h
111 %{_includedir}/bt-service/bluetooth-telephony-api.h
112 %{_includedir}/bt-service/bluetooth-media-control.h
113 %{_libdir}/pkgconfig/bluetooth-api.pc
114 %{_libdir}/libbluetooth-api.so
115
116 %files service
117 %manifest bluetooth-frwk.manifest
118 %defattr(-, root, root)
119 %{_sysconfdir}/rc.d/init.d/bluetooth-frwk-service
120 %{_sysconfdir}/rc.d/rc3.d/S80bluetooth-frwk-service
121 %{_sysconfdir}/rc.d/rc5.d/S80bluetooth-frwk-service
122 %{_datadir}/dbus-1/services/org.projectx.bt.service
123 %{_bindir}/bt-service
124 %{_libdir}/systemd/user/tizen-middleware.target.wants/bluetooth-frwk-service.service
125 %{_libdir}/systemd/user/bluetooth-frwk-service.service
126 %attr(0666,-,-) /opt/var/lib/bluetooth/auto-pair-blacklist
127
128 %files core
129 %defattr(-, root, root)
130 %{_datadir}/dbus-1/services/org.projectx.bt_core.service
131 %{_bindir}/bt-core