X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;ds=sidebyside;f=ext%2Fosx%2Fbldmacpkg;fp=ext%2Fosx%2Fbldmacpkg;h=ee34f28ca3170bcbe091fad31f1d484735f81e46;hb=d1f1649ba43c5cbc43c4beb2380096ba051d646a;hp=6f3dc5fe68738337e21f8863641a6abb0391e301;hpb=8a3fe7daeecccf43dd71c59371c5005400d35101;p=packages%2Fprecise%2Fmcollective.git diff --git a/ext/osx/bldmacpkg b/ext/osx/bldmacpkg index 6f3dc5f..ee34f28 100644 --- a/ext/osx/bldmacpkg +++ b/ext/osx/bldmacpkg @@ -1,133 +1,147 @@ -#!/bin/bash - -MPATH='' -BETCDIR='/etc/mcollective' -BRUBYDIR='/Library/Ruby/Site/1.8' -BSBINDIR='/usr/sbin' -BBINDIR='/usr/bin' -BLIBEXECDIR='/usr/libexec/mcollective' -BDOCDIR='/usr/share/doc/mcollective' -BLAUNCHDIR='/Library/LaunchDaemons' - -if [ -z $1 ]; then - echo 'Please give the path to the MCollective source directory' - exit 1 -else - MPATH=$1 -fi - -function msg_stomp { - echo 'It is recommended to install stomp on this system using ruby gems' - exit 2 -} - -function msg_xcode { - echo 'It is required to have the latest XCode installed' - exit 3 -} - -#Make sure we have stomp so we can load mcollective -/usr/bin/ruby < $tmpdir/$BLAUNCHDIR/org.marionette-collective.mcollective.plist < - - - - EnvironmentVariables - - PATH - /sbin:/usr/sbin:/bin:/usr/bin - RUBYLIB - /Library/Ruby/Site/1.8 - - Label - org.marionette-collective.mcollective - OnDemand - - KeepAlive - - ProgramArguments - - /usr/sbin/mcollectived - --config=/etc/mcollective/server.cfg - - RunAtLoad - - ServiceDescription - MCollective Server - ServiceIPC - - - -EOF - -#launchd complains if the permissions aren't right -chmod 644 $tmpdir/$BLAUNCHDIR/org.marionette-collective.mcollective.plist - -#Make our Packages. This requires XCode be installed -/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker -r $tmpdir --version $mcversion --title "MCollective" -l / -o MCollective_$mcversion.pkg -i org.marionette-collective.mcollective -/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker -r $common_tmpdir --version $mcversion --title "MCollective Common" -l / -o MCollective-Common_$mcversion.pkg -i org.marionette-collective.mcollective-common -/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker -r $client_tmpdir --version $mcversion --title "MCollective Client" -l / -o MCollective-Client_$mcversion.pkg -i org.marionette-collective.mcollective-client - -#Clean up -rm -rf $tmpdir -rm -rf $common_tmpdir -rm -rf $client_tmpdir +#!/bin/bash +MPATH="$1" +BETCDIR='/etc/mcollective' +BRUBYDIR='/Library/Ruby/Site/1.8' +BSBINDIR='/usr/sbin' +BBINDIR='/usr/bin' +BLIBEXECDIR='/usr/libexec/mcollective' +BDOCDIR='/usr/share/doc/mcollective' +BLAUNCHDIR='/Library/LaunchDaemons' +BLOGDIR='/var/log/mcollective' +PACKAGEMAKER='/Applications/PackageMaker.app/Contents/MacOS/PackageMaker' + +if [ -z $MPATH ]; then + echo 'Please give the path to the MCollective source directory' + exit 1 +fi + +msg_stomp() { + echo "It is recommended to install stomp on this system using ruby gems" + exit 2 +} + +msg_xcode() { + echo 'It is required to have the latest XCode installed' + exit 3 +} + +# Make sure we have stomp so we can load mcollective +/usr/bin/ruby < $tmpdir/$BLAUNCHDIR/org.marionette-collective.mcollective.plist < + + + + EnvironmentVariables + + PATH + /sbin:/usr/sbin:/bin:/usr/bin + RUBYLIB + /Library/Ruby/Site/1.8 + + Label + org.marionette-collective.mcollective + OnDemand + + KeepAlive + + ProgramArguments + + /usr/sbin/mcollectived + --config=/etc/mcollective/server.cfg + + RunAtLoad + + ServiceDescription + MCollective Server + ServiceIPC + + + +EOF + + +#Make our Packages. This requires XCode be installed +$PACKAGEMAKER -r $tmpdir --version $mcversion --title "MCollective" -l / -o $pkgdir/MCollective_$mcversion.pkg -i org.marionette-collective.mcollective +$PACKAGEMAKER -r $common_tmpdir --version $mcversion --title "MCollective Common" -l / -o $pkgdir/MCollective-Common_$mcversion.pkg -i org.marionette-collective.mcollective-common +$PACKAGEMAKER -r $client_tmpdir --version $mcversion --title "MCollective Client" -l / -o $pkgdir/MCollective-Client_$mcversion.pkg -i org.marionette-collective.mcollective-client + +# Make sure that we install the stomp gem, this is ugly and should be part of the package +cat - > $pkgdir/MCollective-Common_$mcversion.pkg/Contents/Resources/postflight < $pkgdir/MCollective_$mcversion.pkg/Contents/Resources/postflight <