Ticket #52324: Portfile.4

File Portfile.4, 2.4 KB (added by lbschenkel (Leonardo Brondani Schenkel), 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# $Id$
3
4PortSystem          1.0
5PortGroup           github 1.0
6
7github.setup        syncthing syncthing 0.14.7 v
8categories          net
9platforms           darwin
10license             MPL-2
11maintainers         schenkel.net:leonardo
12
13description         Open Source Continuous File Synchronization
14long_description    Syncthing replaces proprietary sync and cloud services \
15                    with something open, trustworthy and decentralized.\
16                    Your data is your data alone and you deserve to choose \
17                    where it is stored, if it is shared with some third party \
18                    and how it's transmitted over the Internet.
19homepage            https://syncthing.net
20
21checksums           rmd160  b098bb9dc6f37884691640ef9b5cdcb128506ba5 \
22                    sha256  1b1d89b9ed2aa102a05fa2552652e3c6fd86d24a460a9b35adc9919b203ee8cf
23
24worksrcdir          src/github.com/syncthing/syncthing
25extract.mkdir       yes
26extract.post_args-append --strip-components=1
27
28depends_build       port:go
29use_configure       no
30use_parallel_build  no
31build.cmd           ${prefix}/bin/go run build.go
32build.target        install syncthing
33build.pre_args      -version v${version} -no-upgrade
34build.post_args     ${build.target}
35build.env           GOPATH=${workpath}
36
37test.run            yes
38
39destroot {
40    xinstall -W ${worksrcpath}/bin syncthing ${destroot}${prefix}/bin
41    xinstall -W ${worksrcpath}/man syncthing.1 ${destroot}${prefix}/share/man/man1
42    xinstall -d ${destroot}${prefix}/share/doc/${name}
43    xinstall -W ${worksrcpath} AUTHORS LICENSE NICKS ${destroot}${prefix}/share/doc/${name}
44    xinstall {*}[glob ${worksrcpath}/*.md] ${destroot}${prefix}/share/doc/${name}
45    xinstall -d ${destroot}${prefix}/share/examples/${name}
46    xinstall -W ${worksrcpath}/etc/macosx-launchd syncthing.plist ${destroot}${prefix}/share/examples/${name}
47    reinplace "s|/Users/USERNAME/bin/|${prefix}/bin/|g" ${destroot}${prefix}/share/examples/${name}/syncthing.plist
48}
49
50notes-append        \
51    "Syncthing provides an example launchd plist. To use it:" \
52    "1. Copy ${prefix}/share/examples/${name}/syncthing.plist to ~/Library/LaunchAgents" \
53    "2. Edit syncthing.plist by replacing USERNAME with your actual username" \
54    "3. Log out and in again, or run: launchctl load ~/Library/LaunchAgents/syncthing.plist"
55