Ticket #19534: Portfile

File Portfile, 2.2 KB (added by rene@…, 15 years ago)

Portfile for gant version 1.6.1

Line 
1# $Id$
2
3PortSystem 1.0
4
5name                            gant
6version                         1.6.1
7categories                      java devel groovy
8maintainers                     rene@breskeby.com
9description                     Gant is a tool for scripting Ant tasks using Groovy instead of XML \
10                                        to specify the logic. A Gant specification is a Groovy script and so \
11                                        can bring all the power of Groovy to bear directly, something not \
12                                        possible with Ant scripts. Whilst it might be seen as a competitor \
13                                        to Ant, Gant uses Ant tasks for many of the actions, so Gant is really \
14                                        an alternative way of doing things using Ant, but using a \
15                                        programming language rather than XML to specify the rules.
16                                       
17homepage                        http://gant.codehaus.org/
18platforms                       darwin
19distname                        ${name}-${version}
20master_sites            http://dist.codehaus.org/gant/distributions
21checksums                       md5     ab3d607f97177e20fd8ed72890531625 \
22                                        sha1 99ab9cbfd3c54e291c8b22b47a30c7fd452fa6da \
23                                        rmd160 b0577d75ba757cfccd680c57af661fa2f5d04abc
24                                               
25worksrcdir                      ${name}-${version}
26set workTarget          ""
27
28use_zip                         yes
29use_bzip2                       no
30use_configure           no
31
32build.cmd                       true
33
34platform darwin {
35    extract.post_args   | gnutar -x
36    build.env           JAVA_HOME=/Library/Java/Home
37}
38
39pre-destroot {
40        # Remove extraneous bat files
41        foreach f [glob -directory ${worksrcpath}${workTarget}/bin *.bat] {
42                file delete $f
43        }
44}
45
46destroot        {
47        # Create the target java directory
48        xinstall -m 755 -d ${destroot}${prefix}/share/java/${name}
49
50        # Copy over the needed elements of our directory tree
51        file copy ${worksrcpath}/bin                                                    \
52                          ${worksrcpath}/lib                                                    \
53                          ${worksrcpath}/conf                                                   \
54                          ${destroot}${prefix}/share/java/${name}
55
56        # Symlink gant into the bin directory
57        system "cd ${destroot}${prefix}/bin && ln -s ${prefix}/share/java/${name}/bin/gant"
58        #system "cd ${destroot}${prefix}/bin && ln -s ${prefix}/share/java/${name}/bin/startGroovy"
59}
60
61post-activate {
62                ui_msg "****************************************************************************"
63                ui_msg "* Remember to set the environment variable GANT_HOME to the path to"
64                ui_msg "* the gant distribution: ${prefix}/share/java/${name}"
65                ui_msg "****************************************************************************"
66 }