Ticket #43260: Portfile.3

File Portfile.3, 2.6 KB (added by ajdudman, 9 years ago)

corrected and enhanced Portfile for recent source code

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
7# Please update the version of both docker and boot2docker ports together.
8github.setup    docker docker 1.6.2 v
9set hash 7c8fca2ddb58c8d2c4fb4df31c242886df7dd257
10set short [string range ${hash} 0 6]
11revision        0
12categories      sysutils
13maintainers     nomaintainer
14description     Docker is the Linux container engine.
15long_description \
16        Docker is an open-source engine to pack, ship and run Linux applications \
17        as lightweight, portable containers.  For darwin, this is the client only.  \
18        IANA assigned docker plain-text port 2375 and ssl port 2376.  The server \
19        or daemon must run on Linux, possibly as a guest in a VirtualBox VM.  \
20        Boot2docker facilitates doing this.
21
22license         Apache-2
23platforms       darwin
24homepage        https://www.docker.com/
25use_configure   no
26use_parallel_build  no
27
28depends_build   port:go
29
30platform darwin {
31    pre-fetch {
32        if {${os.major} < 10} {
33            ui_error "${name} requires Snow Leopard or newer."
34            return -code error "unsupported platform"
35        }
36    }
37}
38
39checksums       rmd160  419f5eb490209b5c4e02dd1fcae1a6cd12602a15 \
40                sha256  1d0bc584b2bd3c02505c2a88b189db421ff60d625a4ca1aebf9df956673ab739
41
42build.env       AUTO_GOPATH=1 DOCKER_CLIENTONLY=1 DOCKER_GITCOMMIT=${short}
43build.cmd       hack/make.sh
44build.target    dynbinary
45build.post_args >hack/make.out 2>&1
46
47destroot {
48    xinstall ${worksrcpath}/bundles/${version}/dynbinary/docker-${version} ${destroot}${prefix}/bin/docker
49}
50
51test.run        yes
52test.cmd        ${worksrcpath}/bundles/${version}/dynbinary/docker-${version}
53test.target     --version
54
55default_variants  +bash_completion
56
57variant bash_completion {
58    depends_run-append path:etc/bash_completion:bash-completion
59
60    post-destroot {
61        set destdatapath ${destroot}${prefix}/share/bash-completion/completions
62        xinstall -d ${destdatapath}
63        xinstall -m 644 ${worksrcpath}/contrib/completion/bash/docker ${destdatapath}
64    }
65}
66
67variant zsh_completion description {Install docker zsh completion file.} {
68    depends_run-append port:zsh-completions
69
70    post-destroot {
71        set destdatapath ${destroot}${prefix}/share/zsh/site-functions
72        xinstall -d ${destdatapath}
73        xinstall -m 644 ${worksrcpath}/contrib/completion/zsh/_docker ${destdatapath}
74    }
75}
76
77notes   "This docker port is unsupported software.  Docker, Inc. offically supports docker built in a docker container."