source: trunk/dports/devel/npm/Portfile @ 95465

Last change on this file since 95465 was 95465, checked in by ciserlohn@…, 8 years ago

npm: update to version 1.1.41

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.1 KB
Line 
1# -*- 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
2# $Id: Portfile 95465 2012-07-13 18:52:15Z ciserlohn@macports.org $
3
4PortSystem          1.0
5
6name                npm
7version             1.1.41
8categories          devel
9platforms           darwin
10license             MIT
11maintainers         ciserlohn
12
13supported_archs     noarch
14
15description         node package manager
16long_description    npm is a package manager for node. \
17                    You can use it to install and publish your node programs. \
18                            It manages dependencies and does other cool stuff.
19
20homepage            http://www.npmjs.org/
21
22master_sites        http://registry.npmjs.org/npm/-/
23
24extract.suffix      .tgz
25
26checksums           rmd160  2c77c76dc27945e2f42abcf3548ec34f16390200 \
27                    sha256  a8a478bba2f2707513ef820c6ea8cb97905cd1ddefa2e4206c42aed6911a8491
28
29worksrcdir          "package"
30
31depends_lib         path:bin/node:nodejs
32
33use_configure       no
34
35patchfiles          patch-lib-update.js
36
37post-patch {
38    regsub -all {/} "^${prefix}/(bin/npm\\|lib/node_modules/npm)+" {\\\/} npm_path_jsregex
39    reinplace "s|@@NPM_PATH_JSREGEX@@|${npm_path_jsregex}|g" ${worksrcpath}/lib/update.js
40}
41
42build {}
43
44destroot.cmd        ${prefix}/bin/node ./cli.js
45destroot.args       --global .
46destroot.destdir    --prefix=${destroot}${prefix}
47
48post-destroot {
49    delete ${destroot}${prefix}/bin/npm
50    ln -sf ${prefix}/lib/node_modules/npm/bin/npm-cli.js ${destroot}${prefix}/bin/npm
51}
52
53variant bash_completion {
54    depends_run-append path:etc/bash_completion:bash-completion
55    post-destroot {
56        xinstall -d ${destroot}${prefix}/etc/bash_completion.d
57        ln -sf ${prefix}/lib/node_modules/npm/lib/utils/completion.sh ${destroot}${prefix}/etc/bash_completion.d/npm
58    }
59}
60
61notes "
62It is not recommended to install packages globally. But if you do so\
63please be aware that they won't get cleaned up when you deactivate\
64or uninstall ${name}. Globally installed packages will remain in\
65${prefix}/lib/node_modules/ until you manually delete them.
66" 
67
68livecheck.type      regex
69livecheck.url       http://registry.npmjs.org/npm
70livecheck.regex     {"latest":"(.*?)"}
Note: See TracBrowser for help on using the repository browser.