From: Wook Song Date: Tue, 7 Feb 2017 05:37:03 +0000 (+0900) Subject: hal: Make separate pass-hal-devel package X-Git-Tag: accepted/tizen/mobile/20170328.053617~39 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4f80e498a961310a8825ddf3405a3bbe79a5f04e;p=platform%2Fcore%2Fsystem%2Fpass.git hal: Make separate pass-hal-devel package This patch makes a separate package for pass-hal-devel. This package includes header files to build the board-specific pass-hal packages. Change-Id: Ia0581023a588ff7a1d39549c23a56268c808417d Signed-off-by: Wook Song --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 2116f1b..eaffb0a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,6 +59,7 @@ SET(INCLUDEDIR "${PREFIX}/include/${PROJECT_NAME}") SET(DATADIR "${PREFIX}/share/${PROJECT_NAME}") SET(CONFDIR "/etc/${PROJECT_NAME}") SET(VERSION 0.1.0) +SET(PASS_HAL_NAME pass-hal-devel) SET(SRCS src/pass/pass.c @@ -162,6 +163,8 @@ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/pmqos/pass-pmqos.conf DESTINATION CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) +CONFIGURE_FILE(${PASS_HAL_NAME}.pc.in ${PASS_HAL_NAME}.pc @ONLY) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PASS_HAL_NAME}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/systemd/ DESTINATION lib/systemd/system FILES_MATCHING @@ -170,3 +173,4 @@ INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/systemd/ DESTINATION lib/systemd/s ) ADD_SUBDIRECTORY(src/shared) +ADD_SUBDIRECTORY(src/hal) diff --git a/packaging/pass-hal-devel.manifest b/packaging/pass-hal-devel.manifest new file mode 100644 index 0000000..97e8c31 --- /dev/null +++ b/packaging/pass-hal-devel.manifest @@ -0,0 +1,5 @@ + + + + + diff --git a/packaging/pass.spec b/packaging/pass.spec index 07677d2..fe944a4 100644 --- a/packaging/pass.spec +++ b/packaging/pass.spec @@ -1,6 +1,7 @@ %define _unpackaged_files_terminate_build 0 %define daemon_name pass +%define hal_name pass-hal-devel %if "%{?profile}" == "mobile" %endif @@ -21,6 +22,7 @@ Group: System/Kernel License: Apache-2.0 Source0: %{name}-%{version}.tar.gz Source1: %{name}.manifest +Source2: %{hal_name}.manifest BuildRequires: cmake BuildRequires: libattr-devel @@ -49,6 +51,14 @@ Group: main %description %{daemon_name} PASS systemd daemon. +%package -n %{hal_name} +Summary: PASS HAL Header files +Group: Development/Library +Requires: pass = %{version}-%{release} + +%description -n %{hal_name} +Header files required to build pass-hal packages for specific boards. + %prep %setup -q %if %{with emulator} @@ -84,6 +94,7 @@ PASS systemd daemon. %build cp %{SOURCE1} . +cp %{SOURCE2} . make %{?jobs:-j%jobs} %install @@ -123,3 +134,9 @@ systemctl daemon-reload %{_unitdir}/sockets.target.wants/%{daemon_name}.socket %{_unitdir}/%{daemon_name}.service %{_unitdir}/%{daemon_name}.socket +%files -n %{hal_name} +%defattr(-,root,root,-) +%manifest %{hal_name}.manifest +%{_includedir}/%{daemon_name}/hal.h +%{_includedir}/%{daemon_name}/hal-log.h +%{_libdir}/pkgconfig/%{hal_name}.pc diff --git a/pass-hal-devel.pc.in b/pass-hal-devel.pc.in new file mode 100644 index 0000000..16fcdfc --- /dev/null +++ b/pass-hal-devel.pc.in @@ -0,0 +1,13 @@ +# Package Information for pkg-config + +package_name=pass-hal-devel +prefix=@PREFIX@ +exec_prefix=@EXEC_PREFIX@ +libdir=@LIB_INSTALL_DIR@ +includedir=@INCLUDEDIR@ + +Name: ${package_name} +Description: -- +Version: @VERSION@ +Requires: +Cflags: -I${includedir} diff --git a/src/hal/CMakeLists.txt b/src/hal/CMakeLists.txt new file mode 100755 index 0000000..ade8159 --- /dev/null +++ b/src/hal/CMakeLists.txt @@ -0,0 +1,15 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.6) +PROJECT(pass-hal-devel C) + +SET(HAL_HEADERS + hal.h + hal-log.h +) + +INCLUDE(FindPkgConfig) +pkg_check_modules(pkgs REQUIRED + dlog) + +FOREACH(hheader ${HAL_HEADERS}) + INSTALL(FILES ${hheader} DESTINATION ${INCLUDEDIR}) +ENDFOREACH(hheader) diff --git a/src/hal/hal-cpu-example.c b/src/hal/hal-cpu-example.c index bc3896a..6817d87 100644 --- a/src/hal/hal-cpu-example.c +++ b/src/hal/hal-cpu-example.c @@ -28,7 +28,7 @@ #include #include -#include +#include static int get_curr_governor(char *res_name, char *governor)