bootstrap-bundle 1.38 KB
Newer Older
1 2 3 4 5 6 7 8 9
#!/usr/bin/env bash

set -e

profile_name="$1"

if test -z "$profile_name"; then
	case "$(uname)" in
		Linux) profile_name=linux ;;
10
		Darwin) profile_name=darwin ;;
11 12 13 14 15 16 17
		*)
			echo "Unsupported system type: $(uname)"
			exit 1
			;;
	esac
fi

18
profile="$profile_name.py"
19

20
if ! test -f "../bockbuild/profiles/banshee/$profile"; then
21 22 23 24
	echo "Profile does not exist: build/bundle/$profile"
	exit 1
fi

25 26
selfdir="$(pwd)/$(dirname "$0")"
envfile="$selfdir/$profile_name.env"
27

28
pushd ../bockbuild/profiles/banshee &>/dev/null
29
./$profile -bv
30
./$profile -e > "$envfile"
31 32 33 34 35

# write the newly generated env vars as xml into the Nereid.csproj
# so we can start with MonoDevelop immediately.
[ $profile_name = darwin ] && \
	./$profile --csproj-insert="$selfdir/src/Clients/Nereid/Nereid.csproj"
36 37
popd &>/dev/null

38
[ $profile_name = darwin ] && \
39
	echo "export GTK2_RC_FILES=\"$selfdir/../bockbuild/profiles/banshee/skeleton.darwin/Contents/Resources/etc/gtk-2.0/gtkrc\"" >> "$envfile"
40

41 42
source "$envfile"

43 44
NOCONFIGURE=1 ./autogen.sh
./profile-configure $profile_name --prefix="$BUILD_PREFIX"
45 46 47 48 49 50

cat <<EOF

The world has built! You can now build Banshee.
Be sure to source in the profile environment:

51
  $ source $profile_name.env
52 53 54 55 56 57 58 59 60 61

Once sourced, just run autogen/configure/make, etc
as normal. The install prefix is available as the
BUILD_PREFIX environment variable - e.g.:

  $ ./autogen.sh --prefix="\$BUILD_PREFIX"

Have fun!

EOF