Ticket #54566: Portfile.2

File Portfile.2, 2.2 KB (added by 1-61803, 7 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
6name                ipfs
7github.setup        ipfs go-ipfs 0.4.10 v
8
9categories          www
10platforms           darwin
11license             MIT
12maintainers         nomaintainer
13
14description         IPFS is a peer-to-peer hypermedia protocol. This is the implementation in go
15long_description    IPFS is a global, versioned, peer-to-peer filesystem. It combines \
16                    good ideas from Git, BitTorrent, Kademlia, SFS, and the Web. \
17                    It is like a single bittorrent swarm, exchanging git objects. \
18                    IPFS provides an interface as simple as the HTTP web, but \
19                    with permanence built-in. You can also mount the world at /ipfs.
20
21homepage            https://ipfs.io/
22
23checksums           rmd160  6ed1203cd5243d628739f19419807d2031b15894 \
24                    sha256  d033ed4b8fe05c258294c5bbe3d4d111a000e5afc489f3f935272bcfa49bfcd1
25
26depends_build-append \
27                    port:go
28
29# go's bin, pkg, src relative to workpath
30
31worksrcdir          src/github.com/ipfs/go-ipfs
32extract.mkdir       yes
33extract.post_args-append \
34                    --strip-components=1
35
36use_configure       no
37
38build.env-append    GOPATH=${workpath}
39build.dir           ${workpath}/src/github.com/ipfs/go-ipfs
40build.target-append install
41
42destroot {
43    # binary
44    xinstall -m 755 ${workpath}/bin/${name} ${destroot}${prefix}/bin/${name}
45
46    # documentation
47    set docdir ${prefix}/share/${subport}
48    xinstall -d ${destroot}${docdir}
49    xinstall -m 644 -W ${worksrcpath} CHANGELOG.md ISSUE_TEMPLATE.md LICENSE \
50        README.md contribute.md dev.md roadmap.md ${destroot}${docdir}
51    copy ${worksrcpath}/docs ${destroot}${docdir}
52    copy ${worksrcpath}/misc ${destroot}${docdir}
53}
54
55notes "
56To install the launch agent run the following shell script:
57${prefix}/share/${name}/misc/launchd/install.sh
58
59To install the autocompletion source the complete script from the shell's rc:
60  echo \"source ${prefix}/share/${name}/misc/completion/ipfs-completion.bash\" >> ~/.bashrc
61"