Merge lp:~nskaggs/ubuntu-weather-app/add-cmake into lp:ubuntu-weather-app/obsolete.trunk

Proposed by Nicholas Skaggs
Status: Merged
Approved by: Nicholas Skaggs
Approved revision: 189
Merged at revision: 193
Proposed branch: lp:~nskaggs/ubuntu-weather-app/add-cmake
Merge into: lp:ubuntu-weather-app/obsolete.trunk
Diff against target: 307 lines (+138/-51)
14 files modified
CMakeLists.txt (+64/-0)
click/CMakeLists.txt (+8/-0)
click/manifest.json.in (+14/-6)
com.ubuntu.weather_weather.desktop.in (+3/-3)
debian/control (+10/-9)
debian/rules (+0/-14)
debian/ubuntu-weather-app-autopilot.install (+1/-1)
debian/ubuntu-weather-app.install (+2/-7)
po/CMakeLists.txt (+25/-0)
tests/CMakeLists.txt (+1/-0)
tests/autopilot/CMakeLists.txt (+8/-0)
tests/autopilot/install_autopilot.sh (+0/-8)
tests/autopilot/ubuntu_weather_app/tests/__init__.py (+0/-2)
ubuntu-weather-app.in (+2/-1)
To merge this branch: bzr merge lp:~nskaggs/ubuntu-weather-app/add-cmake
Reviewer Review Type Date Requested Status
David Planella Needs Fixing
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+204349@code.launchpad.net

Commit message

Add cmake build

Description of the change

Add cmake build

To post a comment you must log in.
184. By Nicholas Skaggs

fix mispelling

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
185. By Nicholas Skaggs

fix build

186. By Nicholas Skaggs

tweak cmake app name

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
187. By Nicholas Skaggs

tweak cmake

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
188. By Nicholas Skaggs

fix main qml in cmake

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
189. By Nicholas Skaggs

add install dirs, clean deb control

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
David Planella (dpm) wrote :

This slipped off my radar, and I've just noticed it now:

45 +file(GLOB_RECURSE I18N_SRC_FILES
46 + RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
47 + rc/**.qml desktop/**.desktop.in)
48 +list(SORT I18N_SRC_FILES)

This looks like a boilerplate rule, which hasn't been adapted to the current code. The paths need to be fixed and add .js files to it. Out of interest, what are the double asterisks for?

review: Needs Fixing

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'CMakeLists.txt'
--- CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ CMakeLists.txt 2014-02-13 01:10:17 +0000
@@ -0,0 +1,64 @@
1project(com.ubuntu.weather)
2cmake_minimum_required(VERSION 2.8.9)
3
4# Standard install paths
5include(GNUInstallDirs)
6
7option(INSTALL_TESTS "Install the tests on make install" on)
8option(CLICK_MODE "Installs to a contained location" off)
9
10set(APP_NAME weather)
11set(DESKTOP_FILE "${PROJECT_NAME}_${APP_NAME}.desktop")
12set(URLS_FILE "${PROJECT_NAME}_${APP_NAME}.url-dispatcher")
13set(APP_HARDCODE ubuntu-weather-app)
14set(MAIN_QML ubuntu-weather-app.qml)
15set(ICON weather64.png)
16set(AUTOPILOT_DIR ubuntu_weather_app)
17
18if(CLICK_MODE)
19 if(NOT DEFINED BZR_SOURCE)
20 set(BZR_SOURCE "lp:${APP_HARDCODE}")
21 message("-- Setting BZR_SOURCE to ${BZR_SOURCE}")
22 endif(NOT DEFINED BZR_SOURCE)
23 set(CMAKE_INSTALL_PREFIX /)
24 set(CMAKE_INSTALL_BINDIR /)
25 set(DATA_DIR /)
26 set(EXEC "qmlscene ${MAIN_QML}")
27 set(DESKTOP_DIR ${DATA_DIR})
28 set(URLS_DIR ${DATA_DIR})
29else(CLICK_MODE)
30 set(DATA_DIR ${CMAKE_INSTALL_DATADIR}/${APP_HARDCODE})
31 set(EXEC ${APP_HARDCODE})
32 set(ICON ${CMAKE_INSTALL_PREFIX}/${DATA_DIR}/${ICON})
33 configure_file(${APP_HARDCODE}.in
34 ${CMAKE_CURRENT_BINARY_DIR}/${APP_HARDCODE})
35 install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${APP_HARDCODE}
36 DESTINATION ${CMAKE_INSTALL_BINDIR})
37 set(DESKTOP_DIR ${CMAKE_INSTALL_DATADIR}/applications)
38 set(URLS_DIR ${CMAKE_INSTALL_DATADIR}/url-dispatcher/urls)
39endif(CLICK_MODE)
40
41file(GLOB_RECURSE I18N_SRC_FILES
42 RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
43 rc/**.qml desktop/**.desktop.in)
44list(SORT I18N_SRC_FILES)
45
46
47file(GLOB SRC_FILES
48 RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
49 *.qml *.js *.png *.js)
50install(DIRECTORY components resources DESTINATION ${DATA_DIR})
51install(FILES ${MAIN_QML} DESTINATION ${DATA_DIR})
52
53configure_file(${DESKTOP_FILE}.in ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE})
54install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE}
55 DESTINATION ${DESKTOP_DIR})
56
57install(FILES ${URLS_FILE} DESTINATION ${URLS_DIR})
58
59# Tests
60enable_testing()
61
62add_subdirectory(click)
63add_subdirectory(po)
64add_subdirectory(tests)
065
=== removed directory 'apparmor'
=== added directory 'click'
=== added file 'click/CMakeLists.txt'
--- click/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ click/CMakeLists.txt 2014-02-13 01:10:17 +0000
@@ -0,0 +1,8 @@
1if(CLICK_MODE)
2 if(NOT BZR_REVNO)
3 set(BZR_REVNO "latest")
4 endif(NOT BZR_REVNO)
5 configure_file(manifest.json.in ${CMAKE_CURRENT_BINARY_DIR}/manifest.json)
6 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/manifest.json apparmor.json
7 DESTINATION ${CMAKE_INSTALL_PREFIX})
8endif(CLICK_MODE)
09
=== renamed file 'apparmor/weather.json' => 'click/apparmor.json'
=== renamed file 'manifest.json' => 'click/manifest.json.in'
--- manifest.json 2014-01-28 05:04:43 +0000
+++ click/manifest.json.in 2014-02-13 01:10:17 +0000
@@ -2,14 +2,22 @@
2 "description": "Weather application",2 "description": "Weather application",
3 "framework": "ubuntu-sdk-13.10",3 "framework": "ubuntu-sdk-13.10",
4 "hooks": {4 "hooks": {
5 "weather": {5 "@APP_NAME@": {
6 "apparmor": "apparmor/weather.json",6 "apparmor": "apparmor.json",
7 "desktop": "ubuntu-weather-app.desktop"7 "desktop": "@DESKTOP_FILE@",
8 "urls": "@URLS_FILE@"
8 }9 }
9 },10 },
10 "icon": "weather64.png",11 "icon": "@ICON@",
11 "maintainer": "Ubuntu App Cats <ubuntu-touch-coreapps@lists.launchpad.net>",12 "maintainer": "Ubuntu App Cats <ubuntu-touch-coreapps@lists.launchpad.net>",
12 "name": "com.ubuntu.weather",13 "name": "@PROJECT_NAME@",
13 "title": "weather",14 "title": "weather",
14 "version": "1.0"15 "version": "1.0.@BZR_REVNO@",
16 "x-source": {
17 "vcs-bzr": "@BZR_SOURCE@",
18 "vcs-bzr-revno": "@BZR_REVNO@"
19 },
20 "x-test": {
21 "autopilot": "@AUTOPILOT_DIR@"
22 }
15}23}
1624
=== renamed file 'ubuntu-weather-app.desktop' => 'com.ubuntu.weather_weather.desktop.in'
--- ubuntu-weather-app.desktop 2013-10-10 20:46:51 +0000
+++ com.ubuntu.weather_weather.desktop.in 2014-02-13 01:10:17 +0000
@@ -2,9 +2,9 @@
2Version=1.02Version=1.0
3Type=Application3Type=Application
4Terminal=false4Terminal=false
5Exec=qmlscene /usr/share/ubuntu-weather-app/ubuntu-weather-app.qml5Exec=@EXEC@
6Icon=/usr/share/ubuntu-weather-app/weather64.png6Icon=@ICON@
7Name=Weather7Name=Weather
8X-Ubuntu-Touch=true8X-Ubuntu-Touch=true
9X-Ubuntu-StageHint=SideStage9X-Ubuntu-StageHint=SideStage
10X-Ubuntu-Gettext-Domain=com.ubuntu.weather10X-Ubuntu-Gettext-Domain=@PROJECT_NAME@
1111
=== added file 'com.ubuntu.weather_weather.url-dispatcher'
=== modified file 'debian/control'
--- debian/control 2013-11-05 20:31:33 +0000
+++ debian/control 2014-02-13 01:10:17 +0000
@@ -1,7 +1,8 @@
1Source: ubuntu-weather-app1Source: ubuntu-weather-app
2Priority: extra2Priority: extra
3Maintainer: Ubuntu App Cats <ubuntu-touch-coreapps@lists.launchpad.net>3Maintainer: Ubuntu App Cats <ubuntu-touch-coreapps@lists.launchpad.net>
4Build-Depends: debhelper (>= 9),4Build-Depends: cmake,
5 debhelper (>= 9),
5 python,6 python,
6Standards-Version: 3.9.47Standards-Version: 3.9.4
7Section: misc8Section: misc
@@ -11,22 +12,22 @@
11Package: ubuntu-weather-app12Package: ubuntu-weather-app
12Section: misc13Section: misc
13Architecture: all14Architecture: all
14Depends: ${misc:Depends},15Depends: qmlscene,
15 qmlscene,16 qtdeclarative5-localstorage-plugin,
17 qtdeclarative5-qtquick2-plugin,
16 qtdeclarative5-ubuntu-ui-toolkit-plugin | qt-components-ubuntu,18 qtdeclarative5-ubuntu-ui-toolkit-plugin | qt-components-ubuntu,
17 qtdeclarative5-localstorage-plugin,19 ${misc:Depends},
18 qtdeclarative5-qtquick2-plugin
19Description: Weather application20Description: Weather application
20 Core Weather application21 Core Weather application
2122
22Package: ubuntu-weather-app-autopilot23Package: ubuntu-weather-app-autopilot
23Architecture: all24Architecture: all
24Depends: ${misc:Depends},25Depends: libautopilot-qt (>= 1.4),
25 python2.7,
26 ubuntu-weather-app (= ${source:Version}),
27 libautopilot-qt (>= 1.4),
28 libqt5test5,26 libqt5test5,
29 libqt5widgets5,27 libqt5widgets5,
28 python2.7,
30 ubuntu-ui-toolkit-autopilot,29 ubuntu-ui-toolkit-autopilot,
30 ubuntu-weather-app (= ${source:Version}),
31 ${misc:Depends},
31Description: Test package for the weather app32Description: Test package for the weather app
32 Autopilot tests for the weather app package33 Autopilot tests for the weather app package
3334
=== modified file 'debian/rules'
--- debian/rules 2013-10-10 20:47:33 +0000
+++ debian/rules 2014-02-13 01:10:17 +0000
@@ -6,17 +6,3 @@
66
7%:7%:
8 dh $@8 dh $@
9
10override_dh_install:
11 tests/autopilot/install_autopilot.sh $(CURDIR)
12 dh_install --fail-missing
13 appname=com.ubuntu.weather; \
14 debname=ubuntu-weather-app; \
15 for pofile in $(shell find ./po -name "*.po"); do \
16 pofilename="$${pofile##*/}"; \
17 langcode="$${pofilename%.*}"; \
18 localedir="debian/$$debname/usr/share/locale/$$langcode/LC_MESSAGES"; \
19 mkdir -p $$localedir; \
20 mofile="$$localedir/$$appname.mo"; \
21 msgfmt -o $$mofile $$pofile; \
22 done
239
=== modified file 'debian/ubuntu-weather-app-autopilot.install'
--- debian/ubuntu-weather-app-autopilot.install 2013-04-22 13:59:51 +0000
+++ debian/ubuntu-weather-app-autopilot.install 2014-02-13 01:10:17 +0000
@@ -1,1 +1,1 @@
1/usr/lib/python*/dist-packages/ubuntu_weather_app/1usr/lib/*/dist-packages/ubuntu_weather_app/*
22
=== modified file 'debian/ubuntu-weather-app.install'
--- debian/ubuntu-weather-app.install 2013-04-11 20:37:30 +0000
+++ debian/ubuntu-weather-app.install 2014-02-13 01:10:17 +0000
@@ -1,7 +1,2 @@
1ubuntu-weather-app usr/bin/1usr/bin/*
2ubuntu-weather-app.desktop usr/share/applications/2usr/share/*
3*.qml usr/share/ubuntu-weather-app/
4*.png usr/share/ubuntu-weather-app/
5components usr/share/ubuntu-weather-app/
6resources usr/share/ubuntu-weather-app/
7
83
=== added file 'po/CMakeLists.txt'
--- po/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ po/CMakeLists.txt 2014-02-13 01:10:17 +0000
@@ -0,0 +1,25 @@
1include(FindGettext)
2find_program(GETTEXT_XGETTEXT_EXECUTABLE xgettext)
3
4set(DOMAIN ${PROJECT_NAME})
5set(POT_FILE ${DOMAIN}.pot)
6file(GLOB PO_FILES *.po)
7
8add_custom_target(${POT_FILE}
9 COMMAND ${GETTEXT_XGETTEXT_EXECUTABLE} -o ${POT_FILE}
10 -D ${CMAKE_SOURCE_DIR}
11 --from-code=UTF-8
12 --c++ --qt --add-comments=TRANSLATORS
13 --keyword=tr --keyword=tr:1,2
14 --package-name='${PROJECT}'
15 --copyright-holder='Canonical Ltd.'
16 ${I18N_SRC_FILES})
17
18foreach(PO_FILE ${PO_FILES})
19 get_filename_component(LANG ${PO_FILE} NAME_WE)
20 gettext_process_po_files(${LANG} ALL PO_FILES ${PO_FILE})
21 set(INSTALL_DIR ${CMAKE_INSTALL_LOCALEDIR}/${LANG}/LC_MESSAGES)
22 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${LANG}.gmo
23 DESTINATION ${INSTALL_DIR}
24 RENAME ${DOMAIN}.mo)
25endforeach(PO_FILE)
026
=== added file 'tests/CMakeLists.txt'
--- tests/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ tests/CMakeLists.txt 2014-02-13 01:10:17 +0000
@@ -0,0 +1,1 @@
1add_subdirectory(autopilot)
02
=== added file 'tests/autopilot/CMakeLists.txt'
--- tests/autopilot/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ tests/autopilot/CMakeLists.txt 2014-02-13 01:10:17 +0000
@@ -0,0 +1,8 @@
1if(INSTALL_TESTS)
2execute_process(COMMAND python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"
3 OUTPUT_VARIABLE PYTHON_PACKAGE_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
4
5install(DIRECTORY ${AUTOPILOT_DIR}
6 DESTINATION ${PYTHON_PACKAGE_DIR}
7 )
8endif(INSTALL_TESTS)
09
=== removed file 'tests/autopilot/install_autopilot.sh'
--- tests/autopilot/install_autopilot.sh 2013-04-05 08:12:09 +0000
+++ tests/autopilot/install_autopilot.sh 1970-01-01 00:00:00 +0000
@@ -1,8 +0,0 @@
1#!/bin/bash
2
3PYDIR=`python -c 'from distutils.sysconfig import get_python_lib; print get_python_lib()'`
4CURDIR=$1
5
6mkdir -p ${CURDIR}/debian/tmp${PYDIR}
7cp -r tests/autopilot/ubuntu_weather_app ${CURDIR}/debian/tmp${PYDIR}
8
90
=== modified file 'tests/autopilot/ubuntu_weather_app/tests/__init__.py'
--- tests/autopilot/ubuntu_weather_app/tests/__init__.py 2013-12-17 18:57:25 +0000
+++ tests/autopilot/ubuntu_weather_app/tests/__init__.py 2014-02-13 01:10:17 +0000
@@ -77,8 +77,6 @@
77 self.app = self.launch_test_application(77 self.app = self.launch_test_application(
78 self.qmlscene(),78 self.qmlscene(),
79 self.installed_location,79 self.installed_location,
80 "--desktop_file_hint=/usr/share/applications/"
81 "ubuntu-weather-app.desktop",
82 app_type='qt',80 app_type='qt',
83 emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)81 emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)
8482
8583
=== renamed file 'ubuntu-weather-app' => 'ubuntu-weather-app.in'
--- ubuntu-weather-app 2013-04-11 20:37:30 +0000
+++ ubuntu-weather-app.in 2014-02-13 01:10:17 +0000
@@ -1,2 +1,3 @@
1#!/bin/bash1#!/bin/bash
2qmlscene /usr/share/ubuntu-weather-app/ubuntu-weather-app.qml2export QT_SELECT=qt5
3qmlscene @CMAKE_INSTALL_PREFIX@/@DATA_DIR@/@MAIN_QML@

Subscribers

People subscribed via source and target branches