2010-01-26 20:48:51 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
TOOLS=`dirname $0`
|
|
|
|
ROOT=$TOOLS/..
|
|
|
|
|
2011-11-11 21:08:24 +01:00
|
|
|
VERSION=`python $TOOLS/getnodeversion.py`
|
2011-11-11 03:16:51 +01:00
|
|
|
CONTENTS=$ROOT/dist-osx
|
|
|
|
PMDOC=$TOOLS/osx-pkg.pmdoc
|
|
|
|
VENDOR='org.nodejs'
|
|
|
|
NAME=NodeJS
|
2010-01-26 20:48:51 +01:00
|
|
|
|
|
|
|
# go build it in the root of the git repository
|
|
|
|
pushd $ROOT
|
|
|
|
|
2011-11-11 03:16:51 +01:00
|
|
|
./configure --prefix=/usr/local
|
2010-01-26 20:48:51 +01:00
|
|
|
make
|
|
|
|
make install DESTDIR="$CONTENTS"
|
|
|
|
|
|
|
|
popd # $ROOT
|
|
|
|
|
2011-11-11 03:16:51 +01:00
|
|
|
PKGID="$VENDOR.$NAME-$VERSION"
|
|
|
|
|
|
|
|
packagemaker=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
|
|
|
|
|
|
|
|
$packagemaker \
|
|
|
|
--id "$PKGID" \
|
|
|
|
--doc $PMDOC \
|
2011-11-11 23:02:42 +01:00
|
|
|
--out $CONTENTS/node-v$VERSION.pkg
|