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