On Aug 14, 2005, at 1:18 PM, Ben Willmore wrote:
I think a better solution would be for Fink detect the version of XCode that is being used, and explicitly make that information available in a % expansion,

I don't think it's necessarily a good idea to have such a specific percent expansion. But the great thing about using a shell script as your Compile/InstallScript is that you can set any shell variable you like, so if you want to detect XCode versions that's doable. See the solution Matt Sachs came up with for my osxutils package:

InstallScript: <<
        #!/bin/sh

        xcver=$(xcodebuild -version | grep DevToolsCore | \
                sed 's/.*DevToolsCore-//' | sed 's/\..*//')
        if [ -z "$xcver" ]
                then echo "Couldn't determine xcodebuild version" 2>&1
                exit 1
        elif [ $xcver -lt 620 ]
                then builddir="build"
        else
                builddir="build/Deployment"
        fi

Just copy that into your .info file, and then you can just do 'install -m 0755 $builddir/whatever %i/bin/'.

Dave

Attachment: PGP.sig
Description: This is a digitally signed message part

Reply via email to