Merge lp:~gary-wzl77/day-scope/fat_click_package into lp:day-scope

Proposed by Gary.Wang on 2016-07-26
Status: Needs review
Proposed branch: lp:~gary-wzl77/day-scope/fat_click_package
Merge into: lp:day-scope
Diff against target: 65 lines (+40/-1)
3 files modified
CMakeLists.txt (+10/-0)
build_fat_package.sh (+29/-0)
src/CMakeLists.txt (+1/-1)
To merge this branch: bzr merge lp:~gary-wzl77/day-scope/fat_click_package
Reviewer Review Type Date Requested Status
day-scope-team 2016-07-26 Pending
Review via email: mp+301136@code.launchpad.net

Commit message

enable fat click package building.

Description of the change

enable fat click package building.

To post a comment you must log in.

Unmerged revisions

54. By Gary.Wang on 2016-07-25

enable fat click package building.

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-07-13 03:55:51 +0000
3+++ CMakeLists.txt 2016-07-26 05:43:47 +0000
4@@ -13,6 +13,16 @@
5 OUTPUT_STRIP_TRAILING_WHITESPACE
6 )
7
8+if (${ARCH} STREQUAL "arm64")
9+ set(TOOLCHAIN_PREFIX aarch64-linux-gnu)
10+elseif (${ARCH} STREQUAL "armhf")
11+ set(TOOLCHAIN_PREFIX arm-linux-gnueabihf)
12+elseif (${ARCH} STREQUAL "i386")
13+ set(TOOLCHAIN_PREFIX i386-linux-gnu)
14+elseif (${ARCH} STREQUAL "amd64")
15+ set(TOOLCHAIN_PREFIX x86_64-linux-gnu)
16+endif()
17+
18 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pedantic -Wall -Wextra -s")
19 set(UBUNTU_PROJECT_TYPE "Scope" CACHE INTERNAL "Tells QtCreator this is a Scope project")
20
21
22=== added file 'build_fat_package.sh'
23--- build_fat_package.sh 1970-01-01 00:00:00 +0000
24+++ build_fat_package.sh 2016-07-26 05:43:47 +0000
25@@ -0,0 +1,29 @@
26+set -e
27+
28+CLICK_SDK_FRAMEWORK=${CLICK_SDK_FRAMEWORK:=ubuntu-sdk-15.04}
29+FAT_DIR=${FAT_DIR:=/tmp/fatpackage}
30+
31+echo -e "\033[1;32m [ ${CLICK_SDK_FRAMEWORK} ] Building super duper fat click package\033[0m"
32+
33+for ARCH in armhf arm64 i386 amd64
34+do
35+ echo -e "\033[0;31m [ $ARCH ] Building..........\033[0m"
36+ BUILD_DIR=build-$ARCH
37+ if [ ! -d "${BUILD_DIR}" ]; then
38+ mkdir ./${BUILD_DIR}
39+ fi
40+ cd ./${BUILD_DIR}
41+ sudo click chroot -a $ARCH -f ${CLICK_SDK_FRAMEWORK} run cmake ..
42+ sudo click chroot -a $ARCH -f ${CLICK_SDK_FRAMEWORK} run make
43+ sudo click chroot -a $ARCH -f ${CLICK_SDK_FRAMEWORK} run make DESTDIR=${FAT_DIR} install
44+ cd ../
45+ echo -e "\033[0;31m [ $ARCH ] Cleaning up build dir\033[0m"
46+ sudo rm -rf ./${BUILD_DIR}
47+done
48+
49+echo -e "\033[0;31m [ ${CLICK_SDK_FRAMEWORK} ] Modifying manifest.json\033[0m"
50+sudo sed -i 's/^ "architecture.*/ "architecture": ["armhf", "arm64", "i386", "amd64"],/' ${FAT_DIR}/manifest.json
51+
52+echo -e "\033[0;31m [ ${CLICK_SDK_FRAMEWORK} ] Build *multi.click package\033[0m"
53+sudo click build ${FAT_DIR}
54+echo -e "\033[1;32m And were done!! \o/ \033[0m"
55
56=== modified file 'src/CMakeLists.txt'
57--- src/CMakeLists.txt 2016-02-04 22:01:45 +0000
58+++ src/CMakeLists.txt 2016-07-26 05:43:47 +0000
59@@ -19,5 +19,5 @@
60
61 install(
62 TARGETS ${SO_NAME}
63- LIBRARY DESTINATION "${SCOPE_INSTALLDIR}"
64+ LIBRARY DESTINATION "${SCOPE_INSTALLDIR}/${TOOLCHAIN_PREFIX}"
65 )

Subscribers

People subscribed via source and target branches

to all changes: