source: trunk/dports/java/maven3/Portfile @ 84550

Last change on this file since 84550 was 84550, checked in by snc@…, 8 years ago

modelines

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.3 KB
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: Portfile 84550 2011-09-27 21:05:11Z snc@macports.org $
3
4PortSystem 1.0
5PortGroup select 1.0
6
7name            maven3
8version         3.0.3
9
10categories      java devel
11maintainers     blair kickstyle.net:gk5885
12platforms       darwin
13
14description     A java-based build and project management environment.
15long_description \
16                Maven is a Java project management and project \
17                comprehension tool.  Maven is based on the \
18                concept of a project object model (POM) in that \
19                all the artifacts produced by Maven are a result \
20                of consulting a well defined model for your \
21                project.Builds, documentation, source metrics, \
22                and source cross-references are all controlled by \
23                your POM.  Maven 3 aims to ensure backward \
24                compatibility with Maven 2, improve usability, \
25                increase performance, allow safe embedding, and \
26                pave the way to implement many highly demanded \
27                features.
28
29homepage        http://maven.apache.org/
30
31master_sites    apache:maven/binaries
32distname        apache-maven-${version}-bin
33worksrcdir      apache-maven-${version}
34checksums       md5    507828d328eb3735103c0492443ef0f0 \
35                sha1   cfd1f5ef8ebb2f09a9446159842cf7cfa1a3ccd6 \
36                rmd160 f222733f32badab75c11e0ed3fbca2e594de7328
37
38depends_run     port:maven_select
39depends_build   bin:java:kaffe
40
41use_configure   no
42universal_variant no
43
44select.group    maven
45select.file     ${filespath}/${name}
46
47# Source builds of maven are not possible. So, the default build is a binary
48# install of the jars.
49build.cmd       true
50
51destroot {
52        set mavendir ${destroot}${prefix}/share/java/${name}
53
54        # Create the target java directory exists
55        xinstall -m 755 -d ${mavendir}
56
57        # Copy over the needed elements of our directory tree
58        file copy \
59                ${worksrcpath}/bin \
60                ${worksrcpath}/boot \
61                ${worksrcpath}/conf \
62                ${worksrcpath}/lib \
63                ${mavendir}
64
65        # Remove extraneous bat files
66        foreach f [glob -directory ${mavendir}/bin *.bat] {
67                file delete $f
68        }
69
70        # Fix permissions on shell scripts
71        foreach f { maven install_repo.sh } {
72                if [file exists ${mavendir}/bin/$f] {
73                        file attributes ${mavendir}/bin/$f -permissions +x
74                }
75        }
76
77        # Reduce the permissions on the distribution files.
78        file attributes ${mavendir}/conf -permissions 0755
79        file attributes ${mavendir}/conf/settings.xml -permissions 0644
80        foreach f [glob -directory ${mavendir}/boot *.jar] {
81                file attributes $f -permissions 0644
82        }
83        foreach f [glob -directory ${mavendir}/lib *.jar] {
84                file attributes $f -permissions 0644
85        }
86
87        # Symlink maven into the bin directory
88        system "cd ${destroot}${prefix}/bin && ln -s ../share/java/${name}/bin/mvn mvn3"
89}
90
91notes \
92"To make maven $version the default, please run
93\tsudo port select --set ${select.group} $name"
94
95livecheck.type  regex
96livecheck.url   ${homepage}download.html
97livecheck.regex apache-maven-(3\\.\[0-9.\]+)-bin\\.tar
Note: See TracBrowser for help on using the repository browser.