cmake_minimum_required(VERSION 2.6)
-project(sensor_hal_main CXX)
+project(sensor-plugins CXX)
include(GNUInstallDirs)
-# Setup For pkgconfig File
-SET(PREFIX ${CMAKE_INSTALL_PREFIX})
-SET(EXEC_PREFIX "${PREFIX}/bin")
-SET(LIBDIR "${PREFIX}/${CMAKE_INSTALL_LIBDIR}")
-SET(INCLUDEDIR "${PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}")
-SET(VERSION 1.0)
-
# Common Options
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -O2 -omit-frame-pointer -std=gnu++0x")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdata-sections -ffunction-sections")
INSTALL(FILES sensors.xml DESTINATION etc)
# Sub-directory
-add_subdirectory(src)
\ No newline at end of file
+add_subdirectory(src)
+++ /dev/null
-<manifest>
- <request>
- <domain name="_"/>
- </request>
-</manifest>
+++ /dev/null
-Name: sensor-hal
-Summary: Sensor HAL Plugins
-Version: 1.0.0
-Release: 0
-Group: System/Sensor HAL
-License: Apache-2.0
-Source0: %{name}-%{version}.tar.gz
-Source1: sensor-hal.manifest
-
-BuildRequires: cmake
-BuildRequires: pkgconfig(dlog)
-BuildRequires: pkgconfig(libxml-2.0)
-
-%define accel_state ON
-%define gyro_state OFF
-%define proxi_state ON
-%define light_state OFF
-%define geo_state OFF
-%define pressure_state OFF
-%define temperature_state OFF
-%define ultraviolet_state OFF
-%define rv_state OFF
-%define bio_led_red_state OFF
-
-%description
-Sensor HAL Plugins
-
-%package sensor-hal
-Summary: Sensor HAL Plugins
-Group: System/Sensor Framework
-Requires: %{name} = %{version}-%{release}
-
-%description sensor-hal
-Sensor HAL Plugins
-
-%prep
-%setup -q
-cp %{SOURCE1} .
-
-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} \
--DRV=%{rv_state} -DULTRAVIOLET=%{ultraviolet_state} \
--DBIO_LED_RED=%{bio_led_red_state} \
--DLIBDIR=%{_libdir} -DINCLUDEDIR=%{_includedir}
-
-%build
-make %{?jobs:-j%jobs}
-
-%install
-rm -rf %{buildroot}
-%make_install
-
-%post -n sensor-hal -p /sbin/ldconfig
-
-%postun -n sensor-hal -p /sbin/ldconfig
-
-%files -n sensor-hal
-%manifest sensor-hal.manifest
-%attr(0644,root,root)/usr/etc/sensors.xml
-%{_libdir}/sensor-hal/libsensor-hal.so
--- /dev/null
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+</manifest>
--- /dev/null
+Name: sensor-plugins-tm1
+Summary: TM1 Sensor Plugins
+Version: 1.0.0
+Release: 0
+Group: System/Sensor Framework
+License: Apache-2.0
+Source0: %{name}-%{version}.tar.gz
+
+BuildRequires: cmake
+BuildRequires: pkgconfig(dlog)
+BuildRequires: pkgconfig(libxml-2.0)
+
+%define accel_state ON
+%define gyro_state OFF
+%define proxi_state ON
+%define light_state OFF
+%define geo_state OFF
+%define pressure_state OFF
+%define temperature_state OFF
+%define ultraviolet_state OFF
+%define rv_state OFF
+%define bio_led_red_state OFF
+
+%description
+TM1 Sensor Plugins
+
+%prep
+%setup -q
+
+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} \
+-DRV=%{rv_state} -DULTRAVIOLET=%{ultraviolet_state} \
+-DBIO_LED_RED=%{bio_led_red_state} \
+-DLIBDIR=%{_libdir} -DINCLUDEDIR=%{_includedir}
+
+%build
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+
+%post
+/sbin/ldconfig
+
+%postun
+/sbin/ldconfig
+
+%files
+%manifest packaging/%{name}.manifest
+%attr(0644,root,root)/usr/etc/sensors.xml
+%{_libdir}/sensor/*.so
cmake_minimum_required(VERSION 2.6)
-project(sensor-hal CXX)
+project(sensor-plugins-tm1 CXX)
INCLUDE(FindPkgConfig)
PKG_CHECK_MODULES(plugin_pkgs REQUIRED dlog libxml-2.0)
target_link_libraries(${PROJECT_NAME} ${plugin_pkgs_LDFLAGS} "-lrt -ldl -pthread")
-install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}/sensor-hal)
+install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}/sensor)