Use macro %{_unitdir_user} unstead of %{_libdir}/systemd/user in specfile
[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 URL:        https://review.tizen.org/git/?p=platform/core/connectivity/bluetooth-frwk.git;a=summary
9 Requires: sys-assert
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
66
67 %build
68
69 %ifarch x86_64
70 export CFLAGS+="   -Wall -g -fvisibility=hidden -fPIC"
71 export LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs" 
72 %else
73 export CFLAGS+=" -fpie"
74 export LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
75 %endif
76 %cmake .
77
78 make
79
80 %install
81 rm -rf %{buildroot}
82 %make_install
83
84 mkdir -p %{buildroot}%{_sysconfdir}/rc.d/rc3.d/
85 mkdir -p %{buildroot}%{_sysconfdir}/rc.d/rc5.d/
86 ln -s %{_sysconfdir}/rc.d/init.d/bluetooth-frwk-service %{buildroot}%{_sysconfdir}/rc.d/rc3.d/S80bluetooth-frwk-service
87 ln -s %{_sysconfdir}/rc.d/init.d/bluetooth-frwk-service %{buildroot}%{_sysconfdir}/rc.d/rc5.d/S80bluetooth-frwk-service
88
89 mkdir -p %{buildroot}%{_unitdir_user}
90 mkdir -p %{buildroot}%{_unitdir_user}/tizen-middleware.target.wants
91 install -m 0644 bt-service/bluetooth-frwk-service.service %{buildroot}%{_unitdir_user}
92 ln -s ../bluetooth-frwk-service.service %{buildroot}%{_unitdir_user}/tizen-middleware.target.wants/bluetooth-frwk-service.service
93
94
95 %post
96 /sbin/ldconfig
97 vconftool set -tf int db/bluetooth/status "0" -g 6520
98 vconftool set -tf int file/private/bt-service/flight_mode_deactivated "0" -g 6520 -i
99 vconftool set -tf string memory/bluetooth/sco_headset_name "" -g 6520 -i
100 vconftool set -tf int memory/bluetooth/device "0" -g 6520 -i
101 vconftool set -tf int memory/bluetooth/btsco "0" -g 6520 -i
102
103 %postun -p /sbin/ldconfig
104
105 %files
106 %defattr(-, root, root)
107 %{_libdir}/libbluetooth-api.so.*
108
109 %files devel
110 %defattr(-, root, root)
111 %{_includedir}/bt-service/bluetooth-api.h
112 %{_includedir}/bt-service/bluetooth-hid-api.h
113 %{_includedir}/bt-service/bluetooth-audio-api.h
114 %{_includedir}/bt-service/bluetooth-telephony-api.h
115 %{_includedir}/bt-service/bluetooth-media-control.h
116 %{_libdir}/pkgconfig/bluetooth-api.pc
117 %{_libdir}/libbluetooth-api.so
118
119 %files service
120 %manifest bluetooth-frwk.manifest
121 %defattr(-, root, root)
122 %{_sysconfdir}/rc.d/init.d/bluetooth-frwk-service
123 %{_sysconfdir}/rc.d/rc3.d/S80bluetooth-frwk-service
124 %{_sysconfdir}/rc.d/rc5.d/S80bluetooth-frwk-service
125 %{_datadir}/dbus-1/services/org.projectx.bt.service
126 %{_bindir}/bt-service
127 %{_unitdir_user}/tizen-middleware.target.wants/bluetooth-frwk-service.service
128 %{_unitdir_user}/bluetooth-frwk-service.service
129 %attr(0666,-,-) /opt/var/lib/bluetooth/auto-pair-blacklist
130
131 %files core
132 %defattr(-, root, root)
133 %{_datadir}/dbus-1/services/org.projectx.bt_core.service
134 %{_bindir}/bt-core