Fix the build error on 3.0. 20/4320/3 accepted/tizen/20130627.135131 submit/tizen/20130627.143235
authorJunfeng Dong <junfeng.dong@intel.com>
Wed, 26 Jun 2013 07:47:35 +0000 (15:47 +0800)
committerJunfeng Dong <junfeng.dong@intel.com>
Thu, 27 Jun 2013 14:19:24 +0000 (22:19 +0800)
    Fix wrong gcc options.
    Fix build on x86_64.

Change-Id: If05b223a135687b3af1494fdc875a3542093556a
Signed-off-by: Junfeng Dong <junfeng.dong@intel.com>
CMakeLists.txt
TC/CMakeLists.txt
libptdb/CMakeLists.txt
packaging/print-service.changes [new file with mode: 0644]
packaging/print-service.spec

index 53ad108..a03aad8 100755 (executable)
@@ -3,7 +3,7 @@ PROJECT(print-service C CXX)
 
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 SET(EXEC_PREFIX "\${prefix}")
-SET(LIBDIR "\${prefix}/lib")
+SET(LIBDIR ${LIB_INSTALL_DIR})
 SET(INCLUDEDIR "\${prefix}/include")
 SET(VERSION_MAJOR 1)
 SET(VERSION "${VERSION_MAJOR}.2.7")
@@ -22,7 +22,7 @@ FOREACH(flag ${utils_pkgs_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag} -fdata-sections -ffunction-sections -Wl,--gc-sections")
 ENDFOREACH(flag)
 
-LINK_DIRECTORIES(/usr/lib)
+LINK_DIRECTORIES(${LIB_INSTALL_DIR})
 
 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -g -fno-omit-frame-pointer -finstrument-functions")
 #SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -DEXPORT_API=\"\" ")
@@ -45,8 +45,8 @@ TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} -lcups)
 CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY)
 
 MESSAGE("destination: ${DESTINATION}")
-INSTALL(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib )
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION lib/pkgconfig)
+INSTALL(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION ${LIB_INSTALL_DIR} )
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/pt_api.h DESTINATION "include/print-service")
 
 FILE(GLOB samsung_cms "${CMAKE_CURRENT_SOURCE_DIR}/data/samsung/cms/*.cts" )
index b59b3ea..72ec464 100644 (file)
@@ -5,7 +5,7 @@ SET(PACKAGE_NAME print-service)
 
 SET(PREFIX /usr)
 SET(BINDIR "${PREFIX}/bin")
-SET(LIBDIR "${PREFIX}/lib")
+SET(LIBDIR ${LIB_INSTALL_DIR})
 SET(SRCS ppd_compare.c)
 
 SET(DB_LIB_NAME ptdb)
@@ -88,7 +88,7 @@ INSTALL(TARGETS ${GETPPD} DESTINATION ${BINDIR})
 
 
 # Compile and install getppdvalue
-SET(getppdvalue_LDFLAGS "-Wl -lcups")
+SET(getppdvalue_LDFLAGS "-Wl,-lcups")
 
 ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${getppdvalue_LDFLAGS})
index d7688c5..99b077c 100644 (file)
@@ -3,7 +3,7 @@ PROJECT(ptdb C)
 SET(PACKAGE_NAME print-service)
 
 SET(PREFIX /usr)
-SET(LIBDIR "${PREFIX}/lib")
+SET(LIBDIR ${LIB_INSTALL_DIR})
 
 SET(DB_LIB_NAME ptdb)
 SET(VERSION_MAJOR 1)
@@ -21,4 +21,4 @@ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
 ADD_LIBRARY(${DB_LIB_NAME} SHARED ${SRCS_DB_LIB})
 SET_TARGET_PROPERTIES(${DB_LIB_NAME} PROPERTIES SOVERSION ${VERSION_MAJOR})
 SET_TARGET_PROPERTIES(${DB_LIB_NAME} PROPERTIES VERSION ${VERSION})
-INSTALL(TARGETS ${DB_LIB_NAME} LIBRARY DESTINATION ${LIBDIR})
\ No newline at end of file
+INSTALL(TARGETS ${DB_LIB_NAME} LIBRARY DESTINATION ${LIBDIR})
diff --git a/packaging/print-service.changes b/packaging/print-service.changes
new file mode 100644 (file)
index 0000000..c1bc395
--- /dev/null
@@ -0,0 +1,3 @@
+* Thu Jun 27 2013 Junfeng Dong <junfeng.dong@intel.com> accepted/tizen/20130530.164652@c19d93c
+- Fix the build error on 3.0.
+
index 9ebeeb2..05e703e 100755 (executable)
@@ -54,7 +54,7 @@ Set of utilities for testing different parts of library
 %setup -q
 
 %build
-cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DENABLE_OM_TESTS=On
+%cmake . -DENABLE_OM_TESTS=On
 
 %install
 rm -rf %{buildroot}
@@ -120,9 +120,6 @@ fi
 %postun
 /sbin/ldconfig
 
-%post devel
-chmod 644 /usr/lib/pkgconfig/print-service.pc
-chmod 644 /usr/include/print-service/pt_api.h
 
 %files
 %manifest print-service.manifest
@@ -133,7 +130,7 @@ chmod 644 /usr/include/print-service/pt_api.h
 %exclude %{_libdir}/libopmap.so*
 
 %files devel
-%defattr(-,root,root,-)
+%defattr(644,root,root,-)
 %{_includedir}/print-service/*.h
 %{_libdir}/pkgconfig/*