Revision: 18753
http://vice-emu.svn.sourceforge.net/vice-emu/?rev=18753&view=rev
Author: cnvogelg
Date: 2008-04-27 12:36:36 -0700 (Sun, 27 Apr 2008)
Log Message:
-----------
chris/cocoa-port: added build/macosx/build-vice-release.sh to build mac binary/source code releases and snapshots fully automatically from SVN
Modified Paths:
--------------
branches/chris/cocoa-port/vice/build/Makefile.am
Added Paths:
-----------
branches/chris/cocoa-port/vice/build/macosx/build-vice-release.sh
Modified: branches/chris/cocoa-port/vice/build/Makefile.am
===================================================================
--- branches/chris/cocoa-port/vice/build/Makefile.am 2008-04-27 18:25:27 UTC (rev 18752)
+++ branches/chris/cocoa-port/vice/build/Makefile.am 2008-04-27 19:36:36 UTC (rev 18753)
@@ -11,6 +11,7 @@
macosx/build-readline.sh \
macosx/build-vice-dist.sh \
macosx/build-ffmpeglame.sh \
+ macosx/build-vice-release.sh \
minix3/build.sh \
minix3/build-package.sh \
qnx4/build.sh \
Added: branches/chris/cocoa-port/vice/build/macosx/build-vice-release.sh
===================================================================
--- branches/chris/cocoa-port/vice/build/macosx/build-vice-release.sh (rev 0)
+++ branches/chris/cocoa-port/vice/build/macosx/build-vice-release.sh 2008-04-27 19:36:36 UTC (rev 18753)
@@ -0,0 +1,153 @@
+#!/bin/bash
+#
+# build snapshot binaries for x11 gtk and cocoa from the SVN
+#
+# written by Christian Vogelgsang <ch...@vo...>
+#
+# Usage:
+# build-vice-release [-s] [<vice-svn-repository>] [<path to extlib>] [<target dir>] [<arch>] [<uis>]
+# -s = snapshot
+
+echo "--- build VICE release from SVN repository ---"
+
+# is a snapshot
+SNAPSHOT=0
+if [ "x$1" = "x-s" ]; then
+ SNAPSHOT=1
+ shift
+fi
+
+# check repository directory
+SVN_REPO="$1"
+if [ "x$SVN_REPO" = x ]; then
+ SVN_REPO=vice-emu-cocoa
+fi
+if [ ! -d "$SVN_REPO" ]; then
+ echo "ERROR: SVN repository '$SVN_REPO' not found!"
+ exit 1
+fi
+SVN_REPO="`(cd \"$SVN_REPO\" && pwd -P)`"
+echo "SVN repository: $SVN_REPO"
+
+# check extlib directory
+EXTLIB="$2"
+if [ "x$EXTLIB" = x ]; then
+ EXTLIB=extlib
+fi
+if [ ! -d "$EXTLIB" ]; then
+ echo "ERROR: external libs '$EXTLIB' not found!"
+ exit 1
+fi
+EXTLIB="`(cd \"$EXTLIB\" && pwd)`"
+echo "external libs: $EXTLIB"
+
+# check target dir
+BUILD_DIR="$3"
+if [ "x$BUILD_DIR" = x ]; then
+ if [ $SNAPSHOT = 1 ]; then
+ BUILD_DIR=build-vice-snapshot
+ else
+ BUILD_DIR=build-vice-release
+ fi
+fi
+if [ -d "$BUILD_DIR" ]; then
+ echo "ERROR: $BUILD_DIR already exists!"
+ exit 1
+fi
+BUILD_DIR="`pwd`/$BUILD_DIR"
+echo "build dir: $BUILD_DIR"
+
+# get revision of build
+REVISION=`(cd "$SVN_REPO" && svn info | grep Revision | awk '{ print $2 }')`
+echo "SVN revision: $REVISION"
+
+# create build src dir
+echo "creating dir $BUILD_DIR"
+mkdir -p "$BUILD_DIR"
+if [ ! -d "$BUILD_DIR" ]; then
+ echo "ERROR: can't creat dir!"
+ exit 1
+fi
+
+# export fresh source
+SRC_DIR="$BUILD_DIR/src"
+echo "exporting src $SRC_DIR"
+svn export "$SVN_REPO" "$SRC_DIR"
+if [ $? != 0 ]; then
+ echo "ERROR: export faild!"
+ exit 1
+fi
+
+# patch BUILD version if doing snapshot
+if [ $SNAPSHOT = 1 ]; then
+ # tag
+ DATE=`date '+%Y%m%d'`
+ TAG="-r${REVISION}_$DATE"
+
+ # patch VICE_VERSION_BUILD
+ echo "patching configure.in: $TAG"
+ PATCH_VVB="$SRC_DIR/configure.in"
+ perl -pi -e "s/(VICE_VERSION_BUILD=\d+).*\$/\$1$TAG/" $PATCH_VVB
+ if [ $? != 0 ]; then
+ echo "ERROR: patching..."
+ exit 1
+ fi
+fi
+
+# configure snapshot
+echo "configuring new source tree"
+(cd "$SRC_DIR/src/resid" && aclocal && automake && autoconf) >/dev/null 2>&1
+if [ $? != 0 ]; then
+ echo "ERROR: configuring resid..."
+ exit 1
+fi
+(cd "$SRC_DIR" && aclocal && autoheader && automake --add-missing && autoconf) >/dev/null 2>&1
+if [ $? != 0 ]; then
+ echo "ERROR: configuring VICE..."
+ exit 1
+fi
+
+# build dists
+ARCH="$4"
+if [ "x$ARCH" = "x" ]; then
+ ARCH="ub"
+fi
+UI="$5"
+if [ "x$UI" = "x" ]; then
+ UI="x11 gtk cocoa"
+fi
+if [ "$UI" != "none" ]; then
+ echo "--- binaries for $UI ---"
+ for dist in $UI ; do
+ echo "building binaries for $dist/$ARCH"
+ LOG="$BUILD_DIR/build-$dist.log"
+ (cd "$SRC_DIR" && $BASH build/macosx/build-vice-dist.sh $ARCH $dist dmg "$EXTLIB" "$BUILD_DIR") >"$LOG" 2>&1
+ FILES="$(ls $BUILD_DIR/$dist/$ARCH/*.dmg 2>/dev/null)"
+ echo "generated files: $FILES"
+ if [ "x$FILES" = "x" ]; then
+ echo "no file found!"
+ exit 1
+ fi
+ grep +++ "$LOG"
+ du -sh "$FILES"
+ mv "$FILES" "$BUILD_DIR"
+ done
+fi
+
+# packing source
+echo "--- source ---"
+echo "packing source"
+DEST_DIR="$BUILD_DIR/tarball"
+mkdir "$DEST_DIR"
+if [ ! -d "$DEST_DIR" ]; then
+ echo "ERROR: creating dir"
+ exit 1
+fi
+(cd "$DEST_DIR" && $SRC_DIR/configure && make dist) >/dev/null 2>&1
+FILES="$(ls $DEST_DIR/*.tar.gz 2>/dev/null)"
+echo "generated: $FILES"
+du -sh "$FILES"
+mv "$FILES" "$BUILD_DIR"
+
+echo "--- ready ---"
+exit 0
Property changes on: branches/chris/cocoa-port/vice/build/macosx/build-vice-release.sh
___________________________________________________________________
Name: svn:executable
+ *
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|