Top level CMakeLists files and directory herachy were massed up.
1. Separate files and move into subdirectories (top -> server, client)
2. Move configuration files into appropriate subdirectories
3. Remove unnecessary files
Change-Id: I6c601e5ba9627128b76edfe2be7827b2ca60dced
Signed-off-by: Wonguk Jeong <wonguk.jeong@samsung.com>
-#
-# Copyright (c) 2008 ~ 2010 Samsung Electronics Co., Ltd.
-# All rights reserved
-#
-
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
+SET(CMAKE_SKIP_BUILD_RPATH true)
PROJECT(package-manager C)
INCLUDE(TizenCommon)
-
-SET(VERSION 0.1.68)
SET(VERSION_MAJOR 0)
+SET(VERSION ${VERSION_MAJOR}.1.68)
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
SET(EXEC_PREFIX "\${prefix}")
SET(LIBDIR ${LIB_INSTALL_DIR})
SET(INCLUDEDIR "\${prefix}/include")
-
-set(CMAKE_SKIP_BUILD_RPATH true)
-
-#Verbose
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/comm )
-
-INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs REQUIRED security-server dlog ecore ail ecore-file pkgmgr-parser pkgmgr-info iniparser libtzplatform-config notification)
-
-FOREACH(flag ${pkgs_CFLAGS})
- SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
-ENDFOREACH(flag)
-
-pkg_check_modules(libpkgs REQUIRED dbus-glib-1 dlog ail pkgmgr-parser pkgmgr-info iniparser libtzplatform-config notification)
-
-FOREACH(flag ${libpkgs_CFLAGS})
- SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
-ENDFOREACH(flag)
-
-SET(pm_dir "${CMAKE_SOURCE_DIR}")
-SET(pm_inc_dir "${pm_dir}/include")
-SET(pm_c_src_dir "${pm_dir}/client/src")
-SET(pm_c_inc_dir "${pm_dir}/client/include")
-SET(pm_s_src_dir "${pm_dir}/server/src")
-SET(pm_s_inc_dir "${pm_dir}/server/include")
-SET(pm_t_inc_dir "${pm_dir}/types/include")
-
-## About debug
-SET(debug_type "-DPM_CONSOLE_USE") # for debug - use console window
-
-## Additional flag
-SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden")
-SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -g -Wall")
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
-
-##################
-## build comm libraries
-add_subdirectory(comm)
-add_subdirectory(tool)
-add_subdirectory(types)
-
-###################################################################################################
-## for libpkgmgr-client.so (library)
SET(PKGMGR_CLIENT "pkgmgr-client")
-SET(libpkgmgr-client_SOURCES ${pm_c_src_dir}/pkgmgr-internal.c ${pm_c_src_dir}/pkgmgr.c ${pm_c_src_dir}/pkgmgr-dbinfo.c)
-SET(libpkgmgr-client_LDFLAGS " -module -avoid-version ")
-SET(libpkgmgr-client_CFLAGS " ${CFLAGS} -fPIC -I${pm_c_inc_dir} -I${pm_inc_dir} -I${pm_t_inc_dir} ${debug_type}")
-
-ADD_LIBRARY(${PKGMGR_CLIENT} SHARED ${libpkgmgr-client_SOURCES})
-SET_TARGET_PROPERTIES(${PKGMGR_CLIENT} PROPERTIES SOVERSION ${VERSION_MAJOR})
-SET_TARGET_PROPERTIES(${PKGMGR_CLIENT} PROPERTIES VERSION ${VERSION})
-SET_TARGET_PROPERTIES(${PKGMGR_CLIENT} PROPERTIES COMPILE_FLAGS "${libpkgmgr-client_CFLAGS}")
-TARGET_LINK_LIBRARIES(${PKGMGR_CLIENT} pkgmgr_installer_client pkgmgr_installer_status_broadcast_server pkgmgr-info ${libpkgs_LDFLAGS})
-###################################################################################################
-###################################################################################################
-## for pkgmgr-server (binary)
-SET(pkgmgr-server_SOURCES ${pm_s_src_dir}/pkgmgr-server.c ${pm_s_src_dir}/pm-queue.c)
-SET(pkgmgr-server_CFLAGS " -I. -I${pm_inc_dir} -I${pm_s_inc_dir} -I${pm_dir}/comm ${debug_type} -D_GNU_SOURCE ")
-SET(pkgmgr-server_LDFLAGS ${pkgs_LDFLAGS})
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -g -Wall")
-ADD_EXECUTABLE(pkgmgr-server ${pkgmgr-server_SOURCES})
-TARGET_LINK_LIBRARIES(pkgmgr-server pkgmgr_installer pkgmgr_installer_pkg_mgr_server)
-TARGET_LINK_LIBRARIES(pkgmgr-server ${pkgs_LDFLAGS})
-SET_TARGET_PROPERTIES(pkgmgr-server PROPERTIES COMPILE_FLAGS "${pkgmgr-server_CFLAGS}")
-####################################################################################################
+INCLUDE_DIRECTORIES(include)
+INCLUDE_DIRECTORIES(comm)
-CONFIGURE_FILE(pkgmgr.pc.in pkgmgr.pc @ONLY)
-configure_file(org.tizen.slp.pkgmgr.service.in org.tizen.slp.pkgmgr.service @ONLY)
-configure_file(org.tizen.slp.pkgmgr.conf.in org.tizen.slp.pkgmgr.conf @ONLY)
-configure_file(pkg_path.conf.in pkg_path.conf @ONLY)
-configure_file(pkgmgr.patch.sh.in pkgmgr.patch.sh @ONLY)
-
-#INSTALL(FILES ${CMAKE_BINARY_DIR}/libpkgmgr-client.so DESTINATION ${LIB_INSTALL_DIR})
-INSTALL(TARGETS ${PKGMGR_CLIENT} DESTINATION ${LIB_INSTALL_DIR} COMPONENT RuntimeLibraries)
-INSTALL(FILES ${CMAKE_BINARY_DIR}/pkgmgr-server DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE)
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/pkgmgr.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/client/include/package-manager.h DESTINATION include)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/client/include/pkgmgr-dbinfo.h DESTINATION include)
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.tizen.slp.pkgmgr.service DESTINATION ${PREFIX}/share/dbus-1/system-services/)
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.tizen.slp.pkgmgr.conf DESTINATION ${SYSCONFDIR}/dbus-1/system.d/)
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/pkg_path.conf DESTINATION ${SYSCONFDIR}/package-manager/)
-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/queue_status DESTINATION ${SYSCONFDIR}/package-manager/server/)
-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pkgmgr.patch.sh DESTINATION ${SYSCONFDIR}/opt/upgrade/)
+INCLUDE(FindPkgConfig)
-####################################################################################################
-add_subdirectory(installers)
-# i18n
-add_subdirectory(po)
+ADD_SUBDIRECTORY(comm)
+ADD_SUBDIRECTORY(server)
+ADD_SUBDIRECTORY(client)
+ADD_SUBDIRECTORY(tool)
+ADD_SUBDIRECTORY(types)
--- /dev/null
+# package manager client library
+
+SET(SRCS src/pkgmgr-internal.c src/pkgmgr.c src/pkgmgr-dbinfo.c)
+
+pkg_check_modules(CLIENT_DEPS REQUIRED
+ dbus-glib-1
+ dlog
+ ail
+ pkgmgr-parser
+ pkgmgr-info
+ iniparser
+ libtzplatform-config
+ security-server)
+FOREACH(CLIENT_FLAGS ${CLIENT_DEPS_CFLAGS})
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CLIENT_FLAGS}")
+ENDFOREACH(CLIENT_FLAGS)
+
+INCLUDE_DIRECTORIES(include)
+
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
+
+ADD_LIBRARY(${PKGMGR_CLIENT} SHARED ${SRCS})
+SET_TARGET_PROPERTIES(${PKGMGR_CLIENT} PROPERTIES SOVERSION ${VERSION_MAJOR})
+SET_TARGET_PROPERTIES(${PKGMGR_CLIENT} PROPERTIES VERSION ${VERSION})
+TARGET_LINK_LIBRARIES(${PKGMGR_CLIENT}
+ pkgmgr_installer_client
+ pkgmgr_installer_status_broadcast_server pkgmgr-info
+ ${CLIENT_DEPS_LDFLAGS})
+
+CONFIGURE_FILE(pkgmgr.pc.in pkgmgr.pc @ONLY)
+CONFIGURE_FILE(pkg_path.conf.in pkg_path.conf @ONLY)
+
+INSTALL(TARGETS ${PKGMGR_CLIENT} DESTINATION ${LIB_INSTALL_DIR} COMPONENT RuntimeLibraries)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/package-manager.h DESTINATION include)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/pkgmgr-dbinfo.h DESTINATION include)
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/pkgmgr.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/pkg_path.conf DESTINATION ${SYSCONFDIR}/package-manager/)
--- /dev/null
+# usage
+# backend:directory_path
+# backendlib:directory_path
+
+backend:/etc/package-manager/backend/
+backendlib:/etc/package-manager/backendlib/
--- /dev/null
+#
+# Copyright (c) 2008 ~ 2010 Samsung Electronics Co., Ltd.
+# All rights reserved.
+#
+
+prefix=@PREFIX@
+exec_prefix=@EXEC_PREFIX@
+libdir=@LIBDIR@
+includedir=@INCLUDEDIR@
+
+Name: package manager
+Description: SLP Package Manager Package
+Version: @VERSION@
+Requires: security-server dlog pkgmgr-types pkgmgr-installer-client pkgmgr-installer-status-broadcast-server
+Libs: -L${libdir} -L${libdir}/pkgmgr -lpkgmgr-client
+Cflags: -I${includedir}
### Get required CFLAGS, LDFLAGS from pkg-config
include(FindPkgConfig)
-pkg_check_modules(comm_pkgs REQUIRED dbus-1 glib-2.0 dbus-glib-1 gio-2.0 gio-unix-2.0 dlog pkgmgr-info)
+pkg_check_modules(comm_pkgs REQUIRED dbus-1 glib-2.0 dbus-glib-1 gio-2.0 gio-unix-2.0 dlog pkgmgr-info db-util)
foreach(flag ${comm_pkgs_CFLAGS})
set(comm_pkgs_CFLAGS_str "${comm_pkgs_CFLAGS_str} ${flag}")
+++ /dev/null
-<?xml version="1.0"?>
-<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
- "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
-
-<busconfig>
- <policy context="default">
- <allow own="org.tizen.slp.pkgmgr"/>
- <allow own="org.tizen.slp.pkgmgr_status"/>
- <allow receive_sender="org.tizen.slp.pkgmgr"/>
- <allow send_destination="org.tizen.slp.pkgmgr"/>
- </policy>
-</busconfig>
+++ /dev/null
-[D-BUS Service]
-User=root
-Name=org.tizen.slp.pkgmgr
-Exec=@PREFIX@/bin/pkgmgr-server
BuildRequires: pkgconfig(iniparser)
BuildRequires: pkgconfig(notification)
BuildRequires: pkgconfig(libtzplatform-config)
+BuildRequires: pkgconfig(db-util)
BuildRequires: pkgmgr-info-parser-devel
BuildRequires: pkgmgr-info-parser
BuildRequires: libsmack
+++ /dev/null
-# usage
-# backend:directory_path
-# backendlib:directory_path
-
-backend:/etc/package-manager/backend/
-backendlib:/etc/package-manager/backendlib/
+++ /dev/null
-echo "--------------------------------------"
-echo "Update package database..............."
-echo "--------------------------------------"
-
-source /etc/tizen-platform.conf
-
-/bin/rm $TZ_SYS_DB/.pkgmgr_parser.db
-$TZ_SYS_BIN/pkg_initdb
+++ /dev/null
-#
-# Copyright (c) 2008 ~ 2010 Samsung Electronics Co., Ltd.
-# All rights reserved.
-#
-
-prefix=@PREFIX@
-exec_prefix=@EXEC_PREFIX@
-libdir=@LIBDIR@
-includedir=@INCLUDEDIR@
-
-Name: package manager
-Description: SLP Package Manager Package
-Version: @VERSION@
-Requires: security-server dlog pkgmgr-types pkgmgr-installer-client pkgmgr-installer-status-broadcast-server
-Libs: -L${libdir} -L${libdir}/pkgmgr -lpkgmgr-client
-Cflags: -I${includedir}
+++ /dev/null
-# for i18n
-
-SET(POFILES en_US.po en_GB.po ja_JP.po ko_KR.po zh_CN.po)
-
-SET(MSGFMT "/usr/bin/msgfmt")
-
-FOREACH(pofile ${POFILES})
- SET(pofile ${CMAKE_CURRENT_SOURCE_DIR}/${pofile})
- MESSAGE("PO: ${pofile}")
- GET_FILENAME_COMPONENT(absPofile ${pofile} ABSOLUTE)
- GET_FILENAME_COMPONENT(lang ${absPofile} NAME_WE)
- SET(moFile ${CMAKE_CURRENT_BINARY_DIR}/${lang}.mo)
- ADD_CUSTOM_COMMAND(
- OUTPUT ${moFile}
- COMMAND ${MSGFMT} -o ${moFile} ${absPofile}
- DEPENDS ${absPofile}
- )
- INSTALL(FILES ${moFile}
- DESTINATION share/locale/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo)
- SET(moFiles ${moFiles} ${moFile})
-ENDFOREACH(pofile)
-
-MESSAGE(".mo files: ${moFiles}")
-ADD_CUSTOM_TARGET(po ALL DEPENDS ${moFiles})
+++ /dev/null
-# List of source files containing translatable strings.
-server/src/pkgmgr-server.c
+++ /dev/null
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-10-14 19:06+0900\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: server/src/pkgmgr-server.c:251
-#, c-format
-msgid "Install?"
-msgstr ""
-
-#: server/src/pkgmgr-server.c:287
-#, c-format
-msgid "Uninstall?"
-msgstr ""
-
-#: server/src/pkgmgr-server.c:290
-#, c-format
-msgid "Invalid request"
-msgstr ""
+++ /dev/null
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-10-14 19:06+0900\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: server/src/pkgmgr-server.c:251
-#, c-format
-msgid "Install?"
-msgstr ""
-
-#: server/src/pkgmgr-server.c:287
-#, c-format
-msgid "Uninstall?"
-msgstr ""
-
-#: server/src/pkgmgr-server.c:290
-#, c-format
-msgid "Invalid request"
-msgstr ""
+++ /dev/null
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-10-14 19:06+0900\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: server/src/pkgmgr-server.c:251
-#, c-format
-msgid "Install?"
-msgstr "インストールしますか?"
-
-#: server/src/pkgmgr-server.c:287
-#, c-format
-msgid "Uninstall?"
-msgstr "アンインストールしますか?"
-
-#: server/src/pkgmgr-server.c:290
-#, c-format
-msgid "Invalid request"
-msgstr "無効なリクエストです"
+++ /dev/null
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-10-14 19:06+0900\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: server/src/pkgmgr-server.c:251
-#, c-format
-msgid "Install?"
-msgstr "설치할까요?"
-
-#: server/src/pkgmgr-server.c:287
-#, c-format
-msgid "Uninstall?"
-msgstr "삭제할까요?"
-
-#: server/src/pkgmgr-server.c:290
-#, c-format
-msgid "Invalid request"
-msgstr "요청이 바르지 않습니다"
+++ /dev/null
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-10-14 19:06+0900\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=CHARSET\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: server/src/pkgmgr-server.c:251
-#, c-format
-msgid "Install?"
-msgstr ""
-
-#: server/src/pkgmgr-server.c:287
-#, c-format
-msgid "Uninstall?"
-msgstr ""
-
-#: server/src/pkgmgr-server.c:290
-#, c-format
-msgid "Invalid request"
-msgstr ""
+++ /dev/null
-#!/bin/sh
-
-PACKAGE=package-manager
-SRCROOT=..
-POTFILES=POTFILES.in
-
-#ALL_LINGUAS= am az be ca cs da de el en_CA en_GB es et fi fr hr hu it ja ko lv mk ml ms nb ne nl pa pl pt pt_BR ru rw sk sl sr sr@Latn sv ta tr uk vi zh_CN zh_TW
-ALL_LINGUAS="en_US en_GB ja_JP ko_KR zh_CN"
-
-XGETTEXT=/usr/bin/xgettext
-MSGMERGE=/usr/bin/msgmerge
-
-echo -n "Make ${PACKAGE}.pot "
-if [ ! -e $POTFILES ] ; then
- echo "$POTFILES not found"
- exit 1
-fi
-
-$XGETTEXT --default-domain=${PACKAGE} --directory=${SRCROOT} \
- --add-comments --keyword=_ --keyword=N_ --files-from=$POTFILES
-if [ $? -ne 0 ]; then
- echo "xgettext error"
- exit 1
-fi
-
-if [ ! -f ${PACKAGE}.po ]; then
- echo "No such file: ${PACKAGE}.po"
- exit 1
-fi
-
-rm -f ${PACKAGE}.pot && mv ${PACKAGE}.po ${PACKAGE}.pot
-echo "done"
-
-for LANG in $ALL_LINGUAS; do
- echo "$LANG : "
-
- if [ ! -e $LANG.po ] ; then
- sed 's/CHARSET/UTF-8/g' ${PACKAGE}.pot > ${LANG}.po
- echo "${LANG}.po created"
- else
- if $MSGMERGE ${LANG}.po ${PACKAGE}.pot -o ${LANG}.new.po ; then
- if cmp ${LANG}.po ${LANG}.new.po > /dev/null 2>&1; then
- rm -f ${LANG}.new.po
- else
- if mv -f ${LANG}.new.po ${LANG}.po; then
- echo ""
- else
- echo "msgmerge for $LANG.po failed: cannot move $LANG.new.po to $LANG.po" 1>&2
- rm -f ${LANG}.new.po
- exit 1
- fi
- fi
- else
- echo "msgmerge for $LANG failed!"
- rm -f ${LANG}.new.po
- fi
- fi
- echo ""
-done
-
+++ /dev/null
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-10-14 19:06+0900\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: server/src/pkgmgr-server.c:251
-#, c-format
-msgid "Install?"
-msgstr ""
-
-#: server/src/pkgmgr-server.c:287
-#, c-format
-msgid "Uninstall?"
-msgstr ""
-
-#: server/src/pkgmgr-server.c:290
-#, c-format
-msgid "Invalid request"
-msgstr ""
+++ /dev/null
-This file is for creating required directory.
--- /dev/null
+# package manager server
+
+SET(PKGMGR_SERVER "pkgmgr-server")
+SET(SRCS src/pkgmgr-server.c src/pm-queue.c)
+
+pkg_check_modules(SERVER_DEPS REQUIRED
+ security-server
+ dlog
+ ail
+ pkgmgr-parser
+ pkgmgr-info
+ libtzplatform-config
+ notification)
+FOREACH(SERVER_FLAGS ${SERVER_DEPS_CFLAGS})
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SERVER_FLAGS}")
+ENDFOREACH(SERVER_FLAGS)
+
+INCLUDE_DIRECTORIES(include)
+
+ADD_EXECUTABLE(${PKGMGR_SERVER} ${SRCS})
+TARGET_LINK_LIBRARIES(${PKGMGR_SERVER} pkgmgr_installer pkgmgr_installer_pkg_mgr_server)
+TARGET_LINK_LIBRARIES(${PKGMGR_SERVER} ${SERVER_DEPS_LDFLAGS})
+
+CONFIGURE_FILE(org.tizen.slp.pkgmgr.service.in org.tizen.slp.pkgmgr.service @ONLY)
+CONFIGURE_FILE(org.tizen.slp.pkgmgr.conf.in org.tizen.slp.pkgmgr.conf @ONLY)
+
+INSTALL(TARGETS ${PKGMGR_SERVER} DESTINATION bin)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/queue_status DESTINATION ${SYSCONFDIR}/package-manager/server/)
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.tizen.slp.pkgmgr.service DESTINATION ${PREFIX}/share/dbus-1/system-services/)
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.tizen.slp.pkgmgr.conf DESTINATION ${SYSCONFDIR}/dbus-1/system.d/)
+
+ADD_SUBDIRECTORY(po)
--- /dev/null
+<?xml version="1.0"?>
+<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+
+<busconfig>
+ <policy context="default">
+ <allow own="org.tizen.slp.pkgmgr"/>
+ <allow own="org.tizen.slp.pkgmgr_status"/>
+ <allow receive_sender="org.tizen.slp.pkgmgr"/>
+ <allow send_destination="org.tizen.slp.pkgmgr"/>
+ </policy>
+</busconfig>
--- /dev/null
+[D-BUS Service]
+User=root
+Name=org.tizen.slp.pkgmgr
+Exec=@PREFIX@/bin/pkgmgr-server
--- /dev/null
+# for i18n
+
+SET(POFILES en_US.po en_GB.po ja_JP.po ko_KR.po zh_CN.po)
+
+SET(MSGFMT "/usr/bin/msgfmt")
+
+FOREACH(pofile ${POFILES})
+ SET(pofile ${CMAKE_CURRENT_SOURCE_DIR}/${pofile})
+ MESSAGE("PO: ${pofile}")
+ GET_FILENAME_COMPONENT(absPofile ${pofile} ABSOLUTE)
+ GET_FILENAME_COMPONENT(lang ${absPofile} NAME_WE)
+ SET(moFile ${CMAKE_CURRENT_BINARY_DIR}/${lang}.mo)
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${moFile}
+ COMMAND ${MSGFMT} -o ${moFile} ${absPofile}
+ DEPENDS ${absPofile}
+ )
+ INSTALL(FILES ${moFile}
+ DESTINATION share/locale/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo)
+ SET(moFiles ${moFiles} ${moFile})
+ENDFOREACH(pofile)
+
+MESSAGE(".mo files: ${moFiles}")
+ADD_CUSTOM_TARGET(po ALL DEPENDS ${moFiles})
--- /dev/null
+# List of source files containing translatable strings.
+src/pkgmgr-server.c
--- /dev/null
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-10-14 19:06+0900\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: server/src/pkgmgr-server.c:251
+#, c-format
+msgid "Install?"
+msgstr ""
+
+#: server/src/pkgmgr-server.c:287
+#, c-format
+msgid "Uninstall?"
+msgstr ""
+
+#: server/src/pkgmgr-server.c:290
+#, c-format
+msgid "Invalid request"
+msgstr ""
--- /dev/null
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-10-14 19:06+0900\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: server/src/pkgmgr-server.c:251
+#, c-format
+msgid "Install?"
+msgstr ""
+
+#: server/src/pkgmgr-server.c:287
+#, c-format
+msgid "Uninstall?"
+msgstr ""
+
+#: server/src/pkgmgr-server.c:290
+#, c-format
+msgid "Invalid request"
+msgstr ""
--- /dev/null
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-10-14 19:06+0900\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: server/src/pkgmgr-server.c:251
+#, c-format
+msgid "Install?"
+msgstr "インストールしますか?"
+
+#: server/src/pkgmgr-server.c:287
+#, c-format
+msgid "Uninstall?"
+msgstr "アンインストールしますか?"
+
+#: server/src/pkgmgr-server.c:290
+#, c-format
+msgid "Invalid request"
+msgstr "無効なリクエストです"
--- /dev/null
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-10-14 19:06+0900\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: server/src/pkgmgr-server.c:251
+#, c-format
+msgid "Install?"
+msgstr "설치할까요?"
+
+#: server/src/pkgmgr-server.c:287
+#, c-format
+msgid "Uninstall?"
+msgstr "삭제할까요?"
+
+#: server/src/pkgmgr-server.c:290
+#, c-format
+msgid "Invalid request"
+msgstr "요청이 바르지 않습니다"
--- /dev/null
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-10-14 19:06+0900\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: server/src/pkgmgr-server.c:251
+#, c-format
+msgid "Install?"
+msgstr ""
+
+#: server/src/pkgmgr-server.c:287
+#, c-format
+msgid "Uninstall?"
+msgstr ""
+
+#: server/src/pkgmgr-server.c:290
+#, c-format
+msgid "Invalid request"
+msgstr ""
--- /dev/null
+#!/bin/sh
+
+PACKAGE=package-manager
+SRCROOT=..
+POTFILES=POTFILES.in
+
+#ALL_LINGUAS= am az be ca cs da de el en_CA en_GB es et fi fr hr hu it ja ko lv mk ml ms nb ne nl pa pl pt pt_BR ru rw sk sl sr sr@Latn sv ta tr uk vi zh_CN zh_TW
+ALL_LINGUAS="en_US en_GB ja_JP ko_KR zh_CN"
+
+XGETTEXT=/usr/bin/xgettext
+MSGMERGE=/usr/bin/msgmerge
+
+echo -n "Make ${PACKAGE}.pot "
+if [ ! -e $POTFILES ] ; then
+ echo "$POTFILES not found"
+ exit 1
+fi
+
+$XGETTEXT --default-domain=${PACKAGE} --directory=${SRCROOT} \
+ --add-comments --keyword=_ --keyword=N_ --files-from=$POTFILES
+if [ $? -ne 0 ]; then
+ echo "xgettext error"
+ exit 1
+fi
+
+if [ ! -f ${PACKAGE}.po ]; then
+ echo "No such file: ${PACKAGE}.po"
+ exit 1
+fi
+
+rm -f ${PACKAGE}.pot && mv ${PACKAGE}.po ${PACKAGE}.pot
+echo "done"
+
+for LANG in $ALL_LINGUAS; do
+ echo "$LANG : "
+
+ if [ ! -e $LANG.po ] ; then
+ sed 's/CHARSET/UTF-8/g' ${PACKAGE}.pot > ${LANG}.po
+ echo "${LANG}.po created"
+ else
+ if $MSGMERGE ${LANG}.po ${PACKAGE}.pot -o ${LANG}.new.po ; then
+ if cmp ${LANG}.po ${LANG}.new.po > /dev/null 2>&1; then
+ rm -f ${LANG}.new.po
+ else
+ if mv -f ${LANG}.new.po ${LANG}.po; then
+ echo ""
+ else
+ echo "msgmerge for $LANG.po failed: cannot move $LANG.new.po to $LANG.po" 1>&2
+ rm -f ${LANG}.new.po
+ exit 1
+ fi
+ fi
+ else
+ echo "msgmerge for $LANG failed!"
+ rm -f ${LANG}.new.po
+ fi
+ fi
+ echo ""
+done
+
--- /dev/null
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-10-14 19:06+0900\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: server/src/pkgmgr-server.c:251
+#, c-format
+msgid "Install?"
+msgstr ""
+
+#: server/src/pkgmgr-server.c:287
+#, c-format
+msgid "Uninstall?"
+msgstr ""
+
+#: server/src/pkgmgr-server.c:290
+#, c-format
+msgid "Invalid request"
+msgstr ""
--- /dev/null
+This file is for creating required directory.
#include <fcntl.h>
#include <glib.h>
#include <signal.h>
-#include <Ecore.h>
-#include <Ecore_File.h>
#include <ail.h>
#include <pkgmgr-info.h>
#include <pkgmgr/pkgmgr_parser.h>
+++ /dev/null
-
-#export CFLAGS=""
-#export LDFLAGS=""
-
-cd `dirname $0`
-
-PREFIX=/usr
-
-rm -rf cmake_tmp
-mkdir -p cmake_tmp
-cd cmake_tmp
-
-CFLAGS="${CFLAGS} -g" LDFLAGS="${LDFLAGS}" cmake .. -DCMAKE_INSTALL_PREFIX=${PREFIX} -DCMAKE_BUILD_TYPE=Debug &&
-make &&
-mkdir -p destdir &&
-make install DESTDIR=destdir
-
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/mime.wac.xml DESTINATION /usr/share/mime/packages/)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/mime.tpk.xml DESTINATION /usr/share/mime/packages/)
+configure_file(pkgmgr.patch.sh.in pkgmgr.patch.sh @ONLY)
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pkgmgr.patch.sh DESTINATION ${SYSCONFDIR}/opt/upgrade/)
--- /dev/null
+echo "--------------------------------------"
+echo "Update package database..............."
+echo "--------------------------------------"
+
+source /etc/tizen-platform.conf
+
+/bin/rm $TZ_SYS_DB/.pkgmgr_parser.db
+$TZ_SYS_BIN/pkg_initdb
-
CONFIGURE_FILE(pkgmgr-types.pc.in ${CMAKE_CURRENT_BINARY_DIR}/pkgmgr-types.pc @ONLY)
-INSTALL(FILES
- ${CMAKE_CURRENT_SOURCE_DIR}/include/package-manager-types.h
- ${CMAKE_CURRENT_SOURCE_DIR}/include/package-manager-plugin.h
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/package-manager-types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/include/package-manager-plugin.h
DESTINATION include)
-
- INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/pkgmgr-types.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
+
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/pkgmgr-types.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)