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-hal.manifest [deleted file]
packaging/sensor-hal.spec [deleted file]
packaging/sensor-plugins-tm1.manifest [new file with mode: 0644]
packaging/sensor-plugins-tm1.spec [new file with mode: 0644]
src/CMakeLists.txt

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..a01ee28
--- /dev/null
@@ -0,0 +1 @@
+.*.swp
index 594f69547b9435ed69daa8c98206712d1909ff42..f4e5d2d98530a2acd24fdbb1ab128c1b23b86760 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)
diff --git a/packaging/sensor-hal.manifest b/packaging/sensor-hal.manifest
deleted file mode 100644 (file)
index 75b0fa5..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<manifest>
-    <request>
-        <domain name="_"/>
-    </request>
-</manifest>
diff --git a/packaging/sensor-hal.spec b/packaging/sensor-hal.spec
deleted file mode 100644 (file)
index 940f715..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-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
diff --git a/packaging/sensor-plugins-tm1.manifest b/packaging/sensor-plugins-tm1.manifest
new file mode 100644 (file)
index 0000000..75b0fa5
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+    <request>
+        <domain name="_"/>
+    </request>
+</manifest>
diff --git a/packaging/sensor-plugins-tm1.spec b/packaging/sensor-plugins-tm1.spec
new file mode 100644 (file)
index 0000000..ad321bb
--- /dev/null
@@ -0,0 +1,53 @@
+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
index 0e584f77ea28abf1c0e980f2b3d4640eb3597123..c71b78e05edac6c5e8d9a88e7552b433ad3e09bd 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)