Ticket #11391: Portfile

File Portfile, 1.9 KB (added by gk5885@…, 18 years ago)

portfile for maven 2.0.5

Line 
1PortSystem 1.0
2
3name                    maven2
4version                 2.0.5
5
6categories              java devel
7maintainers             gk5885@kickstyle.net
8platforms               darwin
9
10description             A java-based build and project management environment.
11long_description        Maven is a Java project management and project comprehension \
12                                tool. Maven is based on the concept of a project object model (POM) \
13                                in that all the artifacts produced by Maven are a result of consulting \
14                                a well defined model for your project. Builds, documentation, source \
15                                metrics, and source  cross-references are all controlled by your POM.  \
16                                Maven 2.0 is a complete rewrite of Maven 1.0 and as such is better organized, \
17                                faster and easier to use.
18homepage                http://maven.apache.org/
19
20master_sites            apache:maven/binaries
21distname                        maven-2.0.5
22distfiles                       maven-2.0.5-bin.tar.bz2
23checksums               md5 49bf1df41cfe23359be0e4126dba0ff4
24
25depends_build           bin:java:kaffe
26                                       
27use_configure           no
28use_bzip2                       yes
29
30# Source builds of maven are not possible. So, the default build is a binary
31# install of the jars.
32build.cmd               true
33
34destroot {
35        # Create the target java directory exists
36        xinstall -m 755 -d ${destroot}${prefix}/share/java/${name}
37       
38        # Copy over the needed elements of our directory tree
39        file copy \
40                ${worksrcpath}/bin \
41                ${worksrcpath}/lib \
42                ${worksrcpath}/core \
43                ${worksrcpath}/conf \
44                ${destroot}${prefix}/share/java/${name}
45               
46        # Remove extraneous bat files
47        foreach f [glob -directory ${destroot}${prefix}/share/java/${name}/bin *.bat] {
48                file delete $f
49        }
50       
51        # Fix permissions on shell scripts
52        foreach f { maven install_repo.sh } {
53                if [file exists ${destroot}${prefix}/share/java/${name}/bin/$f] {
54                        file attributes ${destroot}${prefix}/share/java/${name}/bin/$f -permissions +x
55                }
56        }
57       
58        # Symlink maven into the bin directory
59        system "cd ${destroot}${prefix}/bin && ln -s ${prefix}/share/java/${name}/bin/mvn"
60}
61