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 | |
---|
3 | PortSystem 1.0 |
---|
4 | PortGroup github 1.0 |
---|
5 | |
---|
6 | name ipfs |
---|
7 | github.setup ipfs go-ipfs 0.4.10 v |
---|
8 | |
---|
9 | categories www |
---|
10 | platforms darwin |
---|
11 | license MIT |
---|
12 | maintainers nomaintainer |
---|
13 | |
---|
14 | description IPFS is a peer-to-peer hypermedia protocol. This is the implementation in go |
---|
15 | long_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 | |
---|
21 | homepage https://ipfs.io/ |
---|
22 | |
---|
23 | checksums rmd160 6ed1203cd5243d628739f19419807d2031b15894 \ |
---|
24 | sha256 d033ed4b8fe05c258294c5bbe3d4d111a000e5afc489f3f935272bcfa49bfcd1 |
---|
25 | |
---|
26 | depends_lib-append port:go |
---|
27 | |
---|
28 | # go's bin, pkg, src relative to workpath |
---|
29 | |
---|
30 | worksrcdir src/github.com/ipfs/go-ipfs |
---|
31 | extract.mkdir yes |
---|
32 | extract.post_args-append \ |
---|
33 | --strip-components=1 |
---|
34 | |
---|
35 | use_configure no |
---|
36 | |
---|
37 | build.env-append GOPATH=${workpath} |
---|
38 | build.dir ${workpath}/src/github.com/ipfs/go-ipfs |
---|
39 | build.target-append install |
---|
40 | |
---|
41 | destroot { |
---|
42 | # binary |
---|
43 | xinstall -m 755 ${workpath}/bin/${name} ${destroot}${prefix}/bin/${name} |
---|
44 | |
---|
45 | # startup item |
---|
46 | file mkdir ${destroot}${prefix}/etc/LaunchDaemons/org.macports.${name}/ |
---|
47 | file mkdir ${destroot}/Library/LaunchDaemons/ |
---|
48 | copy ${worksrcpath}/misc/launchd/io.ipfs.ipfs-daemon.plist \ |
---|
49 | ${destroot}${prefix}/etc/LaunchDaemons/org.macports.${name}/org.macports.${name}.plist |
---|
50 | ln -sf ${prefix}/etc/LaunchDaemons/org.macports.${name}/org.macports.${name}.plist \ |
---|
51 | ${destroot}/Library/LaunchDaemons/ |
---|
52 | reinplace s|io.ipfs.ipfs-daemon|org.macports.${name}.plist| \ |
---|
53 | ${destroot}${prefix}/etc/LaunchDaemons/org.macports.${name}/org.macports.${name}.plist |
---|
54 | reinplace s|{{IPFS_BIN}}|${prefix}/bin/${name}| \ |
---|
55 | ${destroot}${prefix}/etc/LaunchDaemons/org.macports.${name}/org.macports.${name}.plist |
---|
56 | reinplace s|{{IPFS_PATH}}|${user_home}/.ipfs| \ |
---|
57 | ${destroot}${prefix}/etc/LaunchDaemons/org.macports.${name}/org.macports.${name}.plist |
---|
58 | reinplace -E "1,/<dict>/s|<dict>|<dict>\\\n <key>Disabled</key>\\\n <true/>|" \ |
---|
59 | ${destroot}${prefix}/etc/LaunchDaemons/org.macports.${name}/org.macports.${name}.plist |
---|
60 | |
---|
61 | # documentation |
---|
62 | set docdir ${prefix}/share/${subport} |
---|
63 | xinstall -d ${destroot}${docdir} |
---|
64 | xinstall -m 644 -W ${worksrcpath} CHANGELOG.md ISSUE_TEMPLATE.md LICENSE \ |
---|
65 | README.md contribute.md dev.md roadmap.md ${destroot}${docdir} |
---|
66 | copy ${worksrcpath}/docs ${destroot}${docdir} |
---|
67 | copy ${worksrcpath}/misc ${destroot}${docdir} |
---|
68 | } |
---|
69 | |
---|
70 | notes " |
---|
71 | A startup item has been generated that will aid in starting ${name} with launchd. |
---|
72 | It is disabled by default. Execute the following command to start it, and to cause it to launch at startup: |
---|
73 | sudo port load ${name} |
---|
74 | Beware to have your repo initialized first with the following command: |
---|
75 | ${name} init |
---|
76 | |
---|
77 | To install the autocompletion, source the complete script from the shell's rc: |
---|
78 | echo \"source ${prefix}/share/${name}/misc/completion/ipfs-completion.bash\" >> ~/.bashrc |
---|
79 | " |
---|