1 # Do not provide .so automatically for the extensions.
2 %global __provides_exclude_from ^.*\\.recorder
4 Name: capi-system-sensor
5 Summary: A Sensor library in TIZEN C API
9 License: Apache-2.0 and PD
10 Source0: %{name}-%{version}.tar.gz
13 BuildRequires: pkgconfig(dlog)
14 BuildRequires: pkgconfig(sensor)
15 BuildRequires: pkgconfig(capi-base-common)
16 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
17 # if mobile || wearable || common || "undefined"
18 %if "%{?profile}" != "tv" && "%{?profile}" != "ivi"
19 BuildRequires: pkgconfig(context-sensor-recorder-client)
22 Requires(post): /sbin/ldconfig
23 Requires(postun): /sbin/ldconfig
25 Provides: %{name}-profile_tv = %{version}-%{release}
26 Provides: %{name}-profile_ivi = %{version}-%{release}
29 A Sensor Library in TIZEN C API package.
31 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
32 # if mobile || wearable || common || "undefined"
33 %if "%{?profile}" != "tv" && "%{?profile}" != "ivi"
34 %package extension-recorder
35 Summary: capi-system-sensor extension with sensor recorder (for mobile/wearable)
36 Requires: %{name} = %{version}-%{release}
37 # After Context FW is refactored, this explicit dependency can be removed.
38 Requires: context-service
39 Provides: %{name}-profile_mobile = %{version}-%{release}
40 Provides: %{name}-profile_wearable = %{version}-%{release}
41 Provides: %{name}-profile_common = %{version}-%{release}
43 %description extension-recorder
44 Binary replacing extension for capi-system-sensor supporting recorder.
45 This extension targets Tizen mobile/wearable profiles.
46 If you want to keep using %{name} after uninstalling this extension,
47 you need to reinstall %{name} after uninstalling this extension.
51 Summary: A Sensor library in TIZEN C API (Development)
52 Group: System/Development
53 Requires: %{name} = %{version}-%{release}
56 A Sensor library in TIZEN C API package (Development).
63 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
65 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
66 # if mobile || wearable || common || "undefined"
67 %if "%{?profile}" != "tv" && "%{?profile}" != "ivi"
68 mkdir -p build_extension
70 %cmake .. -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DSENSOR_RECORDER=on
71 %__make %{?_smp_mflags}
75 %cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DSENSOR_RECORDER=off
76 %__make %{?_smp_mflags}
81 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
82 # if mobile || wearable || common || "undefined"
83 %if "%{?profile}" != "tv" && "%{?profile}" != "ivi"
87 pushd %{buildroot}%{_libdir}/
88 for FILE in libcapi-system-sensor.so.*; do mv "${FILE}" "${FILE}.recorder"; done
94 %post -p /sbin/ldconfig
96 %postun -p /sbin/ldconfig
99 %manifest packaging/capi-system-sensor.manifest
100 %exclude %{_libdir}/libcapi-system-sensor.so.*.recorder
101 %{_libdir}/libcapi-system-sensor.so.*
102 %license LICENSE.APLv2
105 %manifest packaging/capi-system-sensor.manifest
106 %{_libdir}/libcapi-system-sensor.so
107 %{_libdir}/pkgconfig/*.pc
108 %{_includedir}/sensor/*.h
109 %license LICENSE.APLv2
111 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
112 # if mobile || wearable || common || "undefined"
113 %if "%{?profile}" != "tv" && "%{?profile}" != "ivi"
114 %post extension-recorder
116 for FILE in libcapi-system-sensor.so.*.recorder; do ln -sf "${FILE}" "${FILE%.recorder}"; chsmack -a "_" "${FILE%.recorder}"; done
119 %preun extension-recorder
120 echo "You need to reinstall %{name} if you want to keep using %{name} after uninstalling this extension."
122 %files extension-recorder
123 %manifest packaging/capi-system-sensor.manifest
124 %{_libdir}/libcapi-system-sensor.so.*.recorder