aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/buildsteps/README15
-rw-r--r--tools/buildsteps/android/configure-depends15
-rw-r--r--tools/buildsteps/android/configure-xbmc5
-rw-r--r--tools/buildsteps/android/make-depends9
-rw-r--r--tools/buildsteps/android/make-xbmc5
-rw-r--r--tools/buildsteps/android/package10
-rw-r--r--tools/buildsteps/android/prepare-depends13
-rw-r--r--tools/buildsteps/android/prepare-xbmc5
-rwxr-xr-xtools/buildsteps/atv2/configure-depends13
-rwxr-xr-xtools/buildsteps/atv2/configure-xbmc5
-rwxr-xr-xtools/buildsteps/atv2/make-depends9
-rwxr-xr-xtools/buildsteps/atv2/make-xbmc8
-rwxr-xr-xtools/buildsteps/atv2/package13
-rwxr-xr-xtools/buildsteps/atv2/prepare-depends14
-rwxr-xr-xtools/buildsteps/atv2/prepare-xbmc6
-rw-r--r--tools/buildsteps/defaultenv112
-rwxr-xr-xtools/buildsteps/ios/configure-depends12
-rwxr-xr-xtools/buildsteps/ios/configure-xbmc5
-rwxr-xr-xtools/buildsteps/ios/make-depends9
-rwxr-xr-xtools/buildsteps/ios/make-xbmc9
-rwxr-xr-xtools/buildsteps/ios/package13
-rwxr-xr-xtools/buildsteps/ios/prepare-depends13
-rwxr-xr-xtools/buildsteps/ios/prepare-xbmc6
-rwxr-xr-xtools/buildsteps/osx32/configure-depends12
-rwxr-xr-xtools/buildsteps/osx32/configure-xbmc5
-rwxr-xr-xtools/buildsteps/osx32/make-depends9
-rwxr-xr-xtools/buildsteps/osx32/make-xbmc8
-rwxr-xr-xtools/buildsteps/osx32/package10
-rwxr-xr-xtools/buildsteps/osx32/prepare-depends13
-rwxr-xr-xtools/buildsteps/osx32/prepare-xbmc5
-rwxr-xr-xtools/buildsteps/osx64/configure-depends12
-rwxr-xr-xtools/buildsteps/osx64/configure-xbmc5
-rwxr-xr-xtools/buildsteps/osx64/make-depends9
-rwxr-xr-xtools/buildsteps/osx64/make-xbmc8
-rwxr-xr-xtools/buildsteps/osx64/package10
-rwxr-xr-xtools/buildsteps/osx64/prepare-depends13
-rwxr-xr-xtools/buildsteps/osx64/prepare-xbmc5
37 files changed, 448 insertions, 0 deletions
diff --git a/tools/buildsteps/README b/tools/buildsteps/README
new file mode 100644
index 0000000000..68c5354521
--- /dev/null
+++ b/tools/buildsteps/README
@@ -0,0 +1,15 @@
+This folder holds all the platform dependend build scripts which are called from the jenkins buildserver.
+
+The following ENV variables are available on all scripts:
+
+$WORKSPACE - the folder where jenkins checked out the source - XBMC_HOME so to say
+$Configuration - its either Debug, Release or Default and should be taken into account if possible (Defaults select platform default from <platformdir>/startbuild)
+$SDK_VERSION - the requested SDK_VERSION to be used for building. If "Default" is passed it uses the platform default from <platformdir>/startbuild
+$BUILDTHREADS - number of threads which can be used when building (e.x. use it for make -j$BUILDTHREADS)
+$XBMC_DEPENDS_ROOT - root for installing the xbmc build depends and toolchain helpers. If "Default" is passed it uses the platform default from <platformdir>/startbuild
+
+Additional ENV variables might be specified by the buildnodes. For android buildslaves these are:
+
+TOOLCHAIN - the used toolchain dir
+NDK_PATH - the path to the android native ndk
+SDK_PATH - the path to the android sdk \ No newline at end of file
diff --git a/tools/buildsteps/android/configure-depends b/tools/buildsteps/android/configure-depends
new file mode 100644
index 0000000000..13ab6cdd53
--- /dev/null
+++ b/tools/buildsteps/android/configure-depends
@@ -0,0 +1,15 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=android
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ cd $WORKSPACE/tools/depends;./configure \
+ --with-tarballs=/opt/xbmc-tarballs \
+ --host=arm-linux-androideabi \
+ --with-sdk-path=$SDK_PATH \
+ --with-ndk=$NDK_PATH \
+ --with-sdk=android-$SDK_VERSION \
+ --with-toolchain=$TOOLCHAIN \
+ --prefix=$XBMC_DEPENDS_ROOT
+fi
diff --git a/tools/buildsteps/android/configure-xbmc b/tools/buildsteps/android/configure-xbmc
new file mode 100644
index 0000000000..afdd82a1d9
--- /dev/null
+++ b/tools/buildsteps/android/configure-xbmc
@@ -0,0 +1,5 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=android
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+make -C $WORKSPACE/tools/depends/target/xbmc
diff --git a/tools/buildsteps/android/make-depends b/tools/buildsteps/android/make-depends
new file mode 100644
index 0000000000..2deb44a7cb
--- /dev/null
+++ b/tools/buildsteps/android/make-depends
@@ -0,0 +1,9 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=android
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ cd $WORKSPACE/tools/depends;make -j $BUILDTHREADS && tagSuccessFulBuild .
+fi
+
diff --git a/tools/buildsteps/android/make-xbmc b/tools/buildsteps/android/make-xbmc
new file mode 100644
index 0000000000..738656fddb
--- /dev/null
+++ b/tools/buildsteps/android/make-xbmc
@@ -0,0 +1,5 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=android
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+cd $WORKSPACE;make -j$BUILDTHREADS
diff --git a/tools/buildsteps/android/package b/tools/buildsteps/android/package
new file mode 100644
index 0000000000..4708d969bb
--- /dev/null
+++ b/tools/buildsteps/android/package
@@ -0,0 +1,10 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=android
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+cd $WORKSPACE;make apk
+
+#rename for upload
+#e.x. xbmc-20130314-8c2fb31-Frodo-armeabi-v7a.apk
+UPLOAD_FILENAME="xbmc-$(getBuildRevDateStr)-armeabi-v7a.apk"
+mv xbmcapp-armeabi-*.apk $UPLOAD_FILENAME
diff --git a/tools/buildsteps/android/prepare-depends b/tools/buildsteps/android/prepare-depends
new file mode 100644
index 0000000000..8aabe48b7c
--- /dev/null
+++ b/tools/buildsteps/android/prepare-depends
@@ -0,0 +1,13 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=android
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#clean without depends for skipping depends build if possible
+cd $WORKSPACE;git clean -xfd -e "tools/depends"
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ #clean up the rest too
+ cd $WORKSPACE;git clean -xfd
+ cd $WORKSPACE/tools/depends/;./bootstrap
+fi
diff --git a/tools/buildsteps/android/prepare-xbmc b/tools/buildsteps/android/prepare-xbmc
new file mode 100644
index 0000000000..020bc03022
--- /dev/null
+++ b/tools/buildsteps/android/prepare-xbmc
@@ -0,0 +1,5 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=android
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#nothing on android
diff --git a/tools/buildsteps/atv2/configure-depends b/tools/buildsteps/atv2/configure-depends
new file mode 100755
index 0000000000..f7b998b397
--- /dev/null
+++ b/tools/buildsteps/atv2/configure-depends
@@ -0,0 +1,13 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=atv2
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ cd $WORKSPACE/tools/depends;./configure \
+ --with-tarballs=/Users/Shared/xbmc-depends/tarballs \
+ --host=arm-apple-darwin \
+ --with-sdk=$SDK_VERSION \
+ --prefix=$XBMC_DEPENDS_ROOT
+fi
+
diff --git a/tools/buildsteps/atv2/configure-xbmc b/tools/buildsteps/atv2/configure-xbmc
new file mode 100755
index 0000000000..04acb68955
--- /dev/null
+++ b/tools/buildsteps/atv2/configure-xbmc
@@ -0,0 +1,5 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=atv2
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+make -C $WORKSPACE/tools/depends/target/xbmc
diff --git a/tools/buildsteps/atv2/make-depends b/tools/buildsteps/atv2/make-depends
new file mode 100755
index 0000000000..a633bb621a
--- /dev/null
+++ b/tools/buildsteps/atv2/make-depends
@@ -0,0 +1,9 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=atv2
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ cd $WORKSPACE/tools/depends;make -j $BUILDTHREADS && tagSuccessFulBuild .
+fi
+
diff --git a/tools/buildsteps/atv2/make-xbmc b/tools/buildsteps/atv2/make-xbmc
new file mode 100755
index 0000000000..743db59d11
--- /dev/null
+++ b/tools/buildsteps/atv2/make-xbmc
@@ -0,0 +1,8 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=atv2
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+cd $WORKSPACE;make -j$BUILDTHREADS xcode_depends
+cd $WORKSPACE;xcodebuild -project XBMC-ATV2.xcodeproj -target XBMC -configuration $Configuration build \
+ ONLY_ACTIVE_ARCH=YES ARCHS=armv7 VALID_ARCHS=armv7 IPHONEOS_DEPLOYMENT_TARGET=4.1 \
+ SDKROOT=iphoneos$SDK_VERSION XBMC_DEPENDS_ROOT=$XBMC_DEPENDS_ROOT
diff --git a/tools/buildsteps/atv2/package b/tools/buildsteps/atv2/package
new file mode 100755
index 0000000000..d357e36b0c
--- /dev/null
+++ b/tools/buildsteps/atv2/package
@@ -0,0 +1,13 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=atv2
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#ensure that dpkg tools are used from our toolchain
+export PATH=$XBMC_DEPENDS_ROOT/buildtools-native/bin/:$PATH
+
+cd $WORKSPACE/tools/darwin/packaging/xbmc-atv2/;./mkdeb-xbmc-atv2.sh $Configuration
+
+#rename for upload
+#e.x. xbmc-20130314-8c2fb31-Frodo-atv2.deb
+UPLOAD_FILENAME="xbmc-$(getBuildRevDateStr)-atv2.deb"
+mv *.deb $UPLOAD_FILENAME
diff --git a/tools/buildsteps/atv2/prepare-depends b/tools/buildsteps/atv2/prepare-depends
new file mode 100755
index 0000000000..dad9176ea2
--- /dev/null
+++ b/tools/buildsteps/atv2/prepare-depends
@@ -0,0 +1,14 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=atv2
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#clean without depends for skipping depends build if possible
+cd $WORKSPACE;git clean -xfd -e "tools/depends"
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ #clean up the rest too
+ cd $WORKSPACE;git clean -xfd
+ cd $WORKSPACE/tools/depends/;./bootstrap
+fi
+
diff --git a/tools/buildsteps/atv2/prepare-xbmc b/tools/buildsteps/atv2/prepare-xbmc
new file mode 100755
index 0000000000..c3738f9e7a
--- /dev/null
+++ b/tools/buildsteps/atv2/prepare-xbmc
@@ -0,0 +1,6 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=atv2
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#nothing on ios
+
diff --git a/tools/buildsteps/defaultenv b/tools/buildsteps/defaultenv
new file mode 100644
index 0000000000..4754b97831
--- /dev/null
+++ b/tools/buildsteps/defaultenv
@@ -0,0 +1,112 @@
+BUILDTHREADS=${BUILDTHREADS:-1}
+SDK_VERSION=${SDK_VERSION:-"Default"}
+Configuration=${Configuration:-"Default"}
+XBMC_DEPENDS_ROOT=${XBMC_DEPENDS_ROOT:-"Default"}
+PATH_CHANGE_REV_FILENAME=".last_success_revision"
+
+#set platform defaults
+#$XBMC_PLATFORM_DIR matches the platform subdirs!
+case $XBMC_PLATFORM_DIR in
+ atv2)
+ DEFAULT_SDK_VERSION=4.2
+ DEFAULT_XBMC_DEPENDS_ROOT=$WORKSPACE/tools/depends/xbmc-depends
+ DEFAULT_CONFIGURATION="Debug"
+ ;;
+
+ ios)
+ DEFAULT_SDK_VERSION=4.2
+ DEFAULT_XBMC_DEPENDS_ROOT=$WORKSPACE/tools/depends/xbmc-depends
+ DEFAULT_CONFIGURATION="Debug"
+ ;;
+
+ osx32)
+ DEFAULT_SDK_VERSION=10.8
+ DEFAULT_XBMC_DEPENDS_ROOT=$WORKSPACE/tools/depends/xbmc-depends
+ DEFAULT_CONFIGURATION="Debug"
+ ;;
+
+ osx64)
+ DEFAULT_SDK_VERSION=10.8
+ DEFAULT_XBMC_DEPENDS_ROOT=$WORKSPACE/tools/depends/xbmc-depends
+ DEFAULT_CONFIGURATION="Debug"
+ ;;
+ android)
+ DEFAULT_SDK_VERSION=10
+ DEFAULT_XBMC_DEPENDS_ROOT=$WORKSPACE/tools/depends/xbmc-depends
+ DEFAULT_CONFIGURATION="Debug"
+esac
+
+if [ $SDK_VERSION == "Default" ]
+then
+ SDK_VERSION=$DEFAULT_SDK_VERSION
+fi
+
+if [ $XBMC_DEPENDS_ROOT == "Default" ]
+then
+ XBMC_DEPENDS_ROOT=$DEFAULT_XBMC_DEPENDS_ROOT
+fi
+
+if [ $Configuration == "Default" ]
+then
+ Configuration=$DEFAULT_CONFIGURATION
+fi
+
+#clamp release builds to 1 thread only
+if [ $Configuration == "Release" ]
+then
+ BUILDTHREADS=1
+fi
+
+#helper functions
+
+#hash a dir based on the git revision, SDK_PATH, NDK_PATH, SDK_VERSION, TOOLCHAIN and XBMC_DEPENDS_ROOT
+function getBuildHash ()
+{
+ local checkPath
+ checkPath="$1"
+ local hashStr
+ hashStr="$(git rev-list HEAD --max-count=1 -- $checkPath)"
+ hashStr="$hashStr $SDK_PATH $NDK_PATH $SDK_VERSION $TOOLCHAIN $XBMC_DEPENDS_ROOT"
+ echo $hashStr
+}
+
+function pathChanged ()
+{
+ local ret
+ local checkPath
+ ret="0"
+ #no optims in release builds!
+ if [ $Configuration == "Release" ]
+ then
+ echo "1"
+ return
+ fi
+
+ checkPath="$1"
+ if [ -e $checkPath/$PATH_CHANGE_REV_FILENAME ]
+ then
+ if [ "$(cat $checkPath/$PATH_CHANGE_REV_FILENAME)" != "$(getBuildHash $WORKSPACE/tools/depends)" ]
+ then
+ ret="1"
+ fi
+ else
+ ret="1"
+ fi
+
+ echo $ret
+}
+
+function tagSuccessFulBuild ()
+{
+ local checkPath
+ checkPath="$1"
+ echo "$(getBuildHash $checkPath)" > $checkPath/$PATH_CHANGE_REV_FILENAME
+}
+
+function getBuildRevDateStr ()
+{
+ git --no-pager log --abbrev=7 -n 1 --pretty=format:"%h %ci" HEAD | awk '{gsub("-", "");print $2"-"$1}' 2>/dev/null
+ if [ "$?" != "0" ]; then
+ echo "Unknown"
+ fi
+}
diff --git a/tools/buildsteps/ios/configure-depends b/tools/buildsteps/ios/configure-depends
new file mode 100755
index 0000000000..d09f0cb269
--- /dev/null
+++ b/tools/buildsteps/ios/configure-depends
@@ -0,0 +1,12 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=ios
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ cd $WORKSPACE/tools/depends;./configure \
+ --with-tarballs=/Users/Shared/xbmc-depends/tarballs \
+ --host=arm-apple-darwin \
+ --with-sdk=$SDK_VERSION \
+ --prefix=$XBMC_DEPENDS_ROOT
+fi
diff --git a/tools/buildsteps/ios/configure-xbmc b/tools/buildsteps/ios/configure-xbmc
new file mode 100755
index 0000000000..0ce4bf5e7a
--- /dev/null
+++ b/tools/buildsteps/ios/configure-xbmc
@@ -0,0 +1,5 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=ios
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+make -C $WORKSPACE/tools/depends/target/xbmc
diff --git a/tools/buildsteps/ios/make-depends b/tools/buildsteps/ios/make-depends
new file mode 100755
index 0000000000..d1e52dd43f
--- /dev/null
+++ b/tools/buildsteps/ios/make-depends
@@ -0,0 +1,9 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=ios
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ cd $WORKSPACE/tools/depends;make -j $BUILDTHREADS && tagSuccessFulBuild .
+fi
+
diff --git a/tools/buildsteps/ios/make-xbmc b/tools/buildsteps/ios/make-xbmc
new file mode 100755
index 0000000000..7693d21472
--- /dev/null
+++ b/tools/buildsteps/ios/make-xbmc
@@ -0,0 +1,9 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=ios
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+cd $WORKSPACE;make -j$BUILDTHREADS xcode_depends
+cd $WORKSPACE;xcodebuild -project XBMC-IOS.xcodeproj -target XBMC -configuration $Configuration build \
+ ONLY_ACTIVE_ARCH=YES ARCHS=armv7 VALID_ARCHS=armv7 IPHONEOS_DEPLOYMENT_TARGET=4.1 \
+ SDKROOT=iphoneos$SDK_VERSION XBMC_DEPENDS_ROOT=$XBMC_DEPENDS_ROOT
+
diff --git a/tools/buildsteps/ios/package b/tools/buildsteps/ios/package
new file mode 100755
index 0000000000..0b4830d139
--- /dev/null
+++ b/tools/buildsteps/ios/package
@@ -0,0 +1,13 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=ios
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#ensure that dpkg tools are used from our toolchain
+export PATH=$XBMC_DEPENDS_ROOT/buildtools-native/bin/:$PATH
+
+cd $WORKSPACE/tools/darwin/packaging/xbmc-ios/;./mkdeb-xbmc-ios.sh $Configuration
+
+#rename for upload
+#e.x. xbmc-20130314-8c2fb31-Frodo-ios.deb
+UPLOAD_FILENAME="xbmc-$(getBuildRevDateStr)-ios.deb"
+mv *.deb $UPLOAD_FILENAME
diff --git a/tools/buildsteps/ios/prepare-depends b/tools/buildsteps/ios/prepare-depends
new file mode 100755
index 0000000000..04c1cb1119
--- /dev/null
+++ b/tools/buildsteps/ios/prepare-depends
@@ -0,0 +1,13 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=ios
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#clean without depends for skipping depends build if possible
+cd $WORKSPACE;git clean -xfd -e "tools/depends"
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ #clean up the rest too
+ cd $WORKSPACE;git clean -xfd
+ cd $WORKSPACE/tools/depends/;./bootstrap
+fi
diff --git a/tools/buildsteps/ios/prepare-xbmc b/tools/buildsteps/ios/prepare-xbmc
new file mode 100755
index 0000000000..4b75e9158a
--- /dev/null
+++ b/tools/buildsteps/ios/prepare-xbmc
@@ -0,0 +1,6 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=ios
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#nothing on ios
+
diff --git a/tools/buildsteps/osx32/configure-depends b/tools/buildsteps/osx32/configure-depends
new file mode 100755
index 0000000000..3ccfc3553c
--- /dev/null
+++ b/tools/buildsteps/osx32/configure-depends
@@ -0,0 +1,12 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx32
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ cd $WORKSPACE/tools/depends;./configure \
+ --with-tarballs=/Users/Shared/xbmc-depends/tarballs \
+ --host=i386-apple-darwin \
+ --with-sdk=$SDK_VERSION \
+ --prefix=$XBMC_DEPENDS_ROOT
+fi
diff --git a/tools/buildsteps/osx32/configure-xbmc b/tools/buildsteps/osx32/configure-xbmc
new file mode 100755
index 0000000000..b7456ca4fd
--- /dev/null
+++ b/tools/buildsteps/osx32/configure-xbmc
@@ -0,0 +1,5 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx32
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+make -C $WORKSPACE/tools/depends/target/xbmc
diff --git a/tools/buildsteps/osx32/make-depends b/tools/buildsteps/osx32/make-depends
new file mode 100755
index 0000000000..e4d4d3030d
--- /dev/null
+++ b/tools/buildsteps/osx32/make-depends
@@ -0,0 +1,9 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx32
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ cd $WORKSPACE/tools/depends;make -j $BUILDTHREADS && tagSuccessFulBuild .
+fi
+
diff --git a/tools/buildsteps/osx32/make-xbmc b/tools/buildsteps/osx32/make-xbmc
new file mode 100755
index 0000000000..f93348ba7c
--- /dev/null
+++ b/tools/buildsteps/osx32/make-xbmc
@@ -0,0 +1,8 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx32
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+cd $WORKSPACE;make -j$BUILDTHREADS xcode_depends
+
+cd $WORKSPACE;xcodebuild -sdk macosx$SDK_VERSION -project XBMC.xcodeproj -target XBMC.app ONLY_ACTIVE_ARCH=YES \
+ ARCHS=i386 VALID_ARCHS=i386 XBMC_DEPENDS_ROOT=$XBMC_DEPENDS_ROOT -configuration $Configuration build
diff --git a/tools/buildsteps/osx32/package b/tools/buildsteps/osx32/package
new file mode 100755
index 0000000000..5bce61925a
--- /dev/null
+++ b/tools/buildsteps/osx32/package
@@ -0,0 +1,10 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx32
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+cd $WORKSPACE/tools/darwin/packaging/xbmc-osx/;./mkdmg-xbmc-osx.sh $Configuration
+
+#rename for upload
+#e.x. xbmc-20130314-8c2fb31-Frodo-i386.dmg
+UPLOAD_FILENAME="xbmc-$(getBuildRevDateStr)-i386.dmg"
+mv *.dmg $UPLOAD_FILENAME
diff --git a/tools/buildsteps/osx32/prepare-depends b/tools/buildsteps/osx32/prepare-depends
new file mode 100755
index 0000000000..94afa213bd
--- /dev/null
+++ b/tools/buildsteps/osx32/prepare-depends
@@ -0,0 +1,13 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx32
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#clean without depends for skipping depends build if possible
+cd $WORKSPACE;git clean -xfd -e "tools/depends"
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ #clean up the rest too
+ cd $WORKSPACE;git clean -xfd
+ cd $WORKSPACE/tools/depends/;./bootstrap
+fi
diff --git a/tools/buildsteps/osx32/prepare-xbmc b/tools/buildsteps/osx32/prepare-xbmc
new file mode 100755
index 0000000000..01f97dac74
--- /dev/null
+++ b/tools/buildsteps/osx32/prepare-xbmc
@@ -0,0 +1,5 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx32
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#nothing on osx
diff --git a/tools/buildsteps/osx64/configure-depends b/tools/buildsteps/osx64/configure-depends
new file mode 100755
index 0000000000..62f97700b3
--- /dev/null
+++ b/tools/buildsteps/osx64/configure-depends
@@ -0,0 +1,12 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx64
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ cd $WORKSPACE/tools/depends;./configure \
+ --with-tarballs=/Users/Shared/xbmc-depends/tarballs \
+ --host=x86_64-apple-darwin \
+ --with-sdk=$SDK_VERSION \
+ --prefix=$XBMC_DEPENDS_ROOT
+fi
diff --git a/tools/buildsteps/osx64/configure-xbmc b/tools/buildsteps/osx64/configure-xbmc
new file mode 100755
index 0000000000..92e13e24e6
--- /dev/null
+++ b/tools/buildsteps/osx64/configure-xbmc
@@ -0,0 +1,5 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx64
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+make -C $WORKSPACE/tools/depends/target/xbmc
diff --git a/tools/buildsteps/osx64/make-depends b/tools/buildsteps/osx64/make-depends
new file mode 100755
index 0000000000..11a62bf470
--- /dev/null
+++ b/tools/buildsteps/osx64/make-depends
@@ -0,0 +1,9 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx64
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ cd $WORKSPACE/tools/depends;make -j $BUILDTHREADS && tagSuccessFulBuild .
+fi
+
diff --git a/tools/buildsteps/osx64/make-xbmc b/tools/buildsteps/osx64/make-xbmc
new file mode 100755
index 0000000000..421613e5e3
--- /dev/null
+++ b/tools/buildsteps/osx64/make-xbmc
@@ -0,0 +1,8 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx64
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+cd $WORKSPACE;make -j$BUILDTHREADS xcode_depends
+
+cd $WORKSPACE;xcodebuild -sdk macosx$SDK_VERSION -project XBMC.xcodeproj -target XBMC.app ONLY_ACTIVE_ARCH=YES \
+ ARCHS=x86_64 VALID_ARCHS=x86_64 XBMC_DEPENDS_ROOT=$XBMC_DEPENDS_ROOT -configuration $Configuration build
diff --git a/tools/buildsteps/osx64/package b/tools/buildsteps/osx64/package
new file mode 100755
index 0000000000..ac50195325
--- /dev/null
+++ b/tools/buildsteps/osx64/package
@@ -0,0 +1,10 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx64
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+cd $WORKSPACE/tools/darwin/packaging/xbmc-osx/;./mkdmg-xbmc-osx.sh $Configuration
+
+#rename for upload
+#e.x. xbmc-20130314-8c2fb31-Frodo-x86_64.dmg
+UPLOAD_FILENAME="xbmc-$(getBuildRevDateStr)-x86_64.dmg"
+mv *.dmg $UPLOAD_FILENAME
diff --git a/tools/buildsteps/osx64/prepare-depends b/tools/buildsteps/osx64/prepare-depends
new file mode 100755
index 0000000000..8fed8fd084
--- /dev/null
+++ b/tools/buildsteps/osx64/prepare-depends
@@ -0,0 +1,13 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx64
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#clean without depends for skipping depends build if possible
+cd $WORKSPACE;git clean -xfd -e "tools/depends"
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ #clean up the rest too
+ cd $WORKSPACE;git clean -xfd
+ cd $WORKSPACE/tools/depends/;./bootstrap
+fi
diff --git a/tools/buildsteps/osx64/prepare-xbmc b/tools/buildsteps/osx64/prepare-xbmc
new file mode 100755
index 0000000000..6eea638e97
--- /dev/null
+++ b/tools/buildsteps/osx64/prepare-xbmc
@@ -0,0 +1,5 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx64
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#nothing on osx