Ticket #25656: Portfile.3

File Portfile.3, 2.7 KB (added by jendave@…, 14 years ago)

Updated for Maven3.0-beta-3

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
5
6name                maven3
7version             3.0-beta-3
8
9categories          java devel
10platforms           darwin
11maintainers         gmail.com:lachlan.deck
12
13description         Software project management, build, reporting and comprehension tool.
14long_description    Maven is a Java project management and project comprehension \
15                    tool. Maven is based on the concept of a project object model (POM) \
16                    in that all the artifacts produced by Maven are a result of consulting \
17                    a well defined model for your project. Builds, documentation, source \
18                    metrics, and source  cross-references are all controlled by your POM.  \
19                    Maven 3 aims to ensure backward compatibility with Maven 2, \
20                    improve usability, increase performance, allow safe embedding, \
21                    and pave the way to implement many highly demanded features.
22
23homepage            http://maven.apache.org/
24
25master_sites        apache:maven/binaries
26
27distname            apache-maven-${version}-bin
28worksrcdir          apache-maven-${version}
29
30checksums           md5     b11cf59c8a4cd36741243267c58cf6a0 \
31                    sha1    dc1468a57e6313b0ca355bc628df87e6f50ebc69 \
32                    rmd160  1e0ae9f1ed05e8330eb7534807fce3d845076d0f
33
34livecheck.type      md5
35livecheck.url       ${homepage}download.html
36livecheck.md5       b11cf59c8a4cd36741243267c58cf6a0
37
38# Source builds of maven are not possible.
39# So, the default build is a binary install of the jars.
40build.cmd           true
41depends_build       bin:java:kaffe
42
43use_configure       no
44universal_variant   no
45
46destroot {
47    # Ensure the target java directory exists
48    xinstall -m 755 -d ${destroot}${prefix}/share/java/${name}
49   
50    # Copy over the needed elements of our directory tree
51    file copy \
52        ${worksrcpath}/bin \
53        ${worksrcpath}/boot \
54        ${worksrcpath}/conf \
55        ${worksrcpath}/lib \
56        ${destroot}${prefix}/share/java/${name}
57}
58
59pre-destroot {
60        # Remove win bat files
61    foreach batFile [glob -directory ${worksrcpath}/bin *.bat] {
62        file delete ${batFile}
63    }
64}
65
66post-destroot {
67        # Ensure executable permissions on shell scripts
68    foreach script { mvn mvnDebug mvnyjp } {
69        if [file exists ${destroot}${prefix}/share/java/${name}/bin/${script}] {
70            file attributes ${destroot}${prefix}/share/java/${name}/bin/${script} -permissions +x
71        }
72    }
73   
74    # Symlink mvn as bin/mvn3
75    system "ln -s ${prefix}/share/java/${name}/bin/mvn ${destroot}${prefix}/bin/mvn3"
76}