Merge lp:~renatofilho/ubuntu-docviewer-app/ubunut-app-platform into lp:ubuntu-docviewer-app

Proposed by Renato Araujo Oliveira Filho on 2016-12-09
Status: Merged
Approved by: Pat McGowan on 2016-12-09
Approved revision: 358
Merged at revision: 356
Proposed branch: lp:~renatofilho/ubuntu-docviewer-app/ubunut-app-platform
Merge into: lp:ubuntu-docviewer-app
Diff against target: 117 lines (+82/-1)
3 files modified
cmake/modules/Click.cmake (+7/-0)
snapcraft.yaml (+70/-0)
src/app/config.h.in (+5/-1)
To merge this branch: bzr merge lp:~renatofilho/ubuntu-docviewer-app/ubunut-app-platform
Reviewer Review Type Date Requested Status
Jenkins Bot continuous-integration Approve on 2016-12-09
Pat McGowan 2016-12-09 Approve on 2016-12-09
Review via email: mp+312913@code.launchpad.net

Commit Message

Create snapcract package.

To post a comment you must log in.
357. By Renato Araujo Oliveira Filho on 2016-12-09

Filter files packed into the snap.

358. By Renato Araujo Oliveira Filho on 2016-12-09

Avoid build problems if qmake fail to report the correct QML_DIR.

Pat McGowan (pat-mcgowan) :
review: Approve
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cmake/modules/Click.cmake'
2--- cmake/modules/Click.cmake 2016-03-10 22:37:32 +0000
3+++ cmake/modules/Click.cmake 2016-12-09 15:31:32 +0000
4@@ -69,5 +69,12 @@
5 OUTPUT_STRIP_TRAILING_WHITESPACE
6 )
7
8+ if (QT_IMPORTS_DIR STREQUAL "")
9+ set(QT_IMPORTS_DIR "${CMAKE_INSTALL_FULL_LIBDIR}/qt5/qml")
10+ message(STATUS "QT_IMPORTS_DIR is empty using default one: ${QT_IMPORTS_DIR}")
11+ else()
12+ message(STATUS "QT_IMPORTS_DIR set to ${QT_IMPORTS_DIR}")
13+ endif()
14+
15 set(DATA_DIR ${CMAKE_INSTALL_DATADIR}/${APP_NAME})
16 endif(CLICK_MODE)
17
18=== added directory 'snap'
19=== added directory 'snap/ubuntu-app-platform'
20=== added file 'snapcraft.yaml'
21--- snapcraft.yaml 1970-01-01 00:00:00 +0000
22+++ snapcraft.yaml 2016-12-09 15:31:32 +0000
23@@ -0,0 +1,70 @@
24+name: ubuntu-docviewer-app
25+version: 2.1.350
26+summary: Document Viewer
27+description: Document Viewer application for Ubuntu devices
28+confinement: strict
29+grade: devel
30+
31+apps:
32+ ubuntu-docviewer-app:
33+ command: desktop-launch $SNAP/usr/bin/ubuntu-docviewer-app ---documentsDir=$(HOME=/home/$USER xdg-user-dir DOCUMENTS) -desktop_file_hint=unity8 "$@"
34+ plugs:
35+ - home
36+ - opengl
37+ - platform
38+ - unity7
39+ - unity8
40+
41+plugs:
42+ platform:
43+ interface: content
44+ content: ubuntu-app-platform1
45+ target: ubuntu-app-platform
46+ default-provider: ubuntu-app-platform
47+
48+parts:
49+ ubuntu-docviewer-app:
50+ plugin: cmake
51+ configflags: [-DCMAKE_INSTALL_PREFIX=/usr, -DCLICK_MODE=off]
52+ source: .
53+ build-packages:
54+ - cmake
55+ - intltool
56+ - libpoppler-qt5-dev
57+ - qtbase5-private-dev
58+ - qtdeclarative5-private-dev
59+ - qtdeclarative5-qtquick2-plugin
60+ stage-packages:
61+ - qtdeclarative5-poppler1.0
62+ - xdg-user-dirs
63+ snap:
64+ # ubuntu-docviewer-app
65+ - usr/bin/ubuntu-docviewer-app
66+ - usr/share/applications
67+ - usr/share/locale
68+ - usr/share/ubuntu-docviewer-app
69+
70+ # qtdeclarative5-documentviewer-common
71+ # qtdeclarative5-documentviewer-libreoffice
72+ # qtdeclarative5-documentviewer-pdf
73+ - usr/lib/*/qt5/qml/DocumentViewer
74+
75+ # qtdeclarative5-poppler1.0
76+ - usr/lib/*/qt5/qml/org/docviewer
77+ - usr/share/doc/qtdeclarative5-poppler1.0/copyright
78+
79+ # xdg-user-dirs
80+ - usr/share/locale/*/LC_MESSAGES/xdg-user-dirs.mo
81+ - usr/bin/xdg-user-dir
82+ - usr/bin/xdg-user-dirs-update
83+ - etc/xdg/user-dirs.conf
84+ - etc/xdg/user-dirs.defaults
85+ - etc/X11/Xsession.d/60xdg-user-dirs-update
86+ - usr/share/doc/xdg-user-dirs/copyright
87+ - usr/share/doc/xdg-user-dirs/AUTHORS
88+
89+ platform:
90+ plugin: dump
91+ source: snap
92+ after: [desktop-ubuntu-app-platform]
93+ snap: [ubuntu-app-platform]
94
95=== modified file 'src/app/config.h.in'
96--- src/app/config.h.in 2015-10-20 11:58:48 +0000
97+++ src/app/config.h.in 2016-12-09 15:31:32 +0000
98@@ -21,6 +21,8 @@
99 #include <QtCore/QDir>
100 #include <QtCore/QString>
101
102+static QString SNAP_ENV = qgetenv("SNAP");
103+
104 inline bool isClick() {
105 static bool click = (QCoreApplication::applicationDirPath().contains("click.ubuntu.com"));
106 return click;
107@@ -34,7 +36,9 @@
108
109 inline QString docviewerDirectory()
110 {
111- if (isClick()) {
112+ if (!SNAP_ENV.isEmpty()) {
113+ return SNAP_ENV + QString("@CMAKE_INSTALL_PREFIX@/@DATA_DIR@");
114+ } else if (isClick()) {
115 return QString(".");
116 } else if (isRunningInstalled()) {
117 return QString("@CMAKE_INSTALL_PREFIX@/@DATA_DIR@");

Subscribers

People subscribed via source and target branches