>From fafe15e5f4ff5b31f704fd99fe3557f7eec9d662 Mon Sep 17 00:00:00 2001 Message-Id: From: Akira Nakagawa Date: Mon, 25 May 2015 07:48:09 +0900 Subject: [PATCH] add UOA features part1 add UOA manifest files and installation settings. --- CMakeLists.txt | 1 + Makefile.in | 2 +- cmake/FindIntltool.cmake | 14 +++++++++++ cmake/FindXMLValidate.cmake | 38 +++++++++++++++++++++++++++++ debian/control | 12 ++++++++- manifest/CMakeLists.txt | 26 ++++++++++++++++++++ manifest/geary-google-gmail.service.in | 23 +++++++++++++++++ manifest/geary-windows-live-mail.service.in | 7 ++++++ manifest/geary-yahoo-mail.service.in | 15 ++++++++++++ manifest/geary.application.in | 17 +++++++++++++ po/POTFILES.in | 4 +++ src/CMakeLists.txt | 7 +++++- 12 files changed, 163 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ecaf01d..af62d8e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -141,6 +141,7 @@ add_custom_target( add_subdirectory(desktop) add_subdirectory(help) add_subdirectory(icons) +add_subdirectory(manifest) add_subdirectory(po) add_subdirectory(sql) add_subdirectory(src) diff --git a/Makefile.in b/Makefile.in index a966404..593ae09 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,6 +1,6 @@ # Makefile.in # -# Copyright 2012-2013 Yorba Foundation +# Copyright 2012-2015 Yorba Foundation BUILD_DIR := build BINARIES := geary geary-console geary-mailer diff --git a/cmake/FindIntltool.cmake b/cmake/FindIntltool.cmake index 644b9e3..6ce3f41 100644 --- a/cmake/FindIntltool.cmake +++ b/cmake/FindIntltool.cmake @@ -33,5 +33,19 @@ if (INTLTOOL_MERGE_FOUND) ) install (FILES ${CMAKE_CURRENT_BINARY_DIR}/geary-attach.contract DESTINATION ${CMAKE_INSTALL_PREFIX}/share/contractor) endmacro (INTLTOOL_MERGE_CONTRACT desktop_id po_dir) + macro (INTLTOOL_MERGE_MANIFEST app_id po_dir) + add_custom_target (geary.application ALL + ${INTLTOOL_MERGE_EXECUTABLE} --xml-style --utf8 --no-translations + ${CMAKE_CURRENT_SOURCE_DIR}/${app_id}.application.in ${app_id}.application + ) + install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${app_id}.application DESTINATION ${CMAKE_INSTALL_PREFIX}/share/accounts/applications) + endmacro (INTLTOOL_MERGE_MANIFEST app_id po_dir) + macro (INTLTOOL_MERGE_SERVICE srv_id po_dir) + add_custom_target (${srv_id}.service ALL + ${INTLTOOL_MERGE_EXECUTABLE} --xml-style --utf8 --no-translations + ${CMAKE_CURRENT_SOURCE_DIR}/${srv_id}.service.in ${srv_id}.service + ) + install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${srv_id}.service DESTINATION ${CMAKE_INSTALL_PREFIX}/share/accounts/services) + endmacro (INTLTOOL_MERGE_SERVICE srv_id po_dir) endif (INTLTOOL_MERGE_FOUND) diff --git a/cmake/FindXMLValidate.cmake b/cmake/FindXMLValidate.cmake new file mode 100644 index 0000000..10cf7de --- /dev/null +++ b/cmake/FindXMLValidate.cmake @@ -0,0 +1,38 @@ +# FindXMLValidate.cmake +# +# Akira Nakagawa +# Copyright 2013-2015 Yorba Foundation +find_program (XMLLINT_EXECUTABLE xmllint) + +if (XMLLINT_EXECUTABLE) + set (XMLLINT_FOUND TRUE) +else (XMLLINT_EXECUTABLE) + set (XMLLINT_FOUND FALSE) +endif (XMLLINT_EXECUTABLE) + +if (XMLLINT_FOUND) + macro (VALIDATE_APPLICATION_MANIFEST_XML app_id) + add_custom_command (TARGET ${app_id}.application POST_BUILD + execute_process ( + COMMAND ${XMLLINT_EXECUTABLE} --noout --dtdvalid ${datadir}/xml/accounts/schema/dtd/accounts-application.dtd ${app_id}.application RESULT_VARIABLE CMDRESULT + ) + ) + if (${CMDRESULT}) + set(MANIFEST_VALIDATE FALSE) + else (${CMDRESULT}) + set(MANIFEST_VALIDATE TRUE) + endif (${CMDRESULT}) + endmacro (VALIDATE_APPLICATION_MANIFEST_XML app_id) + macro (VALIDATE_SERVICE_MANIFEST_XML srv_id) + add_custom_command (TARGET ${srv_id}.service POST_BUILD + execute_process ( + COMMAND ${XMLLINT_EXECUTABLE} --noout --dtdvalid ${datadir}/xml/accounts/schema/dtd/accounts-service.dtd ${srv_id}.service RESULT_VARIABLE CMDRESULT + ) + ) + if (${CMDRESULT}) + set(MANIFEST_VALIDATE FALSE) + else (${CMDRESULT}) + set(MANFEST_VALIDATE TRUE) + endif (${CMDRESULT}) + endmacro (VALIDATE_SERVICE_MANIFEST_XML srv_id) +endif (XMLLINT_FOUND) diff --git a/debian/control b/debian/control index 9558378..ca2a575 100644 --- a/debian/control +++ b/debian/control @@ -3,6 +3,7 @@ Section: gnome Priority: optional Maintainer: Jim Nelson Build-Depends: debhelper (>= 8), + libaccounts-glib-dev (>=1.15), libgee-0.8-dev, libglib2.0-dev (>= 2.34.0), libgtk-3-dev (>= 3.10.0), @@ -14,6 +15,7 @@ Build-Depends: debhelper (>= 8), libgmime-2.6-dev (>= 2.6.14), valac, cmake (>= 2.8.0), + libsignon-glib-dev (>=1.8), libsqlite3-dev (>= 3.7.4), libmessaging-menu-dev (>= 12.10.2), libunity-dev (>= 5.12.0), @@ -28,6 +30,11 @@ Homepage: http://www.yorba.org Package: geary Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, + account-plugin-yahoo (>=3.8.6), + account-plugin-windows-live (>=0.11), + libaccount-plugin-1.0-0, + libaccount-plugin-google (>=0.11), + libaccounts-glib0 (>=1.15), libgee-0.8-2, libglib2.0-0 (>= 2.34.0), libgtk-3-0 (>= 3.10.0), @@ -35,12 +42,15 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, libcanberra0 (>= 0.28), libwebkitgtk-3.0-0 (>= 1.10.0), libxml2 (>= 2.7.8), + libxml2-utils (>=2.7.8), libsqlite3-0 (>= 3.7.4), libgmime-2.6-0 (>= 2.6.14), libsecret-1-0 (>= 0.11), + libsignon-glib1 (>=1.8), libmessaging-menu0 (>= 12.10.2), libunity9 (>= 5.12.0), - libgcr-3-1 (>= 3.10.1) + libgcr-3-1 (>= 3.10.1), + signond Description: Email client Geary is an email client built for the GNOME desktop environment. It allows you to read and send email with a simple, modern interface. diff --git a/manifest/CMakeLists.txt b/manifest/CMakeLists.txt new file mode 100644 index 0000000..0783c06 --- /dev/null +++ b/manifest/CMakeLists.txt @@ -0,0 +1,26 @@ +### +# Build and install geary.application +### + +include (FindIntltool) +include (FindXMLValidate) + +if (INTLTOOL_MERGE_FOUND) + INTLTOOL_MERGE_MANIFEST (geary po) + INTLTOOL_MERGE_SERVICE (geary-google-gmail po) + INTLTOOL_MERGE_SERVICE (geary-windows-live-mail po) + INTLTOOL_MERGE_SERVICE (geary-yahoo-mail po) + if (XMLLINT_FOUND) + VALIDATE_APPLICATION_MANIFEST_XML (geary) + VALIDATE_SERVICE_MANIFEST_XML (geary-google-gmail) + VALIDATE_SERVICE_MANIFEST_XML (geary-windows-live-mail) + VALIDATE_SERVICE_MANIFEST_XML (geary-yahoo-mail) + if (NOT MANIFEST_VALIDATE) + message (FATAL_ERROR "Invalidate XML file") + endif (NOT MANIFEST_VALIDATE) + else (XMLLINT_FOUND) + message (FATAL_ERROR "xmllint is not installed.It must be installed to generate .application file") + endif (XMLLINT_FOUND) +else (INTLTOOL_MERGE_FOUND) +message (FATAL_ERROR "intltool must be installed to generate .application file") +endif (INTLTOOL_MERGE_FOUND) diff --git a/manifest/geary-google-gmail.service.in b/manifest/geary-google-gmail.service.in new file mode 100644 index 0000000..12be070 --- /dev/null +++ b/manifest/geary-google-gmail.service.in @@ -0,0 +1,23 @@ + + + mail + <_name>GMail + google + geary + + diff --git a/manifest/geary-windows-live-mail.service.in b/manifest/geary-windows-live-mail.service.in new file mode 100644 index 0000000..699064c --- /dev/null +++ b/manifest/geary-windows-live-mail.service.in @@ -0,0 +1,7 @@ + + + mail + <_name>Outlook.com + windows-live + geary + diff --git a/manifest/geary-yahoo-mail.service.in b/manifest/geary-yahoo-mail.service.in new file mode 100644 index 0000000..8531458 --- /dev/null +++ b/manifest/geary-yahoo-mail.service.in @@ -0,0 +1,15 @@ + + + mail + <_name>Yahoo! Mail + yahoo + geary + + + + diff --git a/manifest/geary.application.in b/manifest/geary.application.in new file mode 100644 index 0000000..a6ccccc --- /dev/null +++ b/manifest/geary.application.in @@ -0,0 +1,17 @@ + + + <_description>Geary Mail Client + geary.desktop + geary + + + <_description>Access your GMail + + + <_description>Access your Windows Live Mail + + + <_description>Access your Yahoo! Mail + + + diff --git a/po/POTFILES.in b/po/POTFILES.in index ef6529f..5f3c818 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -2,6 +2,10 @@ desktop/geary.desktop.in desktop/geary-autostart.desktop.in [type: gettext/ini]desktop/geary-attach.contract.in +[type:gettext/xml]manifest/geary.application.in +[type:gettext/xml]manifest/geary-google-gmail.service.in +[type:gettext/xml]manifest/geary-windows-live-mail.service.in +[type:gettext/xml]manifest/geary-yahoo-mail.service.in src/client/accounts/account-dialog-account-list-pane.vala src/client/accounts/account-dialog-add-edit-pane.vala src/client/accounts/account-dialog-pane.vala diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 78151fc..7b8636a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -285,6 +285,8 @@ engine/state/state-machine-descriptor.vala engine/state/state-machine.vala engine/state/state-mapping.vala +engine/util/util-accounts.vala +engine/util/util-unity-webapp.vala engine/util/util-ascii.vala engine/util/util-collection.vala engine/util/util-converter.vala @@ -536,11 +538,14 @@ endif () set(TARGET_GLIB 2.34) pkg_check_modules(DEPS REQUIRED + account-plugin gthread-2.0 glib-2.0>=${TARGET_GLIB}.0 gio-2.0>=2.28.0 gtk+-3.0>=3.10.0 gee-0.8>=0.8.5 + libaccounts-glib + libsignon-glib libnotify>=0.7.5 libcanberra>=0.28 sqlite3>=3.7.4 @@ -552,7 +557,7 @@ pkg_check_modules(DEPS REQUIRED ) set(ENGINE_PACKAGES - glib-2.0 gee-0.8 gio-2.0 gmime-2.6 posix sqlite3 libxml-2.0 + glib-2.0 gee-0.8 gio-2.0 gmime-2.6 gtk+-3.0 posix sqlite3 AccountPlugin libaccounts-glib libxml-2.0 signon ) # webkitgtk-3.0 is listed as a custom VAPI (below) to ensure it's treated as a dependency and -- 1.9.1