Re-package sensor-hal to sensor-plugins-tm1
authorMu-Woong Lee <muwoong.lee@samsung.com>
Wed, 3 Feb 2016 07:38:38 +0000 (16:38 +0900)
committerMu-Woong Lee <muwoong.lee@samsung.com>
Wed, 3 Feb 2016 07:38:38 +0000 (16:38 +0900)
Change-Id: I0f0e95eaf7c908b98cbe77b0863f8c86f22004ba
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
.gitignore [new file with mode: 0644]
CMakeLists.txt
packaging/sensor-plugins-tm1.manifest [moved from packaging/sensor-hal.manifest with 100% similarity]
packaging/sensor-plugins-tm1.spec [moved from packaging/sensor-hal.spec with 68% similarity]
src/CMakeLists.txt

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..a01ee28
--- /dev/null
@@ -0,0 +1 @@
+.*.swp
index 594f695..f4e5d2d 100644 (file)
@@ -1,14 +1,7 @@
 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")
@@ -28,4 +21,4 @@ CONFIGURE_FILE(sensors.xml.in sensors.xml @ONLY)
 INSTALL(FILES sensors.xml DESTINATION etc)
 
 # Sub-directory
-add_subdirectory(src)
\ No newline at end of file
+add_subdirectory(src)
similarity index 68%
rename from packaging/sensor-hal.spec
rename to packaging/sensor-plugins-tm1.spec
index 940f715..ad321bb 100644 (file)
@@ -1,11 +1,10 @@
-Name:       sensor-hal
-Summary:    Sensor HAL Plugins
+Name:       sensor-plugins-tm1
+Summary:    TM1 Sensor Plugins
 Version:    1.0.0
 Release:    0
-Group:      System/Sensor HAL
+Group:      System/Sensor Framework
 License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
-Source1:    sensor-hal.manifest
 
 BuildRequires:  cmake
 BuildRequires:  pkgconfig(dlog)
@@ -23,19 +22,10 @@ BuildRequires:  pkgconfig(libxml-2.0)
 %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
+TM1 Sensor Plugins
 
 %prep
 %setup -q
-cp %{SOURCE1} .
 
 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DACCEL=%{accel_state} \
 -DGYRO=%{gyro_state} -DPROXI=%{proxi_state} -DLIGHT=%{light_state} \
@@ -51,11 +41,13 @@ make %{?jobs:-j%jobs}
 rm -rf %{buildroot}
 %make_install
 
-%post -n sensor-hal -p /sbin/ldconfig
+%post
+/sbin/ldconfig
 
-%postun -n sensor-hal -p /sbin/ldconfig
+%postun
+/sbin/ldconfig
 
-%files -n sensor-hal
-%manifest sensor-hal.manifest
+%files
+%manifest packaging/%{name}.manifest
 %attr(0644,root,root)/usr/etc/sensors.xml
-%{_libdir}/sensor-hal/libsensor-hal.so
+%{_libdir}/sensor/*.so
index 0e584f7..c71b78e 100644 (file)
@@ -1,5 +1,5 @@
 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)
@@ -85,4 +85,4 @@ add_library(${PROJECT_NAME} SHARED
 
 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)