Ticket #15552: Portfile

File Portfile, 2.4 KB (added by tomaslin@…, 16 years ago)

Portfile for Grails

Line 
1# $Id$
2
3PortSystem 1.0
4
5name                            grails
6version                         1.0.3
7categories                      devel java
8maintainers                     openmaintainer@macports.org
9description                     An open-source web application framework that leverages the Groovy language
10long_description        Grails aims to bring the "coding by convention" paradigm to Groovy. \
11                                        It's an open-source web application framework that leverages the Groovy \
12                                        language and complements Java Web development. \
13                                        You can use Grails as a standalone development environment that hides all \
14                                        configuration details or integrate your Java business logic. \
15                                        Grails aims to make development as simple as possible and hence \
16                                        should appeal to a wide range of developers not just those from the Java community.
17homepage                        http://www.grails.org/
18platforms                       darwin
19distname                        ${name}-bin-${version}
20master_sites            http://dist.codehaus.org/grails
21checksums                       md5 b27d6a9fd33855a0b58ce3813be48a6f \
22                                        sha1 001a0b7106a54a30929b7a40c77d0b92fcb9eafb \
23                                        rmd160 4666384667ff395a17e98b2b32f7e8307f243f5c
24
25worksrcdir                      ${name}-${version}
26set workTarget          ""
27
28use_bzip2                       no
29use_configure           no
30
31build.cmd                       true
32
33variant darwin {
34    extract.post_args   | gnutar -x
35    build.env           JAVA_HOME=/Library/Java/Home
36}
37
38pre-destroot {
39        # Remove extraneous bat files
40        foreach f [glob -directory ${worksrcpath}${workTarget}/bin *.bat] {
41                file delete $f
42        }
43}
44
45destroot        {
46        # Create the target java directory
47        xinstall -m 755 -d ${destroot}${prefix}/share/java/${name}
48
49        # Copy over the needed elements of our directory tree
50        file copy ${worksrcpath}/bin                                                    \
51                          ${worksrcpath}/dist                                                   \
52                          ${worksrcpath}/conf                                                   \
53                          ${worksrcpath}/lib                                                    \
54                          ${worksrcpath}/media                                                  \
55                          ${worksrcpath}/scripts                                                \
56                          ${worksrcpath}/src                                                \
57                          ${worksrcpath}/build.properties                               \
58                          ${destroot}${prefix}/share/java/${name}               
59
60        # Symlink grails into the bin directory
61        system "cd ${destroot}${prefix}/bin && ln -s ${prefix}/share/java/${name}/bin/grails"
62        system "cd ${destroot}${prefix}/bin && ln -s ${prefix}/share/java/${name}/bin/startGrails"
63}
64
65post-activate {
66                ui_msg "****************************************************************************"
67                ui_msg "* Remember to set the environment variable GRAILS_HOME to the path to"
68                ui_msg "* the grails distribution: ${prefix}/share/java/${name}"
69                ui_msg "****************************************************************************"
70 }