sensor-framework - remove init scripts
[platform/core/system/sensor-framework.git] / packaging / sensor-framework.spec
1 #sbs-git:slp/pkgs/s/sensor-framework sensor-framework 0.2.5 f585f766aa864c3857e93c776846771899a4fa41
2 Name:       sensor-framework
3 Summary:    Sensor framework
4 Version: 0.2.31
5 Release:    1
6 Group:      Framework/system
7 License:    Apache License, Version 2.0
8 Source0:    %{name}-%{version}.tar.gz
9 Source1001:     sensor-framework.manifest
10
11 %ifarch %{arm}
12   #arm build
13   %define        _archtype arch_arm
14 %else
15   #ix86 build
16   %if 0%{?simulator}
17    #emul build target
18    %define       _archtype arch_sdk
19   %else
20    #IA build target
21    %define       _archtype arch_ia
22   %endif
23 %endif
24 Requires(post): /usr/bin/vconftool
25
26 BuildRequires:  cmake
27 BuildRequires:  pkgconfig(glib-2.0)
28 BuildRequires:  pkgconfig(sf_common)
29 BuildRequires:  pkgconfig(vconf)
30 BuildRequires:  pkgconfig(heynoti)
31 BuildRequires:  pkgconfig(libsystemd-daemon)
32 %{?systemd_requires}
33
34 %description
35 Sensor framework
36
37 %prep
38 %setup -q
39 cp %{SOURCE1001} .
40
41 %build
42 cmake . -DCMAKE_INSTALL_PREFIX=/usr -DPLATFORM_ARCH=%{_archtype}
43
44 make %{?jobs:-j%jobs}
45
46 %install
47 %make_install
48
49 mkdir -p %{buildroot}/usr/share/license
50 cp LICENSE %{buildroot}/usr/share/license/%{name}
51
52 mkdir -p %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants
53 mkdir -p %{buildroot}%{_libdir}/systemd/system/sockets.target.wants
54 ln -s ../sensor-framework.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/sensor-framework.service
55 ln -s ../sensor-framework.socket  %{buildroot}%{_libdir}/systemd/system/sockets.target.wants/sensor-framework.socket
56
57 %post 
58 vconftool set -t int memory/private/sensor/10001 0 -i
59 vconftool set -t int memory/private/sensor/10002 0 -i
60 vconftool set -t int memory/private/sensor/10004 0 -i
61 vconftool set -t int memory/private/sensor/10008 0 -i
62 vconftool set -t int memory/private/sensor/10010 0 -i
63 vconftool set -t int memory/private/sensor/20001 0 -i
64 vconftool set -t int memory/private/sensor/20002 0 -i
65 vconftool set -t int memory/private/sensor/20004 0 -i
66 vconftool set -t int memory/private/sensor/200001 0 -i
67 vconftool set -t int memory/private/sensor/40001 0 -i
68 vconftool set -t int memory/private/sensor/40002 0 -i
69 vconftool set -t int memory/private/sensor/800001 0 -i
70 vconftool set -t int memory/private/sensor/800002 0 -i
71 vconftool set -t int memory/private/sensor/800004 0 -i
72 vconftool set -t int memory/private/sensor/800008 0 -i
73 vconftool set -t int memory/private/sensor/800010 0 -i
74 vconftool set -t int memory/private/sensor/800020 0 -i
75 vconftool set -t int memory/private/sensor/800040 0 -i
76 vconftool set -t int memory/private/sensor/800080 0 -i
77 vconftool set -t int memory/private/sensor/800100 0 -i
78 vconftool set -t int memory/private/sensor/800200 0 -i
79 vconftool set -t int memory/private/sensor/800400 0 -i
80 vconftool set -t int memory/private/sensor/800800 0 -i
81 vconftool set -t int memory/private/sensor/80001 0 -i
82 vconftool set -t int memory/private/sensor/80002 0 -i
83 vconftool set -t int memory/private/sensor/poweroff 0 -i
84
85 systemctl daemon-reload
86
87 %files
88 %manifest sensor-framework.manifest
89 %{_bindir}/sf_server
90 %attr(0644,root,root)/usr/etc/sf_data_stream.conf
91 %attr(0644,root,root)/usr/etc/sf_filter.conf
92 %attr(0644,root,root)/usr/etc/sf_processor.conf
93 %attr(0644,root,root)/usr/etc/sf_sensor.conf
94 %{_libdir}/systemd/system/sensor-framework.service
95 %{_libdir}/systemd/system/sensor-framework.socket
96 %{_libdir}/systemd/system/multi-user.target.wants/sensor-framework.service
97 %{_libdir}/systemd/system/sockets.target.wants/sensor-framework.socket
98 /usr/share/license/%{name}
99