@@ -11,7 +11,6 @@ LENSES="applications mockmusic mockvideos"
1111# verified working revisions
1212LIBUNITY_REV=215
1313UNITY_REV=3260
14−PEOPLE_LENS_REV=74
1514HUD_REV=252
1615
1716usage() {
@@ -39,52 +38,47 @@ do
3938 shift
4039done
4140
42−install_dependencies() {
41+install_utils() {
42+ echo "Installing build utilities.."
43+ sudo apt-get install devscripts equivs || exit 4
44+}
45+
46+mk_build_deps() {
4347 echo "Installing build dependencies.."
44− sudo apt-get build-dep -y libunity unity || exit 4
45− sudo apt-get install -y libgtest-dev gnome-common libfolks-dev libtelepathy-glib-dev || exit 5
46− # HUD dependencies
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
48+ cd $TARGET_DIR
49+ sudo mk-build-deps -B -i $TARGET_DIR/libunity/debian/control || exit 5
50+ sudo mk-build-deps -B -i $TARGET_DIR/unity/debian/control || exit 6
51+ sudo mk-build-deps -B -i $TARGET_DIR/hud/debian/control || exit 7
4852}
4953
5054branch_libunity() {
5155 echo "Branching libunity.."
52− bzr branch lp:libunity/phablet $TARGET_DIR/libunity
56+ bzr branch lp:libunity/phablet $TARGET_DIR/libunity || exit 8
5357}
5458
5559branch_unity() {
5660 echo "Branching Unity.."
57− bzr branch lp:unity/phablet-mods $TARGET_DIR/unity
58−}
59−
60−branch_people_lens() {
61− echo "Branching people lens.."
62− bzr branch lp:unity-lens-people $TARGET_DIR/people_lens
61+ bzr branch lp:unity/phablet-mods $TARGET_DIR/unity || exit 9
6362}
6463
6564branch_hud() {
6665 echo "Branching hud.."
67− bzr branch lp:hud $TARGET_DIR/hud
66+ bzr branch lp:hud $TARGET_DIR/hud || exit 10
6867}
6968
7069update_unity() {
7170 echo "Updating Unity.."
72− bzr pull -d $TARGET_DIR/unity
71+ bzr pull -d $TARGET_DIR/unity || exit 11
7372}
7473
7574update_libunity() {
7675 echo "Updating libunity.."
77− bzr pull -d $TARGET_DIR/libunity
78−}
79−
80−update_people_lens() {
81− echo "Updating people lens.."
82− bzr pull -d $TARGET_DIR/people_lens
76+ bzr pull -d $TARGET_DIR/libunity || exit 12
8377}
8478
8579update_hud() {
8680 echo "Updating hud"
87− bzr pull -d $TARGET_DIR/hud
81+ bzr pull -d $TARGET_DIR/hud || exit 13
8882}
8983
9084compile_libunity() {
@@ -93,12 +87,15 @@ compile_libunity() {
9387 if $CLEAN; then bzr clean-tree -d $TARGET_DIR/libunity --quiet --unknown --ignored --force; fi
9488
9589 cd $TARGET_DIR/libunity
96− bzr revert --quiet -r $LIBUNITY_REV || exit 8
90+ bzr revert --quiet -r $LIBUNITY_REV || exit 14
91+
92+ mkdir $TARGET_DIR/libunity/build
93+ cd $TARGET_DIR/libunity/build
9794
98− ./autogen.sh --prefix $BUILD_DIR --disable-debug
95+ ../autogen.sh --prefix $BUILD_DIR --disable-debug || exit 15
9996
10097 echo "Building libunity and installing in " $BUILD_DIR
101− make -j$NUM_JOBS install
98+ make -j$NUM_JOBS install || exit 16
10299
103100}
104101
@@ -108,32 +105,16 @@ compile_unity_core() {
108105 if $CLEAN; then bzr clean-tree -d $TARGET_DIR/unity --quiet --unknown --ignored --force; fi
109106
110107 cd $TARGET_DIR/unity
111− bzr revert --quiet -r $UNITY_REV || exit 9
108+ bzr revert --quiet -r $UNITY_REV || exit 17
112109
113110 mkdir $TARGET_DIR/unity/build
114111 cd $TARGET_DIR/unity/build
115112
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
117114
118115 echo "Building UnityCore and installing in " $BUILD_DIR
119116 cd UnityCore
120− make -j$NUM_JOBS
121− make install
122−
123−}
124−
125−compile_people_lens() {
126− echo "Configuring people lens.."
127−
128− if $CLEAN; then bzr clean-tree -d $TARGET_DIR/people_lens --quiet --unknown --ignored --force; fi
129−
130− cd $TARGET_DIR/people_lens
131− bzr revert --quiet -r $PEOPLE_LENS_REV || exit 10
132−
133− PKG_CONFIG_PATH=$BUILD_DIR/lib/pkgconfig:$PKG_CONFIG_PATH ./autogen.sh --prefix $BUILD_DIR --enable-localinstall
134−
135− echo "Building people lens and installing in " $BUILD_DIR
136− MAINTAINER_VALAFLAGS="--vapidir=${BUILD_DIR}/share/vala/vapi" make -j$NUM_JOBS install
117+ make -j$NUM_JOBS install || exit 19
137118
138119}
139120
@@ -143,15 +124,15 @@ compile_hud() {
143124 if $CLEAN; then bzr clean-tree -d $TARGET_DIR/hud --quiet --unknown --ignored --force; fi
144125
145126 cd $TARGET_DIR/hud
146− bzr revert -r $HUD_REV || exit 11
127+ bzr revert -r $HUD_REV || exit 20
147128
148129 mkdir $TARGET_DIR/hud/build
149130 cd $TARGET_DIR/hud/build
150131
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
152133
153134 echo "Building hud and installing in " $BUILD_DIR
154− make install
135+ make install || exit 22
155136
156137}
157138
@@ -165,23 +146,22 @@ link_lenses() {
165146
166147if $SETUP; then
167148 echo "Setting up environment for building Unity.."
168− install_dependencies
149+ install_utils
169150 mkdir -p $TARGET_DIR
170151 branch_libunity
171152 branch_unity
172− branch_people_lens
173153 branch_hud
154+ mk_build_deps
174155elif $UPDATE; then
175156 update_libunity
176157 update_unity
177− update_people_lens
178158 update_hud
159+ mk_build_deps
179160else
180161 if $CLEAN; then rm -Rf $BUILD_DIR; fi
181162 mkdir -p $BUILD_DIR
182163 compile_libunity
183164 compile_unity_core
184− compile_people_lens
185165 compile_hud
186166 link_lenses
187167fi