sensor: Remove profile version from header files
[platform/core/api/sensor.git] / packaging / capi-system-sensor.spec
1 Name:       capi-system-sensor
2 Summary:    A Sensor library in TIZEN C API
3 Version:    0.2.5
4 Release:    1
5 Group:      System/API
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8
9 %if "%{?profile}" != "tv"
10 %define SENSOR_RECORDER on
11 %else
12 %define SENSOR_RECORDER off
13 %endif
14
15 BuildRequires:  cmake
16 BuildRequires:  pkgconfig(dlog)
17 BuildRequires:  pkgconfig(sensor)
18 BuildRequires:  pkgconfig(capi-base-common)
19 BuildRequires:  pkgconfig(hal-api-sensor)
20 %if "%{?SENSOR_RECORDER}" == "on"
21 BuildRequires:  pkgconfig(context-sensor-recorder-client)
22 %endif
23 Requires(post): /sbin/ldconfig
24 Requires(postun): /sbin/ldconfig
25
26 Provides: %{name}-profile_common = %{version}-%{release}
27 Provides: %{name}-profile_mobile = %{version}-%{release}
28 Provides: %{name}-profile_wearable = %{version}-%{release}
29 Provides: %{name}-profile_tv = %{version}-%{release}
30 Provides: %{name}-profile_ivi = %{version}-%{release}
31
32 %description
33 A Sensor Library in TIZEN C API package.
34
35 %package devel
36 Summary:  A Sensor library in TIZEN C API (Development)
37 Group:    System/Development
38 Requires: %{name} = %{version}-%{release}
39
40 %description devel
41 A Sensor library in TIZEN C API package (Development).
42 %devel_desc
43
44 %package test
45 Summary:    Tizen Sensor Test Programs (test)
46 Group:      System & System Tools/Testing
47 Requires:   %{name} = %{version}-%{release}
48
49 %description test
50 Tizen Sensor Test Programs (test)
51
52 %package tools
53 Summary:  Sensor command line tool package
54 Group:    System & System Tools
55 Requires: %{name} = %{version}-%{release}
56
57 %description tools
58 Sensor command line tools
59
60 %if 0%{?gcov:1}
61 %package gcov
62 Summary:    Tizen Sensor Library API (gcov)
63 Group:      Service Framework/Testing
64
65 %description gcov
66 gcov objects for coverage test
67 %endif
68
69 %prep
70 %setup -q
71
72 %build
73 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
74
75 %if 0%{?gcov:1}
76 export CFLAGS+=" -fprofile-arcs -ftest-coverage"
77 export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
78 export FFLAGS+=" -fprofile-arcs -ftest-coverage"
79 export LDFLAGS+=" -lgcov"
80 %endif
81
82 %cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DSENSOR_RECORDER=%{SENSOR_RECORDER}
83 %__make %{?_smp_mflags}
84
85 %install
86 %make_install
87
88 %if 0%{?gcov:1}
89 builddir=$(basename $PWD)
90 gcno_obj_dir=%{buildroot}%{_datadir}/gcov/obj/%{name}/"$builddir"
91 mkdir -p "$gcno_obj_dir"
92 find . -name '*.gcno' -exec cp --parents '{}' "$gcno_obj_dir" ';'
93 %endif
94
95 %post -p /sbin/ldconfig
96
97 %postun -p /sbin/ldconfig
98
99 %files
100 %manifest packaging/capi-system-sensor.manifest
101 %{_libdir}/libcapi-system-sensor.so.*
102 %license LICENSE.APLv2
103
104 %files devel
105 %manifest packaging/capi-system-sensor.manifest
106 %{_libdir}/pkgconfig/*.pc
107 %{_includedir}/sensor/*.h
108 %{_libdir}/libcapi-system-sensor.so
109
110 %files test
111 %manifest packaging/capi-system-sensor.manifest
112 %defattr(-,root,root,-)
113 %{_bindir}/sensor-test
114
115 %files tools
116 %{_bindir}/sensor-tool
117
118 %if 0%{?gcov:1}
119 %files gcov
120 %{_datadir}/gcov/obj/*
121 %endif