Ticket #53038: Portfile

File Portfile, 1.3 KB (added by coditect (Nicholas Rawlings), 8 years ago)
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
3PortSystem          1.0
4PortGroup           github 1.0
5
6github.setup        creationix nvm 0.32.1 v
7github.tarball_from releases
8
9categories          devel
10platforms           darwin
11supported_archs     noarch
12license             MIT
13
14maintainers         nomaintainer
15description         Node version manager
16long_description    NVM is a simple shell script to manage multiple active Node.js versions.
17
18checksums           rmd160 5f1093811dcf701f1ed5b51b307a31ba4c3feaa3 \
19                    sha256 d0bda5daf29eaf67a70f6fd3b860308ddd3536a1bb9adb4d4166ec82fcd9cb68
20
21use_configure       no
22default_variants    +bash_completion
23
24build { }
25
26destroot {
27    set nvm_dir ${prefix}/lib/nvm
28    xinstall -d ${destroot}${nvm_dir}
29    xinstall {*}[glob ${worksrcpath}/nvm*] ${destroot}${nvm_dir}
30   
31    set nvm_bin ${prefix}/bin/nvm
32    xinstall -m 755 ${filespath}/nvm_bin.sh ${destroot}${nvm_bin}
33    reinplace "s|@PLACEHOLDER@|${nvm_dir}|g" ${destroot}${nvm_bin}
34}
35
36variant bash_completion {
37    post-destroot {
38        set completions_dir ${destroot}${prefix}/share/bash-completion/completions
39        xinstall -d ${completions_dir}
40        xinstall ${worksrcpath}/bash_completion ${completions_dir}/nvm
41    }
42}