Merge lp:~zeller-benjamin/ubuntu-sdk-ide/maliit-plugin into lp:ubuntu-sdk-ide

Proposed by Benjamin Zeller
Status: Merged
Approved by: Zoltan Balogh
Approved revision: 116
Merged at revision: 118
Proposed branch: lp:~zeller-benjamin/ubuntu-sdk-ide/maliit-plugin
Merge into: lp:ubuntu-sdk-ide
Diff against target: 133 lines (+99/-1)
3 files modified
CMakeLists.txt (+14/-1)
debian/control (+6/-0)
get_package_source.py (+79/-0)
To merge this branch: bzr merge lp:~zeller-benjamin/ubuntu-sdk-ide/maliit-plugin
Reviewer Review Type Date Requested Status
ubuntu-sdk-build-bot continuous-integration Approve
Zoltan Balogh Approve
Review via email: mp+286265@code.launchpad.net

Commit message

Build maliit plugin for the touch SDK IDE

Description of the change

Build maliit plugin for the touch SDK IDE

To post a comment you must log in.
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Zoltan Balogh (bzoltan) wrote :

Fantastic!!!

review: Approve
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2016-01-26 10:45:13 +0000
3+++ CMakeLists.txt 2016-02-17 08:30:43 +0000
4@@ -65,6 +65,19 @@
5 INSTALL_COMMAND sh -c "LD_LIBRARY_PATH=${QT_INSTALL_DIR}/lib make install"
6 )
7
8+SET (MALIITPLUGIN_PREFIX "${CMAKE_BINARY_DIR}/maliit-plugin-qt-build")
9+ExternalProject_Add(maliit-plugin
10+ DEPENDS ${QT_VERSION}
11+ PREFIX "${MALIITPLUGIN_PREFIX}"
12+ SOURCE_DIR "${MALIITPLUGIN_PREFIX}/maliit-framework"
13+ BINARY_DIR "${MALIITPLUGIN_PREFIX}/maliit-framework"
14+ INSTALL_DIR "${QT_INSTALL_DIR}"
15+ DOWNLOAD_COMMAND sh -c "cd ${MALIITPLUGIN_PREFIX} && ${CMAKE_SOURCE_DIR}/get_package_source.py maliit-framework"
16+ CONFIGURE_COMMAND sh -c "LD_LIBRARY_PATH=${QT_INSTALL_DIR}/lib ${QT_INSTALL_DIR}/bin/qmake -r CONFIG+=\"qt5-inputcontext glib debug nodoc warn_off\" M_IM_PREFIX=${QT_INSTALL_DIR} MALIIT_SERVER_ARGUMENTS=\"-software -bypass-wm-hint\" MALIIT_DEFAULT_PLUGIN=libmaliit-keyboard-plugin.so"
17+ BUILD_COMMAND sh -c "LD_LIBRARY_PATH=${QT_INSTALL_DIR}/lib make ${GENERATED_MAKE_FLAGS}"
18+ INSTALL_COMMAND sh -c "cd ${MALIITPLUGIN_PREFIX}/maliit-framework/input-context && make install"
19+)
20+
21 SET (FCITX_PREFIX "${CMAKE_BINARY_DIR}/fcitx-qt-build")
22 ConcatStrings (FCITX_BUILD_SCRIPT
23 "${CMAKE_COMMAND} "
24@@ -112,7 +125,7 @@
25 )
26
27 ExternalProject_Add(qtcreator_3.5.0
28- DEPENDS appmenu-qt5
29+ DEPENDS appmenu-qt5 fcitx-qt5 maliit-plugin
30 PREFIX "${QTCREATOR_PREFIX}"
31 SOURCE_DIR "${QTCREATOR_PREFIX}/qtcreator"
32 BINARY_DIR "${QTCREATOR_PREFIX}/build"
33
34=== modified file 'debian/control'
35--- debian/control 2016-01-27 15:30:05 +0000
36+++ debian/control 2016-02-17 08:30:43 +0000
37@@ -72,6 +72,12 @@
38 extra-cmake-modules (>= 1.4.0),
39 fcitx-libs-dev (>= 1:4.2.8),
40 intltool,
41+ cdbs,
42+ libmtdev-dev,
43+ libxcb-composite0-dev,
44+ libxcb-damage0-dev,
45+ libxext-dev,
46+
47 Standards-Version: 3.9.4
48 Homepage: https://launchpad.net/ubuntu-sdk-ide
49 # If you aren't a member of ~ubuntu-sdk-team but need to upload packaging changes,
50
51=== added file 'get_package_source.py'
52--- get_package_source.py 1970-01-01 00:00:00 +0000
53+++ get_package_source.py 2016-02-17 08:30:43 +0000
54@@ -0,0 +1,79 @@
55+#!/usr/bin/python
56+from optparse import OptionParser
57+import re
58+import urlparse
59+from launchpadlib.launchpad import Launchpad
60+from subprocess import call
61+import sys
62+import os
63+import glob
64+
65+def create_webroot_url_from_self_link(self_link):
66+ scheme, netloc, _, _, _ = urlparse.urlsplit(self_link)
67+ netloc = netloc.lstrip("api.")
68+ return u"%s://%s/" % (scheme, netloc)
69+
70+
71+def get_dsc(archive, package, series):
72+ re_version = re.compile(r"^\d+\:")
73+ x = archive.getPublishedSources(exact_match=True, source_name=package,
74+ distro_series=series)
75+ webroot = create_webroot_url_from_self_link(archive.self_link)
76+ version = x[0].source_package_version
77+ version = re_version.sub("", version, 1)
78+ if archive.owner.name == "ubuntu-archive":
79+ yield "%subuntu/+archive/primary/+files/%s_%s.dsc" \
80+ % (webroot, x[0].source_package_name, version)
81+ else:
82+ yield "%s/~ci-train-ppa-service/+archive/ubuntu/stable-phone-overlay/+files/%s_%s.dsc" \
83+ % (webroot, x[0].source_package_name, version)
84+
85+
86+def main():
87+ parser = OptionParser(usage="usage: %prog [options] pkgname ...")
88+ parser.add_option(
89+ "-l", "--launchpad", dest="launchpad_instance", default="production")
90+ options, args = parser.parse_args()
91+ launchpad = Launchpad.login_anonymously('just testing', options.launchpad_instance)
92+ ubuntu = launchpad.distributions["ubuntu"]
93+ distro_archive = ubuntu.main_archive
94+ overlay_archive = launchpad.people["ci-train-ppa-service"].\
95+ getPPAByName(name="stable-phone-overlay")
96+ series = ubuntu.getSeries(name_or_version="xenial")
97+
98+ for source_package in args:
99+ re_version = re.compile(r"^\d+\:")
100+
101+ #first try the overlay archive
102+ archive = overlay_archive
103+ x = overlay_archive.getPublishedSources(exact_match=True,
104+ source_name=source_package,
105+ distro_series=series)
106+ if len(x) == 0:
107+ archive = distro_archive
108+ x = distro_archive.getPublishedSources(exact_match=True,
109+ source_name=source_package,
110+ distro_series=series)
111+ if len(x) == 0:
112+ print("Could not find "+source_package)
113+ sys.exit(1)
114+ else:
115+ print(source_package+" found in Archive")
116+ else:
117+ print(source_package+" found in overlay ppa")
118+
119+ x = x[0].source_package_version
120+
121+ generator = get_dsc(archive, source_package, series)
122+ for i in generator:
123+ call(["dget", i, "--quiet", "--download-only"])
124+ for dsc_file in glob.glob('%s*dsc' % source_package):
125+ call(["dpkg-source", "-x", dsc_file])
126+ for junk_files in glob.glob("*.?z"):
127+ os.remove(junk_files)
128+ for junk_files in glob.glob("*.dsc"):
129+ os.remove(junk_files)
130+ for fetched_module_directory in glob.glob('%s*' % source_package):
131+ os.rename(fetched_module_directory, source_package)
132+
133+main()

Subscribers

People subscribed via source and target branches