Merge branch 'devel/tizen_3.0' into tizen
[platform/core/system/sensord.git] / packaging / sensord.spec
index fdc6316..8af0b2d 100644 (file)
@@ -1,6 +1,6 @@
 Name:       sensord
 Summary:    Sensor daemon
-Version:    2.0.2
+Version:    2.0.6
 Release:    0
 Group:      System/Sensor Framework
 License:    Apache-2.0
@@ -9,30 +9,20 @@ Source1:    sensord.service
 Source2:    sensord_command.socket
 Source3:    sensord_event.socket
 
-
 BuildRequires:  cmake
 BuildRequires:  libattr-devel
 BuildRequires:  pkgconfig(dlog)
-BuildRequires:  pkgconfig(libxml-2.0)
 BuildRequires:  pkgconfig(glib-2.0)
 BuildRequires:  pkgconfig(vconf)
 BuildRequires:  pkgconfig(libsystemd-daemon)
-BuildRequires:  pkgconfig(capi-system-info)
 BuildRequires:  pkgconfig(cynara-creds-socket)
 BuildRequires:  pkgconfig(cynara-client)
 BuildRequires:  pkgconfig(cynara-session)
 Requires:   libsensord = %{version}-%{release}
 
-%define auto_rotation_state ON
-%define orientation_state OFF
-%define gravity_state OFF
-%define linear_accel_state OFF
-%define rv_state OFF
-%define geomagnetic_rv_state OFF
-%define gaming_rv_state OFF
-%define tilt_state OFF
-%define gyroscope_uncal_state OFF
-%define build_test_suite ON
+%ifarch %{ix86} x86_64
+%define BUILD_ARCH EMULATOR
+%endif
 
 %description
 Sensor daemon
@@ -60,7 +50,6 @@ Group:      System/Development
 %description -n sensor-hal-devel
 Sensord HAL interface
 
-%if %{build_test_suite} == "ON"
 %package -n sensor-test
 Summary:    Sensord library
 Group:      System/Testing
@@ -68,19 +57,12 @@ Group:      System/Testing
 %description -n sensor-test
 Sensor functional testing
 
-%endif
-
 %prep
 %setup -q
-
 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
 
 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DMAJORVER=${MAJORVER} -DFULLVER=%{version} \
-       -DORIENTATION=%{orientation_state} -DGRAVITY=%{gravity_state} \
-       -DLINEAR_ACCEL=%{linear_accel_state} -DRV=%{rv_state} \
-       -DGEOMAGNETIC_RV=%{geomagnetic_rv_state} -DGAMING_RV=%{gaming_rv_state} \
-       -DGYROSCOPE_UNCAL=%{gyroscope_uncal_state} -DAUTO_ROTATION=%{auto_rotation_state} \
-       -DTILT=%{tilt_state} -DTEST_SUITE=%{build_test_suite}
+       -DARCH=%{BUILD_ARCH}
 
 %build
 make %{?jobs:-j%jobs}
@@ -89,11 +71,11 @@ make %{?jobs:-j%jobs}
 rm -rf %{buildroot}
 %make_install
 
-mkdir -p %{buildroot}%{_libdir}/systemd/system/
+mkdir -p %{buildroot}%{_unitdir}
 
-install -m 0644 %SOURCE1 %{buildroot}%{_libdir}/systemd/system/
-install -m 0644 %SOURCE2 %{buildroot}%{_libdir}/systemd/system/
-install -m 0644 %SOURCE3 %{buildroot}%{_libdir}/systemd/system/
+install -m 0644 %SOURCE1 %{buildroot}%{_unitdir}
+install -m 0644 %SOURCE2 %{buildroot}%{_unitdir}
+install -m 0644 %SOURCE3 %{buildroot}%{_unitdir}
 
 %install_service multi-user.target.wants sensord.service
 %install_service sockets.target.wants sensord_event.socket
@@ -113,7 +95,6 @@ ln -sf %{_libdir}/libsensor.so.%{version} %{_libdir}/libsensor.so.1
 /sbin/ldconfig
 
 %files
-%attr(0644,root,root)/usr/etc/virtual_sensors.xml
 %manifest packaging/sensord.manifest
 %{_bindir}/sensord
 %{_unitdir}/sensord.service
@@ -141,9 +122,9 @@ ln -sf %{_libdir}/libsensor.so.%{version} %{_libdir}/libsensor.so.1
 %files -n sensor-hal-devel
 %defattr(-,root,root,-)
 %{_includedir}/sensor/sensor_hal.h
+%{_includedir}/sensor/sensor_hal_types.h
 %license LICENSE.APLv2
 
-%if %{build_test_suite} == "ON"
 %files -n sensor-test
 %defattr(-,root,root,-)
 %{_bindir}/api-test
@@ -152,4 +133,3 @@ ln -sf %{_libdir}/libsensor.so.%{version} %{_libdir}/libsensor.so.1
 %{_bindir}/multi-process-performance-test
 %{_bindir}/fusion-data-collection
 %license LICENSE.APLv2
-%endif