Skip to content

Commit f1b878c

Browse files
committed
build: add pkgsrc rule
1 parent 4d13fcf commit f1b878c

3 files changed

Lines changed: 28 additions & 1 deletion

File tree

Makefile

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,8 @@ docopen: out/doc/api/all.html
207207
docclean:
208208
-rm -rf out/doc
209209

210-
VERSION=v$(shell $(PYTHON) tools/getnodeversion.py)
210+
RAWVER=$(shell $(PYTHON) tools/getnodeversion.py)
211+
VERSION=v$(RAWVER)
211212
RELEASE=$(shell $(PYTHON) tools/getnodeisrelease.py)
212213
PLATFORM=$(shell uname | tr '[:upper:]' '[:lower:]')
213214
ifeq ($(findstring x86_64,$(shell uname -m)),x86_64)
@@ -235,6 +236,11 @@ BINARYTAR=$(BINARYNAME).tar.gz
235236
PKG=out/$(TARNAME).pkg
236237
packagemaker=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
237238

239+
PKGSRC=nodejs-$(DESTCPU)-$(RAWVER).tgz
240+
ifdef NIGHTLY
241+
PKGSRC=nodejs-$(DESTCPU)-$(RAWVER)-$(TAG).tgz
242+
endif
243+
238244
dist: doc $(TARBALL) $(PKG)
239245

240246
PKGDIR=out/dist-osx
@@ -312,6 +318,19 @@ $(BINARYTAR): release-only
312318

313319
binary: $(BINARYTAR)
314320

321+
$(PKGSRC): release-only
322+
rm -rf dist out
323+
$(PYTHON) configure --prefix=/ --without-snapshot \
324+
--dest-cpu=$(DESTCPU) --tag=$(TAG) $(CONFIG_FLAGS)
325+
$(MAKE) install DESTDIR=dist
326+
(cd dist; find * -type f | sort) > packlist
327+
pkg_info -X pkg_install | \
328+
egrep '^(MACHINE_ARCH|OPSYS|OS_VERSION|PKGTOOLS_VERSION)' > build-info
329+
pkg_create -B build-info -c tools/pkgsrc/comment -d tools/pkgsrc/description \
330+
-f packlist -I /opt/local -p dist -U $(PKGSRC)
331+
332+
pkgsrc: $(PKGSRC)
333+
315334
dist-upload: $(TARBALL) $(PKG)
316335
ssh node@nodejs.org mkdir -p web/nodejs.org/dist/$(VERSION)
317336
scp $(TARBALL) node@nodejs.org:~/web/nodejs.org/dist/$(VERSION)/$(TARBALL)

tools/pkgsrc/comment

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
V8 JavaScript for clients and servers (nodejs.org package)

tools/pkgsrc/description

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Node.js is an evented I/O framework for the V8 JavaScript engine. It is
2+
intended for writing scalable network programs such as web servers.
3+
4+
Packaged by nodejs.org
5+
6+
Homepage:
7+
http://nodejs.org/

0 commit comments

Comments
 (0)