X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=ext%2Fosx%2Fbldmacpkg;fp=ext%2Fosx%2Fbldmacpkg;h=6f3dc5fe68738337e21f8863641a6abb0391e301;hb=b87d2f4e68281062df1913440ca5753ae63314a9;hp=0000000000000000000000000000000000000000;hpb=ab0ea530b8ac956091f17b104ab2311336cfc250;p=packages%2Fprecise%2Fmcollective.git diff --git a/ext/osx/bldmacpkg b/ext/osx/bldmacpkg new file mode 100644 index 0000000..6f3dc5f --- /dev/null +++ b/ext/osx/bldmacpkg @@ -0,0 +1,133 @@ +#!/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