From: jungmin76.park Date: Sun, 6 Oct 2013 23:36:25 +0000 (+0000) Subject: Merge "add pkgconfig and refine spec" into tizen_2.2 X-Git-Tag: submit/tizen/20131014.072443^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c12e556e9b3be018fd9f51285f99734b6d7f8877;hp=211e1bc8b47c88d8a6f9179be079af97ff8fb9a1;p=platform%2Fframework%2Fnative%2Fshell.git Merge "add pkgconfig and refine spec" into tizen_2.2 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 01535c0..547c883 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,18 +32,24 @@ ADD_SUBDIRECTORY(src/core) ADD_DEPENDENCIES(osp-shell osp-shell-core) +SET(PC_REQUIRED ${pc_requires}) +SET(VERSION ${FULLVER}) + # pkgconfig file CONFIGURE_FILE(osp-shell.pc.in ${CMAKE_SOURCE_DIR}/osp-shell.pc @ONLY) INSTALL(FILES ${CMAKE_SOURCE_DIR}/osp-shell.pc DESTINATION lib/pkgconfig) +CONFIGURE_FILE(osp-shell-core.pc.in ${CMAKE_SOURCE_DIR}/osp-shell-core.pc @ONLY) +INSTALL(FILES ${CMAKE_SOURCE_DIR}/osp-shell-core.pc DESTINATION lib/pkgconfig) + INSTALL(DIRECTORY ${LIBRARY_OUTPUT_PATH}/ DESTINATION lib/osp - FILES_MATCHING PATTERN "*.so*" - PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ + FILES_MATCHING PATTERN "*.so*" + PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ) -INSTALL(DIRECTORY ${LIBRARY_OUTPUT_PATH}/debug/ DESTINATION lib/osp/debug +INSTALL(DIRECTORY ${LIBRARY_OUTPUT_PATH}/debug/ DESTINATION lib/osp/debug FILES_MATCHING PATTERN "*" - PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ + PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ) diff --git a/osp-shell-core.pc.in b/osp-shell-core.pc.in new file mode 100755 index 0000000..fadaa3a --- /dev/null +++ b/osp-shell-core.pc.in @@ -0,0 +1,13 @@ +# Package Information for pkg-config + +prefix=@PREFIX@ +exec_prefix=/usr +libdir=/usr/lib/osp +includedir=/usr/include/osp + +Name: osp-shell-core +Description: @PACKAGE_DESCRIPTION@ +Version: @VERSION@ +Requires: @PC_REQUIRED@ +Libs: -L${libdir} -losp-shell-core +Cflags: -I${includedir} -I${includedir}/shell diff --git a/osp-shell.pc.in b/osp-shell.pc.in index e0eedad..0081bb3 100644 --- a/osp-shell.pc.in +++ b/osp-shell.pc.in @@ -5,9 +5,9 @@ exec_prefix=/usr libdir=/usr/lib/osp includedir=/usr/include/osp -Name: @PC_NAME@ +Name: osp-shell Description: @PACKAGE_DESCRIPTION@ Version: @VERSION@ Requires: @PC_REQUIRED@ -Libs: -L${libdir} @PC_LDFLAGS@ -Cflags: -I${includedir} +Libs: -L${libdir} -losp-shell +Cflags: -I${includedir} -I${includedir}/shell diff --git a/packaging/osp-shell.spec b/packaging/osp-shell.spec index 97dc61a..21e8e3c 100644 --- a/packaging/osp-shell.spec +++ b/packaging/osp-shell.spec @@ -2,9 +2,9 @@ %define __strip /bin/true Name: osp-shell -Summary: The Shell library of OSP -Version: 1.2.2.0 -Release: 12 +Summary: The Shell library of OSP +Version: 1.2.2.1 +Release: 1 Group: System/Libraries License: Apache License, Version 2.0 or Flora Source0: %{name}-%{version}.tar.gz @@ -17,6 +17,7 @@ BuildRequires: pkgconfig(osp-appfw) BuildRequires: pkgconfig(osp-uifw) BuildRequires: pkgconfig(evas) BuildRequires: pkgconfig(ecore) +BuildRequires: pkgconfig(ecore-x) BuildRequires: pkgconfig(elementary) BuildRequires: pkgconfig(notification) BuildRequires: pkgconfig(appsvc) @@ -24,18 +25,13 @@ BuildRequires: pkgconfig(pkgmgr) BuildRequires: pkgconfig(minicontrol-provider) BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xext) -BuildRequires: pkgconfig(xfixes) BuildRequires: pkgconfig(xdamage) BuildRequires: pkgconfig(libdri2) BuildRequires: pkgconfig(libdrm) BuildRequires: pkgconfig(libtbm) -BuildRequires: pkgconfig(dri2proto) -BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(provider) BuildRequires: pkgconfig(livebox-viewer) BuildRequires: pkgconfig(livebox-service) -BuildRequires: pkgconfig(libdri2) -BuildRequires: pkgconfig(libdrm) BuildRequires: pkgconfig(shortcut) BuildRequires: pkgconfig(osp-image) BuildRequires: pkgconfig(osp-image-core) @@ -43,7 +39,6 @@ BuildRequires: pkgconfig(osp-media) BuildRequires: pkgconfig(osp-net) BuildRequires: pkgconfig(vconf) BuildRequires: osp-image-core-internal-devel -BuildRequires: osp-appfw-internal-devel BuildRequires: osp-uifw-internal-devel BuildRequires: boost-devel BuildRequires: pkgconfig(badge) @@ -52,7 +47,8 @@ BuildRequires: pkgconfig(badge) # runtime requires Requires: chromium Requires: osp-appfw -Requires: osp-uifw +Requires: osp-uifw +Requires: osp-image Provides: libosp-shell.so.1 @@ -134,11 +130,11 @@ cat %{_builddir}/%{name}-%{version}/LICENSE.Flora >> %{buildroot}/usr/share/lic %files devel %{_includedir}/osp/*.h -%{_libdir}/pkgconfig/osp-shell.pc %files internal-devel %{_includedir}/osp/shell/* - +%{_libdir}/pkgconfig/osp-shell-core.pc +%{_libdir}/pkgconfig/osp-shell.pc %files debug %{_libdir}/osp/debug/*.so* diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6bdd531..3f2bc8d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -4,55 +4,43 @@ INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/inc ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/inc - /usr/include/chromium - /usr/include/osp - /usr/include/osp/app - /usr/include/osp/base - /usr/include/osp/io /usr/include/osp/graphics /usr/include/osp/ui - /usr/include/osp/security - - /usr/include - /usr/include/appfw - /usr/include/uifw - /usr/include/glib-2.0 - /usr/lib/glib-2.0/include - /usr/include/cairo - /usr/include/chromium - /usr/include/dlog - /usr/include/dbus-1.0 - /usr/include/dri2 - /usr/include/libdrm - /usr/include/notification - /usr/lib/dbus-1.0/include - /usr/include/e_dbus-1 - /usr/include/elementary-1 - /usr/include/efreet-1 - /usr/include/ecore-1 - /usr/include/edje-1 - /usr/include/evas-1 - /usr/include/eet-1 - /usr/include/eina-1 - /usr/include/eina-1/eina - /usr/include/ethumb-1 - /usr/include/freetype2 - /usr/include/fribidi - /usr/include/harfbuzz - /usr/include/libxml2 - /usr/include/minizip - /usr/include/minicontrol - /usr/include/pango-1.0 - /usr/include/pixman-1 - /usr/include/system - /usr/include/vconf - /usr/include/shortcut - /usr/include/provider - /usr/include/livebox-service - /usr/include/livebox-viewer /usr/include/osp/media ) +INCLUDE(FindPkgConfig) +pkg_check_modules(pkgs REQUIRED + capi-appfw-application + capi-appfw-app-manager + capi-appfw-package-manager + chromium + dlog + libdri2 + libdrm + libtbm + ecore + ecore-x + elementary + evas + livebox-viewer + livebox-service + minicontrol-provider + notification + osp-appfw + provider + shortcut + vconf + x11 + xext + xdamage +) + +FOREACH(flag ${pkgs_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + + SET (${this_target}_SOURCE_FILES FShellQuickPanelFrame.cpp FShell_QuickPanelFrame.cpp @@ -109,36 +97,16 @@ SET(CMAKE_CXX_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_CXX_FLAGS} ${EX ## Create Library ADD_LIBRARY (${this_target} SHARED ${${this_target}_SOURCE_FILES}) +ADD_DEPENDENCIES(${this_target} osp-shell-core) + ## SET LINKER FLAGS SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -Wl,--as-needed") TARGET_LINK_LIBRARIES(${this_target} "-lpthread" ) -TARGET_LINK_LIBRARIES(${this_target} "-lchromium" ) -TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib/osp -losp-appfw" ) TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib/osp -losp-uifw" ) TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib/osp -losp-image" ) -TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib/osp -losp-shell-core" ) -TARGET_LINK_LIBRARIES(${this_target} "-lcapi-appfw-application" ) -TARGET_LINK_LIBRARIES(${this_target} "-lcapi-appfw-app-manager" ) -TARGET_LINK_LIBRARIES(${this_target} "-lcapi-appfw-package-manager" ) -TARGET_LINK_LIBRARIES(${this_target} "-lnotification" ) -TARGET_LINK_LIBRARIES(${this_target} "-lecore" ) -TARGET_LINK_LIBRARIES(${this_target} "-levas" ) -TARGET_LINK_LIBRARIES(${this_target} "-leina" ) -TARGET_LINK_LIBRARIES(${this_target} "-lecore_evas" ) -TARGET_LINK_LIBRARIES(${this_target} "-lelementary" ) -TARGET_LINK_LIBRARIES(${this_target} "-lminicontrol-provider" ) -#TARGET_LINK_LIBRARIES(${this_target} "-lcapi-system-runtime-info") -TARGET_LINK_LIBRARIES(${this_target} "-lX11" ) -TARGET_LINK_LIBRARIES(${this_target} "-lXext" ) -TARGET_LINK_LIBRARIES(${this_target} "-lecore_x" ) -TARGET_LINK_LIBRARIES(${this_target} "-llivebox-viewer" ) -TARGET_LINK_LIBRARIES(${this_target} "-llivebox-service" ) -TARGET_LINK_LIBRARIES(${this_target} "-lprovider" ) -TARGET_LINK_LIBRARIES(${this_target} "-lshortcut" ) -TARGET_LINK_LIBRARIES(${this_target} "-ldri2" ) -TARGET_LINK_LIBRARIES(${this_target} "-ldrm" ) -TARGET_LINK_LIBRARIES(${this_target} "-ltbm" ) +TARGET_LINK_LIBRARIES(${this_target} osp-shell-core) +TARGET_LINK_LIBRARIES(${this_target} ${pkgs_LDFLAGS}) SET_TARGET_PROPERTIES(${this_target} PROPERTIES @@ -153,4 +121,4 @@ ADD_CUSTOM_COMMAND(TARGET ${this_target} COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX}.${FULLVER} ${LIBRARY_OUTPUT_PATH}/debug/${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX}.${MAJORVER} COMMAND ${CMAKE_STRIP} --strip-unneeded ${LIBRARY_OUTPUT_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX} COMMENT "strip ${this_target}" -) +) diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 3802b83..c52328e 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -4,23 +4,26 @@ INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/inc ${CMAKE_SOURCE_DIR}/src/inc ${CMAKE_SOURCE_DIR}/src/core - /usr/include/chromium - /usr/include/osp - /usr/include/osp/app - /usr/include/osp/base - /usr/include/osp/io - /usr/include/osp/security /usr/include/osp/graphics - - /usr/include/appfw - /usr/include/notification - /usr/include/shortcut - /usr/include/vconf - /usr/include/badge - /usr/include/glib-2.0 - /usr/lib/glib-2.0/include ) +INCLUDE(FindPkgConfig) +pkg_check_modules(corepkgs REQUIRED + capi-appfw-application + capi-appfw-app-manager + badge + chromium + glib-2.0 + notification + osp-appfw + shortcut + vconf +) + +FOREACH(flag ${corepkgs_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + SET (${this_target}_SOURCE_FILES FShellLockManager.cpp FShellNotificationManager.cpp @@ -51,15 +54,8 @@ ADD_LIBRARY (${this_target} SHARED ${${this_target}_SOURCE_FILES}) SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -Wl,--as-needed") TARGET_LINK_LIBRARIES(${this_target} "-lpthread" ) -TARGET_LINK_LIBRARIES(${this_target} "-lchromium" ) -TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib/osp -losp-appfw" ) TARGET_LINK_LIBRARIES(${this_target} "-losp-uifw" ) -TARGET_LINK_LIBRARIES(${this_target} "-lcapi-appfw-application" ) -TARGET_LINK_LIBRARIES(${this_target} "-lcapi-appfw-app-manager" ) -TARGET_LINK_LIBRARIES(${this_target} "-lnotification" ) -TARGET_LINK_LIBRARIES(${this_target} "-lshortcut" ) -TARGET_LINK_LIBRARIES(${this_target} "-lvconf" ) -TARGET_LINK_LIBRARIES(${this_target} "-lbadge" ) +TARGET_LINK_LIBRARIES(${this_target} ${corepkgs_LDFLAGS}) SET_TARGET_PROPERTIES(${this_target} PROPERTIES