Fixes #2084. Makeify tools/osx-dist.sh
authorRyan Dahl <ry@tinyclouds.org>
Mon, 21 Nov 2011 03:22:30 +0000 (19:22 -0800)
committerRyan Dahl <ry@tinyclouds.org>
Mon, 21 Nov 2011 03:22:30 +0000 (19:22 -0800)
Makefile
tools/osx-dist.sh [deleted file]
tools/osx-pkg.pmdoc/01local.xml

index 18e3d4f..16c035f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -132,14 +132,25 @@ check:
 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 -
diff --git a/tools/osx-dist.sh b/tools/osx-dist.sh
deleted file mode 100755 (executable)
index 496aead..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/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
index 91e2156..a4b48a8 100644 (file)
@@ -1 +1 @@
-<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