Modify build script 33/55933/1 accepted/tizen/mobile/20151230.223852 accepted/tizen/tv/20151230.223908 accepted/tizen/wearable/20151230.223929 submit/tizen/20151230.100537
authorByungWoo Lee <bw1212.lee@samsung.com>
Wed, 30 Dec 2015 08:24:11 +0000 (17:24 +0900)
committerByungWoo Lee <bw1212.lee@samsung.com>
Wed, 30 Dec 2015 08:24:11 +0000 (17:24 +0900)
Change-Id: I11608dcb46a65f984fd095e588210e1298017fa9

CMakeLists.txt
capi-base-common.manifest [moved from packaging/capi-base-common.manifest with 100% similarity]
capi-base-common.pc.in
packaging/capi-base-common.spec

index 82a779d..e5bebed 100644 (file)
@@ -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
index 134c791..c3b7995 100644 (file)
@@ -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}
index beca512..d9a7043 100644 (file)
@@ -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