Ticket #18813: portfile

File portfile, 2.4 KB (added by jasoncwarner@…, 15 years ago)

Grails 1.1 portfile

Line 
1# $Id$
2
3PortSystem 1.0
4
5name                                grails
6version                           1.1
7categories                      devel java
8maintainers                     nomaintainer
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 1b7552d96dd456b0dcb19544663a74a3 \
22                                              sha1 18be464f6afffc81f10c87b8b4cdb5b1d2d7266a \
23                                              rmd160 1b0f28114fe131a9c478f47031ee94aa59cf7552
24
25worksrcdir                      ${name}-${version}
26set workTarget  ""
27
28use_bzip2                         no
29use_configure   no
30
31build.cmd                       true
32
33platform 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 }