diff --git a/Makefile b/Makefile index 5a320c2a4129ae..763a397079b532 100644 --- a/Makefile +++ b/Makefile @@ -324,6 +324,9 @@ TARNAME=node-$(FULLVERSION) TARBALL=$(TARNAME).tar BINARYNAME=$(TARNAME)-$(OSTYPE)-$(ARCH) BINARYTAR=$(BINARYNAME).tar +# OSX doesn't have xz installed by default, http://macpkg.sourceforge.net/ +XZ=$(shell which xz > /dev/null 2>&1; echo $$?) +XZ_COMPRESSION ?= 9 PKG=$(TARNAME).pkg PACKAGEMAKER ?= /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker PKGDIR=out/dist-osx @@ -397,7 +400,11 @@ $(TARBALL): release-only node doc find $(TARNAME)/ -type l | xargs rm # annoying on windows tar -cf $(TARNAME).tar $(TARNAME) rm -rf $(TARNAME) - gzip -f -9 $(TARNAME).tar + gzip -c -f -9 $(TARNAME).tar > $(TARNAME).tar.gz +ifeq ($(XZ), 0) + xz -c -f -$(XZ_COMPRESSION) $(TARNAME).tar > $(TARNAME).tar.xz +endif + rm $(TARNAME).tar tar: $(TARBALL) @@ -406,6 +413,11 @@ tar-upload: tar chmod 664 node-$(FULLVERSION).tar.gz scp -p node-$(FULLVERSION).tar.gz $(STAGINGSERVER):nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/node-$(FULLVERSION).tar.gz ssh $(STAGINGSERVER) "touch nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/node-$(FULLVERSION).tar.gz.done" +ifeq ($(XZ), 0) + chmod 664 node-$(FULLVERSION).tar.xz + scp -p node-$(FULLVERSION).tar.xz $(STAGINGSERVER):nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/node-$(FULLVERSION).tar.xz + ssh $(STAGINGSERVER) "touch nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/node-$(FULLVERSION).tar.xz.done" +endif doc-upload: tar ssh $(STAGINGSERVER) "mkdir -p nodejs/$(DISTTYPEDIR)/$(FULLVERSION)" @@ -424,6 +436,9 @@ $(TARBALL)-headers: config.gypi release-only tar -cf $(TARNAME)-headers.tar $(TARNAME) rm -rf $(TARNAME) gzip -c -f -9 $(TARNAME)-headers.tar > $(TARNAME)-headers.tar.gz +ifeq ($(XZ), 0) + xz -c -f -$(XZ_COMPRESSION) $(TARNAME)-headers.tar > $(TARNAME)-headers.tar.xz +endif rm $(TARNAME)-headers.tar tar-headers: $(TARBALL)-headers @@ -433,6 +448,11 @@ tar-headers-upload: tar-headers chmod 664 $(TARNAME)-headers.tar.gz scp -p $(TARNAME)-headers.tar.gz $(STAGINGSERVER):nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-headers.tar.gz ssh $(STAGINGSERVER) "touch nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-headers.tar.gz.done" +ifeq ($(XZ), 0) + chmod 664 $(TARNAME)-headers.tar.xz + scp -p $(TARNAME)-headers.tar.xz $(STAGINGSERVER):nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-headers.tar.xz + ssh $(STAGINGSERVER) "touch nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-headers.tar.xz.done" +endif $(BINARYTAR): release-only rm -rf $(BINARYNAME) @@ -445,7 +465,11 @@ $(BINARYTAR): release-only cp ChangeLog $(BINARYNAME) tar -cf $(BINARYNAME).tar $(BINARYNAME) rm -rf $(BINARYNAME) - gzip -f -9 $(BINARYNAME).tar + gzip -c -f -9 $(BINARYNAME).tar > $(BINARYNAME).tar.gz +ifeq ($(XZ), 0) + xz -c -f -$(XZ_COMPRESSION) $(BINARYNAME).tar > $(BINARYNAME).tar.xz +endif + rm $(BINARYNAME).tar binary: $(BINARYTAR) @@ -454,6 +478,11 @@ binary-upload-arch: binary chmod 664 node-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.gz scp -p node-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.gz $(STAGINGSERVER):nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/node-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.gz ssh $(STAGINGSERVER) "touch nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/node-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.gz.done" +ifeq ($(XZ), 0) + chmod 664 node-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.xz + scp -p node-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.xz $(STAGINGSERVER):nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/node-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.xz + ssh $(STAGINGSERVER) "touch nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/node-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.xz.done" +endif ifeq ($(OSTYPE),darwin) binary-upload: