Re-package sensor-hal to sensor-plugins-tm1
[platform/adaptation/tm1/sensor-hal-tm1.git] / packaging / sensor-plugins-tm1.spec
1 Name:       sensor-plugins-tm1
2 Summary:    TM1 Sensor Plugins
3 Version:    1.0.0
4 Release:    0
5 Group:      System/Sensor Framework
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8
9 BuildRequires:  cmake
10 BuildRequires:  pkgconfig(dlog)
11 BuildRequires:  pkgconfig(libxml-2.0)
12
13 %define accel_state ON
14 %define gyro_state OFF
15 %define proxi_state ON
16 %define light_state OFF
17 %define geo_state OFF
18 %define pressure_state OFF
19 %define temperature_state OFF
20 %define ultraviolet_state OFF
21 %define rv_state OFF
22 %define bio_led_red_state OFF
23
24 %description
25 TM1 Sensor Plugins
26
27 %prep
28 %setup -q
29
30 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DACCEL=%{accel_state} \
31 -DGYRO=%{gyro_state} -DPROXI=%{proxi_state} -DLIGHT=%{light_state} \
32 -DGEO=%{geo_state} -DPRESSURE=%{pressure_state} -DTEMPERATURE=%{temperature_state} \
33 -DRV=%{rv_state} -DULTRAVIOLET=%{ultraviolet_state} \
34 -DBIO_LED_RED=%{bio_led_red_state} \
35 -DLIBDIR=%{_libdir} -DINCLUDEDIR=%{_includedir}
36
37 %build
38 make %{?jobs:-j%jobs}
39
40 %install
41 rm -rf %{buildroot}
42 %make_install
43
44 %post
45 /sbin/ldconfig
46
47 %postun
48 /sbin/ldconfig
49
50 %files
51 %manifest packaging/%{name}.manifest
52 %attr(0644,root,root)/usr/etc/sensors.xml
53 %{_libdir}/sensor/*.so