Ticket #54054: Portfile

File Portfile, 2.6 KB (added by 1-61803, 8 years ago)

rewritten with portgroup python

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
5PortGroup           python 1.0
6
7github.setup        garabik grc 1.11 v
8
9categories          textproc
10platforms           darwin
11license             GPL-2
12maintainers         nomaintainer
13supported_archs     noarch
14
15description         Generic Colouriser for colourising logfiles and output of commands
16long_description    Generic Colouriser makes text files or outputs of different programs \
17                    more readable by inserting ANSI colour control codes into them. \
18                    It provides the grc and grcat Python scripts for filtering \
19                    text output and colourising it.
20
21homepage            http://kassiopeia.juls.savba.sk/~garabik/software/grc.html
22
23checksums           rmd160  e1f29a499fb2a06b7dce0aabd39ea9173db615a9 \
24                    sha256  769cc911657f2e29ce621059a63b048f2d52fdcbafe340892d1017af4b65d606
25
26python.versions     34 35 36
27
28variant python34 conflicts python35 python36 description {Use Python 3.4} {
29    python.default_version 34
30}
31variant python35 conflicts python34 python36 description {Use Python 3.5} {
32    python.default_version 35
33}
34variant python36 conflicts python34 python35 description {Use Python 3.6} {
35    python.default_version 36
36}
37if {![variant_isset python34] && ![variant_isset python35]} {
38    default_variants +python36
39}
40
41build {}
42destroot {}
43post-destroot {
44    reinplace "s|#! /usr/bin/env python3|#!${python.bin}|" \
45        ${worksrcpath}/grc ${worksrcpath}/grcat
46    reinplace "s|/etc|${prefix}/etc|g" \
47        ${worksrcpath}/grc ${worksrcpath}/grc.1
48    reinplace "s|/usr/local|${prefix}|g" \
49        ${worksrcpath}/grcat ${worksrcpath}/grcat.1
50    xinstall -m 755 -W ${worksrcpath} \
51        grc grcat ${destroot}${prefix}/bin
52    xinstall -m 644 -W ${worksrcpath} \
53        grc.1 grcat.1 ${destroot}${prefix}/share/man/man1
54    xinstall -m 644 -W ${worksrcpath} \
55        grc.conf ${destroot}${prefix}/etc
56    xinstall -m 755 -d ${destroot}${prefix}/share/${name}
57    xinstall -m 644 {*}[glob ${worksrcpath}/colourfiles/conf.*] \
58        ${destroot}${prefix}/share/${name}
59    xinstall -m 755 -d ${destroot}${prefix}/etc/${name}.d
60    xinstall -m 644 -W ${worksrcpath} \
61        grc.bashrc grc.zsh grc.fish ${destroot}${prefix}/etc/${name}.d
62    set docdir ${prefix}/share/doc/${subport}
63    xinstall -d ${destroot}${docdir}
64    xinstall -m 644 -W ${worksrcpath} \
65        CHANGES \
66        COPYING \
67        CREDITS \
68        INSTALL \
69        README.markdown \
70        Regexp.txt \
71        ${destroot}${docdir}
72}