VERSION=v$(shell python tools/getnodeversion.py)
TARNAME=node-$(VERSION)
TARBALL=$(TARNAME).tar.gz
-PKG=dist-osx/$(TARNAME).pkg
+PKG=out/$(TARNAME).pkg
+
+packagemaker=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
#dist: doc/node.1 doc/api
dist: $(TARBALL) $(PKG)
+PKGDIR=out/dist-osx
+
+pkg: $(PKG)
+
$(PKG):
- -rm -rf dist-osx
- tools/osx-dist.sh
+ -rm -rf $(PKGDIR)
+ $(WAF) configure --prefix=/usr/local
+ DESTDIR=$(PKGDIR) $(WAF) install
+ $(packagemaker) \
+ --id "org.nodejs.NodeJS-$(VERSION)" \
+ --doc tools/osx-pkg.pmdoc \
+ --out $(PKG)
$(TARBALL): out/doc
git archive --format=tar --prefix=$(TARNAME)/ HEAD | tar xf -
+++ /dev/null
-#!/bin/sh
-
-TOOLS=`dirname $0`
-ROOT=$TOOLS/..
-
-VERSION=`python $TOOLS/getnodeversion.py`
-CONTENTS=$ROOT/dist-osx
-PMDOC=$TOOLS/osx-pkg.pmdoc
-VENDOR='org.nodejs'
-NAME=NodeJS
-
-# go build it in the root of the git repository
-pushd $ROOT
-
-./configure --prefix=/usr/local
-make
-make install DESTDIR="$CONTENTS"
-
-popd # $ROOT
-
-PKGID="$VENDOR.$NAME-$VERSION"
-
-packagemaker=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
-
-$packagemaker \
- --id "$PKGID" \
- --doc $PMDOC \
- --out $CONTENTS/node-v$VERSION.pkg
-<pkgref spec="1.12" uuid="053587FE-BDF3-4EF5-815D-281427431048"><config><identifier>org.nodejs.pkg</identifier><version>1.0</version><description></description><post-install type="none"/><requireAuthorization/><installFrom relative="true" mod="true">../dist-osx/usr/local/</installFrom><installTo mod="true" relocatable="true">/usr/local</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>installTo.isRelativeType</mod><mod>installTo</mod><mod>locationType</mod><mod>relocatable</mod><mod>installFrom.path</mod><mod>installTo.isAbsoluteType</mod><mod>identifier</mod><mod>parent</mod><mod>installTo.path</mod><mod>installFrom.isRelativeType</mod></config><contents><file-list>01local-contents.xml</file-list><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref>
\ No newline at end of file
+<pkgref spec="1.12" uuid="053587FE-BDF3-4EF5-815D-281427431048"><config><identifier>org.nodejs.pkg</identifier><version>1.0</version><description></description><post-install type="none"/><requireAuthorization/><installFrom relative="true" mod="true">../out/dist-osx/usr/local/</installFrom><installTo mod="true" relocatable="true">/usr/local</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>installTo.isRelativeType</mod><mod>installTo</mod><mod>locationType</mod><mod>relocatable</mod><mod>installFrom.path</mod><mod>installTo.isAbsoluteType</mod><mod>identifier</mod><mod>parent</mod><mod>installTo.path</mod><mod>installFrom.isRelativeType</mod></config><contents><file-list>01local-contents.xml</file-list><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref>
\ No newline at end of file