Ticket #53753: Portfile

File Portfile, 1.6 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
6github.setup        tldr-pages tldr-cpp-client 1.3.0 v
7
8categories          sysutils
9platforms           darwin
10license             MIT
11maintainers         nomaintainer
12
13description         tldr c client - simplified and community-driven man pages
14long_description    The TLDR pages are a community effort to simplify \
15                    the beloved man pages with practical examples.
16
17homepage            http://tldr-pages.github.io
18
19checksums           rmd160  29020d3f0fe5a34a7b976af67ad9c1ee868a2d0a \
20                    sha256  fa65b9d49ec94034195b1cb985e4238cbc2ce34352d4be8772c0f058b89b41a4
21
22use_configure       no
23
24depends_build-append \
25                    port:curl \
26                    port:libzip \
27                    port:pkgconfig
28
29destroot.args       PREFIX=${destroot}${prefix}
30
31post-destroot {
32    set docdir ${prefix}/share/${subport}
33    set compldir ${prefix}/share/${subport}/autocomplete
34    xinstall -d ${destroot}${docdir}
35    xinstall -d ${destroot}${compldir}
36    xinstall -m 644 -W ${worksrcpath} \
37        LICENSE \
38        README.md \
39        ${destroot}${docdir}
40    xinstall -m 644 {*}[glob ${worksrcpath}/autocomplete/*] \
41        ${destroot}${compldir}
42}
43
44notes "
45To install the autocompletion, just move the script for your shell to a an easy to access directory (like your home directory), and source it in your .bashrc or .zshrc.
46Example for bash:
47mv autocomplete/complete.bash ~/.tldr.complete
48echo \"source ~/.tldr.complete\" >> ~/.bashrc
49"