I tend to build mine (outside the SDK) like this:-
Setup an armhf schroot:-
$ sudo click chroot -a armhf -f ubuntu-sdk-15.04 create
I would also make one for amd64 and i386 because I may want to make a "fat" package containing binaries for phone and laptop/desktop computers too. The SDK doesn't yet support this directly using cmake so we kinda fudge it a bit.
$ sudo click chroot -a amd64 -f ubuntu-sdk-15.04 create
$ sudo click chroot -a i386 -f ubuntu-sdk-15.04 create
When I want to build, I just navigate to where the code is, and run
This basically builds for all 3 arches and then crams all three builds into one click package. There's a few apps in the store built like this.
If you only want one arch, just change line 12 in that script.
Some things will need dependencies installing inside the schroot. You can get a shell inside the schroot with this:-
$ sudo click chroot -a armhf -f ubuntu-sdk-15.04 maint
You can then use the standard apt commands to get whatever dependencies are needed. Note that you need to specify the architecture if you're installing dev packages inside the schroot such as:-
$ apt-get install libfoo-dev:armhf
Hope that helps. Here's the typical output of me running "make_fat_package.sh" against terminal.
$ sudo apt-get install click-dev
(was alread there)
$ sudo apt-get install schroot
(was alread there)
$ sudo apt-get install debootstrap
(was alread there)
$ sudo click chroot -a armhf -f ubuntu-sdk-15.04 create
A chroot for that name and architecture already exists.
(perhaps from my tries to build a Qt app)
$ bzr launchpad-login gubu
$ bzr branch lp:ubuntu-terminal-app/reboot ubuntu-mutt-terminal-app
$ scp ......:scp make_fat_package.sh ubuntu-mutt-terminal-app
$ cd ubuntu-mutt-terminal-app
XXX: for sure there are file which must be changed from 'ubuntu-terminal-app'
(the original name) to 'ubuntu-mutt-terminal-app'
$ ./make_fat_package.sh
...
No such file or directory #include ...
fixed it with:
$ sudo click chroot -a armhf -f ubuntu-sdk-15.04 maint
(click-ubuntu-sdk-15.04-armhf)root@linchen-ubuntu:/home/guru/ubuntu-terminal-app#
# apt-get install libpam0g-dev:armhf
# exit
$ ./make_fat_package.sh
...
[ armhf ] Cleaning up build dir
[ ubuntu-sdk-15.04 ] Modifying manifest.json
[ ubuntu-sdk-15.04 ] Build *multi.click package
WARNING:root:Ignoring missing framework "ubuntu-sdk-15.04"
Now executing: click-review ./com.ubuntu.terminal_0.7._multi.click
Errors
------
- security_template_valid (terminal.apparmor)
(MANUAL REVIEW) 'unconfined' not allowed
./com.ubuntu.terminal_0.7._multi.click: FAIL
Successfully built package in './com.ubuntu.terminal_0.7._multi.click'.
And were done!! \o/
$ ls -l ../com.ubuntu.terminal_0.7._multi.click
-rw-rw-r-- 1 guru guru 423502 Aug 14 19:08 ../com.ubuntu.terminal_0.7._multi.click
$ diff src/plugin/qmltermwidget/src/ksession.cpp*
78c78
< QStringList args("$APP_DIR/lib/arm-linux-gnueabihf/bin/mutt.sh");
---
> QStringList args("");
80c80
setAutoClose(true); // set to false to see invocation errors
---
> session->setAutoClose(true);
$ cat ../mutt.click/mutt.sh
#!/bin/sh
# where we have installed the sasl2 modules
#
SASL_PATH=${APP_DIR}/lib/arm-linux-gnueabihf export SASL_PATH
# we need lynx to read mails in HTML
#
LYNX_CFG=${APP_DIR}/lib/arm-linux-gnueabihf/bin/lynx.cfg export LYNX_CFG
LYNX_LSS=${APP_DIR}/lib/arm-linux-gnueabihf/bin/lynx.lss export LYNX_LSS
# we use a 'vim.basic' installed in the jail too, together with its config files
#
VIM=${APP_DIR}/lib/arm-linux-gnueabihf/bin export VIM
# if the user 'phablet' has a file ~/.muttrc, we use this; else we stopp
#
if [ -f ~/.muttrc ]; then
mutt -F ~/.muttrc
else
echo You must have a file ~/.muttrc, but you dont have.
echo Hit ENTER to close the app.
read a
fi