~macslow/unity/phablet-notification-renderer

« back to all changes in this revision

Viewing changes to build_unity

  • Committer: Mirco Müller
  • Date: 2013-05-13 12:38:00 UTC
  • mfrom: (507.2.162 phablet)
  • Revision ID: mirco.mueller@ubuntu.com-20130513123800-bbffopyq469ptxyj
Merge with trunk (unity/phablet)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
TARGET_DIR=$PWD/../unity_build
4
4
BUILD_DIR=$TARGET_DIR/build
5
 
RARING=false
6
5
SETUP=false
7
6
UPDATE=false
8
7
CLEAN=false
10
9
LENSES="applications mockmusic mockvideos"
11
10
 
12
11
# verified working revisions
13
 
NUX_REV=763
14
12
LIBUNITY_REV=214
15
13
UNITY_REV=3258
16
 
PEOPLE_LENS_REV=73
17
 
HUD_REV=365
 
14
PEOPLE_LENS_REV=74
 
15
HUD_REV=252
18
16
 
19
17
usage() {
20
18
    echo "usage: build_unity [OPTIONS]\n"
43
41
 
44
42
install_dependencies() {
45
43
    echo "Installing build dependencies.."
46
 
    if ! $RARING; then sudo apt-get build-dep -y libnux-3.0-dev || exit 3; fi
47
44
    sudo apt-get build-dep -y libunity unity || exit 4
48
45
    sudo apt-get install -y libgtest-dev gnome-common libfolks-dev libtelepathy-glib-dev || exit 5
49
46
    # HUD dependencies
50
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
48
}
52
49
 
53
 
branch_nux() {
54
 
    echo "Branching Nux.."
55
 
    bzr branch lp:nux/phablet $TARGET_DIR/nux
56
 
}
57
 
 
58
50
branch_libunity() {
59
51
    echo "Branching libunity.."
60
52
    bzr branch lp:libunity/phablet $TARGET_DIR/libunity
72
64
 
73
65
branch_hud() {
74
66
    echo "Branching hud.."
75
 
    bzr branch lp:hud/phablet $TARGET_DIR/hud
76
 
}
77
 
 
78
 
update_nux() {
79
 
    if [ -d $TARGET_DIR/nux ]; then
80
 
        echo "Updating Nux.."
81
 
        bzr pull -d $TARGET_DIR/nux
82
 
    fi
 
67
    bzr branch lp:hud $TARGET_DIR/hud
83
68
}
84
69
 
85
70
update_unity() {
102
87
    bzr pull -d $TARGET_DIR/hud
103
88
}
104
89
 
105
 
compile_nux() {
106
 
    if [ -d $TARGET_DIR/nux ]; then
107
 
        echo "Configuring Nux.."
108
 
 
109
 
        if $CLEAN; then bzr clean-tree -d $TARGET_DIR/nux --quiet --unknown --ignored --force; fi
110
 
 
111
 
        cd $TARGET_DIR/nux
112
 
        bzr revert --quiet -r $NUX_REV || exit 7
113
 
 
114
 
        ./autogen.sh --prefix $BUILD_DIR --disable-debug --disable-documentation
115
 
 
116
 
        echo "Building Nux and installing in " $BUILD_DIR
117
 
        make -j$NUM_JOBS install
118
 
    fi
119
 
}
120
 
 
121
90
compile_libunity() {
122
91
    echo "Configuring libunity.."
123
92
 
194
163
    done
195
164
}
196
165
 
197
 
grep -q raring /etc/lsb-release
198
 
if [ $? -eq 0 ]; then
199
 
    RARING=true
200
 
fi
201
 
 
202
166
if $SETUP; then
203
167
    echo "Setting up environment for building Unity.."
204
168
    install_dependencies
205
169
    mkdir -p $TARGET_DIR
206
 
    if ! $RARING; then branch_nux; fi
207
170
    branch_libunity
208
171
    branch_unity
209
172
    branch_people_lens
210
173
    branch_hud
211
174
elif $UPDATE; then
212
 
    update_nux
213
175
    update_libunity
214
176
    update_unity
215
177
    update_people_lens
217
179
else
218
180
    if $CLEAN; then rm -Rf $BUILD_DIR; fi
219
181
    mkdir -p $BUILD_DIR
220
 
    compile_nux
221
182
    compile_libunity
222
183
    compile_unity_core
223
184
    compile_people_lens