Ticket #37378: git-flow-completion-avh.Portfile

File git-flow-completion-avh.Portfile, 2.1 KB (added by robsonpeixoto@…, 11 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            petervanderdoes git-flow-completion 0.4.2
8fetch.type              git
9
10name                    git-flow-completion-avh
11categories              devel
12platforms               darwin
13maintainers             robsonpeixoto.com:robinho openmaintainer
14license                 {Copyright LGPL}
15supported_archs         noarch
16
17description             Bash, Zsh and fish completion support for git-flow
18long_description        ${description}
19
20depends_build-append    port:git-flow-avh
21
22variant bash_completion {
23    depends_run-append path:etc/bash_completion:bash-completion
24}
25
26variant zsh_completion description {Install git-flow-avh zsh completion file} {
27    depends_run-append path:${prefix}/bin/zsh:zsh
28}
29
30variant fish_completion description {Install git-flow-avh fish completion file} {
31    depends_run-append path:${prefix}/bin/fish:fish
32}
33
34if {
35    ![variant_isset bash_completion]
36    && ![variant_isset zsh_completion]
37    && ![variant_isset fish_completion]
38} {
39    default_variants    +bash_completion
40}
41
42destroot {
43    if {[variant_isset bash_completion]} {
44        set completion-dir ${destroot}${prefix}/share/bash-completion/completions
45        xinstall -d ${completion-dir}
46        xinstall -m 755 ${worksrcpath}/git-flow-completion.bash ${completion-dir}/git-flow-avh
47    }
48    if {[variant_isset zsh_completion]} {
49        set completion-dir ${destroot}${prefix}/share/zsh/site-functions
50        xinstall -d ${completion-dir}
51        xinstall -m 755 ${worksrcpath}/git-flow-completion.zsh ${completion-dir}/_git_flow_avh
52    }
53    if {[variant_isset fish_completion]} {
54        set completion-dir ${destroot}${prefix}/share/fish/completions
55        xinstall -d ${completion-dir}
56        xinstall -m 755  ${worksrcpath}/git.fish ${completion-dir}/git-flow-avh.fish
57    }
58}
59
60universal_variant       no
61use_configure           no
62
63build {}
64
65destroot.destdir        prefix=${destroot}${prefix}