Ticket #25904: Portfile

File Portfile, 4.1 KB (added by jul_bsd@…, 10 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           perl5 1.0
6PortGroup           github 1.0
7
8github.setup        zrlram afterglow 1.6.4 afterglow-
9#name                afterglow
10#version             1.6.4
11categories          graphics
12platforms           darwin
13maintainers         yahoo.fr:jul_bsd openmaintainer
14description         AfterGlow is a collection of scripts which facilitate the process of generating graphs.
15long_description    AfterGlow 1.x is a collection of scripts which facilitate \
16                    the process of generating link graphs. AfterGlow 1.x \
17                    is written in Perl and is meant to be used on the \
18                    command line. There is no graphical user interface \
19                    available. AfterGlow expects a CSV file as input and \
20                    generates either an attributed graph langugage file \
21                    that can be processed by the graphiviz libraries, or \
22                    it can generate output for consumption by the large \
23                    graph library (LGL).
24homepage            http://afterglow.sourceforge.net/
25license             No License
26## FIXME! download link not working => use github
27#master_sites        http://pixlcloud.com/wp-content/plugins/download-monitor/download.php?id=11
28fetch.type          git
29git.url             https://github.com/zrlram/afterglow.git
30## 2013-09-23
31git.branch          1c01d0c83dbfba3f4bc40f418303d1847f465b1e
32
33depends_run         bin:dot:graphviz port:perlchartdir
34
35worksrcdir          afterglow
36## Needed to remove annoying 'defined(@array) is deprecated at'
37patchfiles          patch-afterglow_pl.diff
38
39use_configure       no
40build               {}
41
42post-build {
43    reinplace "s|#!/usr/bin/perl|#!${prefix}/bin/perl${perl5.version} |;" \
44        ${worksrcpath}/afterglow.pl
45}
46
47destroot        {
48    foreach f { afterglow.pl } {
49        xinstall -m 755 ${worksrcpath}/$f \
50               ${destroot}${prefix}/bin
51    }
52
53    xinstall -d ${destroot}${prefix}/share/doc/${name}
54    xinstall -m 644 ${worksrcpath}/README.md ${destroot}${prefix}/share/doc/${name}
55
56    xinstall -d ${destroot}${prefix}/share/examples/${name}
57    foreach f { sample.properties } {
58        xinstall -m 644 ${worksrcpath}/$f \
59               ${destroot}${prefix}/share/examples/${name}
60    }
61}
62
63default_variants +perl5_16 +parsers
64
65variant perl5_16 description { Bindings with Perl 5.16 } {
66    depends_lib-append  port:perl5.16
67    perl5.version       5.16
68    depends_run-append  port:p5.16-text-csv
69}
70
71variant perl5_18 description { Bindings with Perl 5.18 } {
72    depends_lib-append  port:perl5.18
73    perl5.version       5.18
74    depends_run-append  port:p5.18-text-csv
75}
76
77variant parsers description { include some parsing scripts to format input for afterglow } {
78    master_sites-append        https://github.com/zrlram/parsers/archive/:parsers
79    distfiles-append           master.zip:parsers
80    checksums-append           master.zip \
81                               rmd160  c7bc8ad123c27e5c58c7b551ebba5a3b4998ef44 \
82                               sha256  b9c4f6f89a8c07e931cbe480742f223c90168a17a7c0fdb897e809e693fa5caa
83
84    post-extract {
85        system "cd ${worksrcpath}/ && unzip ${distpath}/master.zip"
86    }
87    post-destroot {
88        xinstall -d ${destroot}${prefix}/share/examples/${name}
89        foreach f { argus2csv.pl color.properties color.sendmail.properties ipfw2csv.pl pf2csv.pl sendmail_parser.pl snortalert2csv.pl tcpdump2csv.pl } {
90            reinplace "s|#!/usr/bin/perl|#!${prefix}/bin/perl${perl5.version} |;" \
91                ${worksrcpath}/parsers-master/${f}
92            copy ${worksrcpath}/parsers-master/${f} ${destroot}${prefix}/share/examples/${name}/
93        }
94        xinstall -d ${destroot}${prefix}/share/doc/${name}
95        copy ${worksrcpath}/parsers-master/README.md ${destroot}${prefix}/share/doc/${name}/README-parsers.md
96       
97    }
98}
99
100livecheck.type      regex
101livecheck.url       ${homepage}/main.html
102livecheck.regex     "AfterGlow (\\d+(?:\\.\\d+)*)</a> released!</b></td>"