X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=packaging%2Fsensord.spec;h=8af0b2d7eed507cf7ecdf6cd6dff69d430b76ffd;hb=cad27427ccfc390d6f0f137a099fe92d7ff1eaa8;hp=c4ff15fe9b2377a894e3a620aff1f88c8ae8b1df;hpb=4fc2f4bdb07547f38f4d298fc7a95c39c1d3bf27;p=platform%2Fcore%2Fsystem%2Fsensord.git diff --git a/packaging/sensord.spec b/packaging/sensord.spec index c4ff15f..8af0b2d 100644 --- a/packaging/sensord.spec +++ b/packaging/sensord.spec @@ -1,56 +1,32 @@ Name: sensord Summary: Sensor daemon -Version: 1.0.0 +Version: 2.0.6 Release: 0 -Group: System/Sensor Framework +Group: System/Sensor Framework License: Apache-2.0 Source0: %{name}-%{version}.tar.gz -Source1: sensord.manifest -Source2: libsensord.manifest +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 accel_state ON -%define auto_rotation_state ON -%define gyro_state ON -%define proxi_state ON -%define light_state ON -%define geo_state ON -%define pressure_state ON -%define temperature_state ON -%define ultraviolet_state ON -%define orientation_state ON -%define gravity_state ON -%define linear_accel_state ON -%define rv_state ON -%define geomagnetic_rv_state ON -%define gaming_rv_state ON -%define tilt_state ON -%define uncal_gyro_state ON -%define bio_led_red_state ON -%define build_test_suite ON +%ifarch %{ix86} x86_64 +%define BUILD_ARCH EMULATOR +%endif %description Sensor daemon -%package sensord -Summary: Sensor daemon -Group: System/Sensor Framework -Requires: %{name} = %{version}-%{release} - -%description sensord -Sensor daemon - %package -n libsensord Summary: Sensord library Group: System/Libraries @@ -62,45 +38,31 @@ Sensord library %package -n libsensord-devel Summary: Sensord shared library Group: System/Development -Requires: %{name} = %{version}-%{release} +Requires: libsensord = %{version}-%{release} %description -n libsensord-devel Sensord shared library -%package -n libsensord-plugin -Summary: Sensord plugin library +%package -n sensor-hal-devel +Summary: Sensord HAL interface Group: System/Development -Requires: %{name} = %{version}-%{release} -%description -n libsensord-plugin -Sensord plugin library +%description -n sensor-hal-devel +Sensord HAL interface -%if %{build_test_suite} == "ON" %package -n sensor-test Summary: Sensord library Group: System/Testing -Requires: %{name} = %{version}-%{release} %description -n sensor-test Sensor functional testing -%endif - %prep %setup -q -cp %{SOURCE1} . -cp %{SOURCE2} . - -cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DACCEL=%{accel_state} \ - -DGYRO=%{gyro_state} -DPROXI=%{proxi_state} -DLIGHT=%{light_state} \ - -DGEO=%{geo_state} -DPRESSURE=%{pressure_state} -DTEMPERATURE=%{temperature_state} \ - -DORIENTATION=%{orientation_state} -DGRAVITY=%{gravity_state} \ - -DLINEAR_ACCEL=%{linear_accel_state} -DRV=%{rv_state} \ - -DGEOMAGNETIC_RV=%{geomagnetic_rv_state} -DGAMING_RV=%{gaming_rv_state} \ - -DUNCAL_GYRO=%{uncal_gyro_state} -DAUTO_ROTATION=%{auto_rotation_state} \ - -DTILT=%{tilt_state} -DULTRAVIOLET=%{ultraviolet_state} \ - -DBIO_LED_RED=%{bio_led_red_state} -DTEST_SUITE=%{build_test_suite} \ - -DLIBDIR=%{_libdir} -DINCLUDEDIR=%{_includedir} +MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` + +cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DMAJORVER=${MAJORVER} -DFULLVER=%{version} \ + -DARCH=%{BUILD_ARCH} %build make %{?jobs:-j%jobs} @@ -109,8 +71,15 @@ make %{?jobs:-j%jobs} rm -rf %{buildroot} %make_install +mkdir -p %{buildroot}%{_unitdir} + +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.socket +%install_service sockets.target.wants sensord_event.socket +%install_service sockets.target.wants sensord_command.socket %post systemctl daemon-reload @@ -118,43 +87,44 @@ systemctl daemon-reload %postun systemctl daemon-reload -%post -n libsensord -p /sbin/ldconfig +%post -n libsensord +ln -sf %{_libdir}/libsensor.so.%{version} %{_libdir}/libsensor.so.1 +/sbin/ldconfig -%postun -n libsensord -p /sbin/ldconfig +%postun -n libsensord +/sbin/ldconfig -%files -n sensord -%attr(0644,root,root)/usr/etc/virtual_sensors.xml -%manifest sensord.manifest +%files +%manifest packaging/sensord.manifest %{_bindir}/sensord %{_unitdir}/sensord.service -%{_unitdir}/sensord.socket +%{_unitdir}/sensord_command.socket +%{_unitdir}/sensord_event.socket %{_unitdir}/multi-user.target.wants/sensord.service -%{_unitdir}/sockets.target.wants/sensord.socket +%{_unitdir}/sockets.target.wants/sensord_command.socket +%{_unitdir}/sockets.target.wants/sensord_event.socket %license LICENSE.APLv2 %files -n libsensord %defattr(-,root,root,-) -%manifest libsensord.manifest +%manifest packaging/libsensord.manifest %{_libdir}/libsensor.so.* -%{_libdir}/libsensord-devel.so +%{_libdir}/libsensord-shared.so %license LICENSE.APLv2 %files -n libsensord-devel %defattr(-,root,root,-) %{_includedir}/sensor/*.h -%{_includedir}/sensord-devel/*.h %{_libdir}/libsensor.so %{_libdir}/pkgconfig/sensor.pc -%{_libdir}/pkgconfig/sensord-devel.pc -%{_libdir}/pkgconfig/sensord-server.pc %license LICENSE.APLv2 -%files -n libsensord-plugin +%files -n sensor-hal-devel %defattr(-,root,root,-) -%{_libdir}/libsensord-plugin.so +%{_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 @@ -163,4 +133,3 @@ systemctl daemon-reload %{_bindir}/multi-process-performance-test %{_bindir}/fusion-data-collection %license LICENSE.APLv2 -%endif