3 # This is a really lame script, most of it needs to be fixed properly in
4 # the bockbuild darwin profile for bundling (mainly the skeleton overlay
5 # fixing and the .dmg creation part)
13 RELEASE_WORKER_DIR
="$HOME/banshee-release"
15 [ -d "$RELEASE_WORKER_DIR" ] && \
16 bail
"$RELEASE_WORKER_DIR already exists. Please remove it."
18 mkdir
-p "$RELEASE_WORKER_DIR" || bail
"Could not create $RELEASE_WORKER_DIR"
19 pushd "$RELEASE_WORKER_DIR" || bail
"Could not change to $RELEASE_WORKER_DIR"
21 git clone
--depth 1 git
://git.gnome.org
/banshee || bail
"Failed to clone Banshee from git"
24 pushd build
/bundle || bail
"Could not change to banshee git clone"
25 .
/profile.darwin.py
-bvr || bail
"Build failed."
26 cp -a build-root
/_install build-root
/_install_clean
28 make || bail
"Failed to build Solitary"
30 .
/profile.darwin.py
-z || bail
"Failed to create .app bundle"
31 rm -rf build-root
/_install
32 # shutil.copytree is not working as expected for importing the
33 # skeleton into the .app structure, so here we fix that up...
34 # this needs to be fixed in bockbuild/darwinprofile.py
35 cp skeleton.darwin
/Contents
/Resources
/{Banshee.icns
,first-run
} \
36 bundle.darwin
/Banshee.app
/Contents
/Resources
37 cp skeleton.darwin
/Contents
/Resources
/bin
/gmcs \
38 bundle.darwin
/Banshee.app
/Contents
/Resources
/bin
39 cp skeleton.darwin
/Contents
/Resources
/etc
/gtk-2.0
/{gtkrc
,gtkrc.key.mac
} \
40 bundle.darwin
/Banshee.app
/Contents
/Resources
/etc
/gtk-2.0
41 cp -a bundle.darwin
/Banshee.app bundle.darwin
/Banshee.app.orig
42 BANSHEE_VERSION
="$(ls build-root/banshee-1*.success | sed -E 's,.+banshee-1-(.+).success$,\1,')"
43 sed "s,%version%,$BANSHEE_VERSION,g" \
44 < skeleton.darwin
/Contents
/Info.plist \
45 > bundle.darwin
/Banshee.app
/Contents
/Info.plist
46 # We now have a functional .app, let's create the .dmg
48 cp -a build
/bundle
/bundle.darwin
/Banshee.app build
/osx
51 DMG_FILE
=banshee-1-
$BANSHEE_VERSION.macosx.intel.dmg
52 mv Banshee.dmg
$DMG_FILE
53 shasum
-a 256 $DMG_FILE
54 cp -a $DMG_FILE $HOME/Desktop
55 echo "$HOME/Desktop/$DMG_FILE is now ready"