[81029] trunk/dports/devel
Ryan Schmidt
ryandesign at macports.org
Sat Jul 23 21:02:38 PDT 2011
On Jul 23, 2011, at 15:59, ciserlohn at macports.org wrote:
> Revision: 81029
> http://trac.macports.org/changeset/81029
> Author: ciserlohn at macports.org
> Date: 2011-07-23 13:59:02 -0700 (Sat, 23 Jul 2011)
> Log Message:
> -----------
> new port: npm - node package manager
Thanks for adding npm! In the time since I installed it manually, it's apparently jumped 7 minor versions already and I didn't know it. Now I can keep it up to date with MacPorts. :)
> Added Paths:
> -----------
> trunk/dports/devel/npm/
> trunk/dports/devel/npm/Portfile
>
> Added: trunk/dports/devel/npm/Portfile
> ===================================================================
> --- trunk/dports/devel/npm/Portfile (rev 0)
> +++ trunk/dports/devel/npm/Portfile 2011-07-23 20:59:02 UTC (rev 81029)
> @@ -0,0 +1,46 @@
> +# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
> +# $Id$
> +
> +PortSystem 1.0
> +
> +name npm
> +version 1.0.20
> +categories devel
> +platforms darwin
> +license MIT
> +maintainers ciserlohn
> +
> +description node package manager
> +long_description npm is a package manager for node. \
> + You can use it to install and publish your node programs. \
> + It manages dependencies and does other cool stuff.
> +
> +homepage http://www.npmjs.org/
> +
> +master_sites https://github.com/isaacs/npm/tarball/v${version}
> +
> +fetch.type git
> +git.url http://github.com/isaacs/npm.git
> +git.branch v${version}
Why fetch from git and not from the above tarball?
> +depends_lib port:nodejs
> +
> +use_configure no
> +
> +post-fetch {
> + system "cd ${worksrcpath} && git submodule update --init --recursive"
> +}
> +
> +build {}
"use_configure no" and "build {}" strongly suggest to me that this port needs "supported_archs noarch".
> +destroot {
> + system "cd ${destroot}/${prefix}/lib && node ${worksrcpath}/cli.js install ${worksrcpath}"
There should not be a / before ${prefix}; ${prefix} already begins with /
> + ln -s ${prefix}/lib/node_modules/.bin/npm ${destroot}${prefix}/bin
> + ln -s ${prefix}/lib/node_modules/.bin/npm_g ${destroot}${prefix}/bin
> + ln -s ${prefix}/lib/node_modules/.bin/npm-g ${destroot}${prefix}/bin
> +
> + foreach f [glob -tails -directory ${worksrcpath}/man1 *] {
> + copy ${worksrcpath}/man1/$f ${destroot}${prefix}/share/man/man1/npm-$f
> + }
> +}
The port's livecheck doesn't work.
$ port livecheck npm
Error: cannot check if npm was updated (The requested URL returned error: 406)
More information about the macports-dev
mailing list