644c42fd706f46109d0309f5ce2c409ca45bf9f5
[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 %if "%{?profile}" == "mobile"
10 ExcludeArch: aarch64 %ix86 x86_64
11 %else
12 ExcludeArch: %{arm} aarch64 %ix86 x86_64
13 %endif
14
15 BuildRequires:  cmake
16 BuildRequires:  pkgconfig(dlog)
17
18 %define accel_state ON
19 %define gyro_state OFF
20 %define proxi_state ON
21 %define light_state OFF
22 %define geo_state OFF
23 %define pressure_state OFF
24 %define temperature_state OFF
25 %define ultraviolet_state OFF
26 %define rv_state OFF
27 %define bio_led_red_state OFF
28
29 %description
30 TM1 Sensor Plugins
31
32 %prep
33 %setup -q
34
35 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DACCEL=%{accel_state} \
36 -DGYRO=%{gyro_state} -DPROXI=%{proxi_state} -DLIGHT=%{light_state} \
37 -DGEO=%{geo_state} -DPRESSURE=%{pressure_state} -DTEMPERATURE=%{temperature_state} \
38 -DRV=%{rv_state} -DULTRAVIOLET=%{ultraviolet_state} \
39 -DBIO_LED_RED=%{bio_led_red_state} \
40 -DLIBDIR=%{_libdir} -DINCLUDEDIR=%{_includedir}
41
42 %build
43 make %{?jobs:-j%jobs}
44
45 %install
46 rm -rf %{buildroot}
47 %make_install
48
49 %post
50 /sbin/ldconfig
51
52 %postun
53 /sbin/ldconfig
54
55 %files
56 %manifest packaging/%{name}.manifest
57 %{_libdir}/sensor/*.so