@@ -11,7 +11,6 @@ LENSES="applications mockmusic mockvideos"
11# verified working revisions
11# verified working revisions
12LIBUNITY_REV=215
12LIBUNITY_REV=215
13UNITY_REV=3260
13UNITY_REV=3260
15HUD_REV=252
14HUD_REV=252
@@ -39,52 +38,47 @@ do
42−install_dependencies() {
41+install_utils() {
42+ echo "Installing build utilities.."
43+ sudo apt-get install devscripts equivs || exit 4
43 echo "Installing build dependencies.."
47 echo "Installing build dependencies.."
44− sudo apt-get build-dep -y libunity unity || exit 4
48+ cd $TARGET_DIR
45− sudo apt-get install -y libgtest-dev gnome-common libfolks-dev libtelepathy-glib-dev || exit 5
49+ sudo mk-build-deps -B -i $TARGET_DIR/libunity/debian/control || exit 5
46− # HUD dependencies
50+ sudo mk-build-deps -B -i $TARGET_DIR/unity/debian/control || exit 6
47− sudo apt-get install -y bamfdaemon debhelper dh-autoreconf gir1.2-dee-1.0 gnome-common gnome-doc-utils gobject-introspection gtk-doc-tools indicator-application indicator-appmenu indicator-appmenu-tools intltool libappindicator3-dev libbamf3-dev libdbusmenu-glib-dev libdbusmenu-gtk3-dev libdbusmenu-jsonloader-dev libdbustest1-dev libdee-dev libgirepository1.0-dev libgtk-3-dev libncurses5-dev libreadline-dev libsqlite3-dev metacity sqlite3 valac-0.18 libpocketsphinx-dev libsphinxbase-dev || exit 6
51+ sudo mk-build-deps -B -i $TARGET_DIR/hud/debian/control || exit 7
50branch_libunity() {
54branch_libunity() {
51 echo "Branching libunity.."
55 echo "Branching libunity.."
52− bzr branch lp:libunity/phablet $TARGET_DIR/libunity
56+ bzr branch lp:libunity/phablet $TARGET_DIR/libunity || exit 8
55branch_unity() {
59branch_unity() {
56 echo "Branching Unity.."
60 echo "Branching Unity.."
57− bzr branch lp:unity/phablet-mods $TARGET_DIR/unity
61+ bzr branch lp:unity/phablet-mods $TARGET_DIR/unity || exit 9
60−branch_people_lens() {
61− echo "Branching people lens.."
62− bzr branch lp:unity-lens-people $TARGET_DIR/people_lens
65branch_hud() {
64branch_hud() {
66 echo "Branching hud.."
65 echo "Branching hud.."
67− bzr branch lp:hud $TARGET_DIR/hud
66+ bzr branch lp:hud $TARGET_DIR/hud || exit 10
70update_unity() {
69update_unity() {
71 echo "Updating Unity.."
70 echo "Updating Unity.."
72− bzr pull -d $TARGET_DIR/unity
71+ bzr pull -d $TARGET_DIR/unity || exit 11
75update_libunity() {
74update_libunity() {
76 echo "Updating libunity.."
75 echo "Updating libunity.."
77− bzr pull -d $TARGET_DIR/libunity
76+ bzr pull -d $TARGET_DIR/libunity || exit 12
80−update_people_lens() {
81− echo "Updating people lens.."
82− bzr pull -d $TARGET_DIR/people_lens
85update_hud() {
79update_hud() {
86 echo "Updating hud"
80 echo "Updating hud"
87− bzr pull -d $TARGET_DIR/hud
81+ bzr pull -d $TARGET_DIR/hud || exit 13
90compile_libunity() {
84compile_libunity() {
@@ -93,12 +87,15 @@ compile_libunity() {
93 if $CLEAN; then bzr clean-tree -d $TARGET_DIR/libunity --quiet --unknown --ignored --force; fi
87 if $CLEAN; then bzr clean-tree -d $TARGET_DIR/libunity --quiet --unknown --ignored --force; fi
95 cd $TARGET_DIR/libunity
89 cd $TARGET_DIR/libunity
96− bzr revert --quiet -r $LIBUNITY_REV || exit 8
90+ bzr revert --quiet -r $LIBUNITY_REV || exit 14
92+ mkdir $TARGET_DIR/libunity/build
93+ cd $TARGET_DIR/libunity/build
98− ./autogen.sh --prefix $BUILD_DIR --disable-debug
95+ ../autogen.sh --prefix $BUILD_DIR --disable-debug || exit 15
100 echo "Building libunity and installing in " $BUILD_DIR
97 echo "Building libunity and installing in " $BUILD_DIR
101− make -j$NUM_JOBS install
98+ make -j$NUM_JOBS install || exit 16
@@ -108,32 +105,16 @@ compile_unity_core() {
108 if $CLEAN; then bzr clean-tree -d $TARGET_DIR/unity --quiet --unknown --ignored --force; fi
105 if $CLEAN; then bzr clean-tree -d $TARGET_DIR/unity --quiet --unknown --ignored --force; fi
110 cd $TARGET_DIR/unity
107 cd $TARGET_DIR/unity
111− bzr revert --quiet -r $UNITY_REV || exit 9
108+ bzr revert --quiet -r $UNITY_REV || exit 17
113 mkdir $TARGET_DIR/unity/build
110 mkdir $TARGET_DIR/unity/build
114 cd $TARGET_DIR/unity/build
111 cd $TARGET_DIR/unity/build
116− PKG_CONFIG_PATH=$BUILD_DIR/lib/pkgconfig:$PKG_CONFIG_PATH cmake $TARGET_DIR/unity -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$BUILD_DIR -DCOMPIZ_PLUGIN_INSTALL_TYPE=local -DGSETTINGS_LOCALINSTALL=ON
113+ PKG_CONFIG_PATH=$BUILD_DIR/lib/pkgconfig:$PKG_CONFIG_PATH cmake $TARGET_DIR/unity -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$BUILD_DIR -DCOMPIZ_PLUGIN_INSTALL_TYPE=local -DGSETTINGS_LOCALINSTALL=ON || exit 18
118 echo "Building UnityCore and installing in " $BUILD_DIR
115 echo "Building UnityCore and installing in " $BUILD_DIR
119 cd UnityCore
116 cd UnityCore
120− make -j$NUM_JOBS
117+ make -j$NUM_JOBS install || exit 19
125−compile_people_lens() {
126− echo "Configuring people lens.."
128− if $CLEAN; then bzr clean-tree -d $TARGET_DIR/people_lens --quiet --unknown --ignored --force; fi
130− cd $TARGET_DIR/people_lens
131− bzr revert --quiet -r $PEOPLE_LENS_REV || exit 10
133− PKG_CONFIG_PATH=$BUILD_DIR/lib/pkgconfig:$PKG_CONFIG_PATH ./autogen.sh --prefix $BUILD_DIR --enable-localinstall
135− echo "Building people lens and installing in " $BUILD_DIR
136− MAINTAINER_VALAFLAGS="--vapidir=${BUILD_DIR}/share/vala/vapi" make -j$NUM_JOBS install
@@ -143,15 +124,15 @@ compile_hud() {
143 if $CLEAN; then bzr clean-tree -d $TARGET_DIR/hud --quiet --unknown --ignored --force; fi
124 if $CLEAN; then bzr clean-tree -d $TARGET_DIR/hud --quiet --unknown --ignored --force; fi
145 cd $TARGET_DIR/hud
126 cd $TARGET_DIR/hud
146− bzr revert -r $HUD_REV || exit 11
127+ bzr revert -r $HUD_REV || exit 20
148 mkdir $TARGET_DIR/hud/build
129 mkdir $TARGET_DIR/hud/build
149 cd $TARGET_DIR/hud/build
130 cd $TARGET_DIR/hud/build
151− cmake $TARGET_DIR/hud/ -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$BUILD_DIR -DCMAKE_INSTALL_LIBDIR=lib -DLOCAL_INSTALL=ON -DENABLE_TESTS=OFF
132+ cmake $TARGET_DIR/hud/ -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$BUILD_DIR -DCMAKE_INSTALL_LIBDIR=lib -DLOCAL_INSTALL=ON -DENABLE_TESTS=OFF || exit 21
153 echo "Building hud and installing in " $BUILD_DIR
134 echo "Building hud and installing in " $BUILD_DIR
154− make install
135+ make install || exit 22
@@ -165,23 +146,22 @@ link_lenses() {
166if $SETUP; then
147if $SETUP; then
167 echo "Setting up environment for building Unity.."
148 echo "Setting up environment for building Unity.."
168− install_dependencies
149+ install_utils
169 mkdir -p $TARGET_DIR
150 mkdir -p $TARGET_DIR
170 branch_libunity
151 branch_libunity
171 branch_unity
152 branch_unity
173 branch_hud
153 branch_hud
174elif $UPDATE; then
155elif $UPDATE; then
175 update_libunity
156 update_libunity
176 update_unity
157 update_unity
178 update_hud
158 update_hud
180 if $CLEAN; then rm -Rf $BUILD_DIR; fi
161 if $CLEAN; then rm -Rf $BUILD_DIR; fi
181 mkdir -p $BUILD_DIR
162 mkdir -p $BUILD_DIR
182 compile_libunity
163 compile_libunity
183 compile_unity_core
164 compile_unity_core
185 compile_hud
165 compile_hud
186 link_lenses
166 link_lenses