From 7150abe536e5a989db3ca099d95ddc849a0a56db Mon Sep 17 00:00:00 2001 From: ByungWoo Lee Date: Wed, 30 Dec 2015 17:24:11 +0900 Subject: [PATCH] Modify build script Change-Id: I11608dcb46a65f984fd095e588210e1298017fa9 --- CMakeLists.txt | 8 ++++---- ...se-common.manifest => capi-base-common.manifest | 0 capi-base-common.pc.in | 8 +++----- packaging/capi-base-common.spec | 14 ++++++-------- 4 files changed, 13 insertions(+), 17 deletions(-) rename packaging/capi-base-common.manifest => capi-base-common.manifest (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 82a779d..e5bebed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,12 +9,12 @@ SET(PC_LDFLAGS -l${fw_name}) SET(INC_DIR "include") -INSTALL(FILES ${INC_DIR}/tizen.h DESTINATION include) -INSTALL(FILES ${INC_DIR}/tizen_type.h DESTINATION include) -INSTALL(FILES ${INC_DIR}/tizen_error.h DESTINATION include) +INSTALL(FILES ${INC_DIR}/tizen.h DESTINATION ${INCLUDE_INSTALL_DIR}) +INSTALL(FILES ${INC_DIR}/tizen_type.h DESTINATION ${INCLUDE_INSTALL_DIR}) +INSTALL(FILES ${INC_DIR}/tizen_error.h DESTINATION ${INCLUDE_INSTALL_DIR}) INCLUDE_DIRECTORIES(${INC_DIR}) -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/capi-base-common.pc DESTINATION lib/pkgconfig) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/capi-base-common.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) SET(SOURCES src/tizen_error.c diff --git a/packaging/capi-base-common.manifest b/capi-base-common.manifest similarity index 100% rename from packaging/capi-base-common.manifest rename to capi-base-common.manifest diff --git a/capi-base-common.pc.in b/capi-base-common.pc.in index 134c791..c3b7995 100644 --- a/capi-base-common.pc.in +++ b/capi-base-common.pc.in @@ -1,13 +1,11 @@ # Package Information for pkg-config -prefix=/usr -exec_prefix=${prefix} -libdir=${prefix}/lib -includedir=${prefix}/include +libdir=@LIB_INSTALL_DIR@ +includedir=@INCLUDE_INSTALL_DIR@ Name: capi-base-common -Description: capi-base-common +Description: Common header files of Tizen Native API Version: @VERSION@ Libs: -L${libdir} @PC_LDFLAGS@ Cflags: -I${includedir} diff --git a/packaging/capi-base-common.spec b/packaging/capi-base-common.spec index beca512..d9a7043 100644 --- a/packaging/capi-base-common.spec +++ b/packaging/capi-base-common.spec @@ -2,10 +2,9 @@ Name: capi-base-common Summary: Common header files of Tizen Native API Version: 0.3.1 Release: 1 -Group: System/Libraries +Group: Base License: Apache-2.0 Source0: %{name}-%{version}.tar.gz -Source1001: capi-base-common.manifest BuildRequires: cmake Requires(post): /sbin/ldconfig @@ -17,7 +16,7 @@ Common header files of Tizen Native API %package devel License: Apache-2.0 Summary: Common header files of Tizen Native API (Development) -Group: System/Libraries +Group: Base Requires: %{name} = %{version}-%{release} %description devel @@ -25,13 +24,13 @@ Common header files of Tizen Native API %prep %setup -q -cp %{SOURCE1001} . %build MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` -cmake . -DCMAKE_INSTALL_PREFIX=/usr -DLIB_INSTALL_DIR:PATH=%{_libdir} -DFULLVER=%{version} -DMAJORVER=${MAJORVER} +cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DLIB_INSTALL_DIR:PATH=%{_libdir} -DINCLUDE_INSTALL_DIR:PATH=%{_includedir} \ +-DFULLVER=%{version} -DMAJORVER=${MAJORVER} make %{?jobs:-j%jobs} @@ -53,6 +52,5 @@ cp LICENSE %{buildroot}/usr/share/license/%{name} %files devel %manifest %{name}.manifest -/usr/include/*.h -/usr/lib/pkgconfig/capi-base-common.pc -/usr/share/license/%{name} +%{_includedir}/*.h +%{_libdir}/pkgconfig/capi-base-common.pc -- 2.34.1