Initialize Tizen 2.3
[framework/convergence/sap-stack.git] / packaging / sap.spec
1 Name:       sap
2 Summary:    APPCESSORY
3 Version:    1.0.0
4 Release:    0
5 Group:      Network & Connectivity/Other
6 License:    Samsung Proprietary
7 Source0:    %{name}-%{version}.tar.gz
8 Source1:        %{name}.manifest
9 Source2:        %{name}.service
10 Source3:        %{name}.target
11 Source4:        ft.service
12 BuildRequires:  cmake
13 Requires:       /usr/bin/vconftool
14 Requires:       libstorage
15 Requires:       /usr/bin/api_feature_loader
16 %ifarch %arm
17 %global ARM_DEF "-DARM_TARGET=Y"
18 %endif
19
20 provides: libsap-api.so.1 libsap-client-stub-api.so.1 libwsm.so
21
22 %description
23 APPCESSORY
24
25 %package devel
26 Summary:  APPCESSORY (devel)
27 Group:    Network & Connectivity/Development
28 Requires: %{name} = %{version}
29
30 %description devel
31 APPCESSORY (devel)
32
33 %prep
34 %setup -q
35 cp %{SOURCE1} .
36 cp %{SOURCE2} .
37 cp %{SOURCE3} .
38 cp %{SOURCE4} .
39
40 %build
41 %cmake . %{?ARM_DEF} -DBIN_INSTALL_DIR:PATH=%{_bindir}
42
43 %install
44 rm -rf %{buildroot}
45 %make_install
46
47 mkdir -p %{buildroot}%{_libdir}/systemd/system/sap.target.wants
48 mkdir -p %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants
49 cp -af %{SOURCE2} %{buildroot}%{_libdir}/systemd/system/
50 cp -af %{SOURCE3} %{buildroot}%{_libdir}/systemd/system/
51 cp -af %{SOURCE4} %{buildroot}%{_libdir}/systemd/system/
52 ln -s %{_libdir}/systemd/system/sap.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/
53 ln -s %{_libdir}/systemd/system/ft.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/
54
55 %post
56 /sbin/ldconfig
57 vconftool set -tf int memory/private/sap/conn_status 0 -u 5000 -s system::vconf -i
58 vconftool set -tf int memory/private/sap/rfcomm_ready 0 -u 5000 -s system::vconf -i
59
60 api_feature_loader --verbose --dir=/usr/share/privilege-control/
61
62 %postun -p /sbin/ldconfig
63
64 %files
65 %defattr(-,root,root,-)
66 %manifest %{name}.manifest
67 %attr(755,root,root) %{_bindir}/sap-server
68 %attr(755,root,root) %{_bindir}/ft-service
69 %{_bindir}/frameworkPolicyDelgate.xml
70 %{_libdir}/libsap-client-stub-api.so.*
71 %{_libdir}/libsap-api.so.*
72 %{_libdir}/libwsm.so
73 %{_libdir}/systemd/system/sap.service
74 %{_libdir}/systemd/system/sap.target
75 %{_libdir}/systemd/system/ft.service
76 %{_libdir}/systemd/system/multi-user.target.wants/sap.service
77 %{_libdir}/systemd/system/multi-user.target.wants/ft.service
78 /usr/share/appcessory/file-transfer.xml
79 /usr/share/privilege-control/*.smack
80
81 %files devel
82 %defattr(-,root,root,-)
83 %{_includedir}/sap-service/*
84 %{_libdir}/pkgconfig/*.pc
85 %{_libdir}/*sap*.so