From 73962daa0a13dccb4452c989245e3afd33a7e1b6 Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Fri, 28 Jul 2006 00:13:25 +0000 Subject: [PATCH] A build script that I've found to be useful for building the linux snapshot as well as including with the source snapshots which makes it easy to build with static ffmpeg libs (which it will download, patch, configure, and build for you). --- stepmania/Utils/build.sh | 61 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100755 stepmania/Utils/build.sh diff --git a/stepmania/Utils/build.sh b/stepmania/Utils/build.sh new file mode 100755 index 0000000000..7ca03fe4d5 --- /dev/null +++ b/stepmania/Utils/build.sh @@ -0,0 +1,61 @@ +#!/bin/sh + +# Usage: ./build options +# where options are passed to stepmania's configure script + +url=http://stepmania.sf.net +ffmpeg=ffmpeg-0.4.9-pre1 +patchfile=ffmpeg-0.4.9-pre1-sm.patch +if test ! -d $ffmpeg; then + if test ! -f $ffmpeg.tar.gz; then + echo -n 'Downloading ffmpeg...' + if which wget &>/dev/null; then + dl=wget + elif which curl &>/dev/null; then + dl="curl -O -O" + else + echo 'failed.' + exit 1 + fi + $dl $url/$ffmpeg.tar.gz $url/$patchfile &>/dev/null \ + || { echo 'failed.'; exit; } + echo 'okay.' + fi + echo -n 'Decompressing ffmpeg...' + tar zxf $ffmpeg.tar.gz &>/dev/null || { echo 'failed.'; exit 1; } + echo 'okay.' + echo -n 'Patching ffmpeg...' + patch -p0 < $patchfile &>/dev/null || { echo 'failed.'; exit 1; } + echo 'okay.' +fi +if test ! -f $ffmpeg/_inst/lib/libavcodec.a; then + cd $ffmpeg + echo -n 'Configuring ffmpeg...' + ./configure --prefix="`pwd`/_inst" &>/dev/null \ + || { echo 'failed.'; exit 1; } + echo 'okay.' + echo -n 'Building ffmpeg...' + # Hack around broken configure script + mkdir -p _inst/lib + make installlib &>/dev/null || { echo 'failed.'; exit 1; } + echo 'okay.' + cd .. +fi +if test ! -f _build/src/stepmania; then + echo -n 'Configuring StepMania...' + mkdir -p _build + cd _build + ../configure --with-static-ffmpeg-prefix=../$ffmpeg/_inst \ + $@ &>/dev/null || { echo 'failed.'; exit 1; } + echo 'okay.' + echo -n 'Building StepMania...' + make &>/dev/null || { echo 'failed.'; exit 1; } + echo 'okay.' + cd .. +fi +if test ! -f stepmania -o ! -f GtkModule.so; then + echo -n 'Copying StepMania binaries...' + cp _build/src/stepmania _build/src/GtkModule.so . &>/dev/null \ + || { echo 'failed.'; exit 1; } + echo 'okay.' +fi