Ticket #25656: Portfile.2

File Portfile.2, 2.7 KB (added by ldeck, 14 years ago)

clean maven3 port

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-1
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, improve usability, \
20                    increase performance, allow safe embedding, and pave the way to \
21                    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     82d43745cf2f2d1d939f1139a09d6654 \
31                    sha1    639ada216287e1f2689e5e142f1e21aa7560d3d2 \
32                    rmd160  0d8e9576a9b330bd759ec741b05011ad0f48ff5a
33
34livecheck.type      md5
35livecheck.url       ${homepage}download.html
36livecheck.md5       82d43745cf2f2d1d939f1139a09d6654
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}