Ticket #26822: Portfile

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

Maven1 portfile for maven 1.1

Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
2# $Id$
3
4PortSystem 1.0
5
6name                maven1
7version             1.1
8revision            1
9
10categories          java devel
11maintainers         yahoo.com:jendave
12platforms           darwin
13
14description         A java-based build and project management environment.
15long_description    Maven is a Java project management and project comprehension \
16                    tool. Maven is based on the concept of a project object model (POM) \
17                    in that all the artifacts produced by Maven are a result of consulting \
18                    a well defined model for your project. Builds, documentation, source \
19                    metrics, and source  cross-references are all controlled by your POM.
20
21homepage            http://maven.apache.org/
22
23master_sites        apache:maven/binaries
24distname            maven-${version}
25worksrcdir          maven-${version}
26checksums           md5    ec2b0ad8c78ba52497f63ee7f613b526 \
27                    sha1   d9174675f0e846a225278949869fa2d979fa7f3b \
28                    rmd160 82ef869218ac42d9132fc74316f0e8a5edcf9431
29
30depends_build       bin:java:kaffe \
31                    bin:ant:apache-ant
32                   
33#patchfiles          patch-maven
34
35use_configure       no
36#use_bzip2           yes
37
38# Source builds of maven are not possible. So, the default build is a binary
39# install of the jars.
40build.cmd           true
41
42destroot {
43    set mavendir ${destroot}${prefix}/share/java/${name}
44    # Create the target java directory exists
45    xinstall -m 755 -d ${mavendir}
46   
47    # Copy over the needed elements of our directory tree
48    file copy \
49        ${worksrcpath}/bin \
50        ${worksrcpath}/lib \
51        ${worksrcpath}/plugins \
52        ${worksrcpath}/maven-project-3.xsd \
53        ${mavendir}
54       
55    # Remove extraneous bat files
56    foreach f [glob -directory ${mavendir}/bin *.bat] {
57        file delete $f
58    }
59   
60    # Fix permissions on shell scripts
61    foreach f { maven install_repo.sh } {
62        if [file exists ${mavendir}/bin/$f] {
63            file attributes ${mavendir}/bin/$f -permissions +x
64        }
65    }
66
67    # Reduce the permissions on the distribution files.
68    foreach f [glob -directory ${mavendir}/lib *.jar] {
69        file attributes $f -permissions 0644
70    }
71   
72    # Symlink maven executable to mvn in maven1 directory
73    system "cd ${mavendir}/bin && ln -s maven mvn"
74   
75    # Symlink maven into the bin directory
76    system "cd ${destroot}${prefix}/bin && ln -s ../share/java/${name}/bin/mvn mvn1"
77}
78
79livecheck.type  regex
80livecheck.regex {Get Maven (\d+(?:\.\d+)*)}