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

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

npm: stealth update at version 1.1.41

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