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

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

modelines

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.1 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            maven2
8version         2.2.1
9revision        3
10
11categories      java devel
12maintainers     blair kickstyle.net:gk5885
13platforms       darwin
14
15description     A java-based build and project management environment.
16long_description \
17                Maven is a Java project management and project \
18                comprehension tool.  Maven is based on the \
19                concept of a project object model (POM) in that \
20                all the artifacts produced by Maven are a result \
21                of consulting a well defined model for your \
22                project.Builds, documentation, source metrics, \
23                and source cross-references are all controlled by \
24                your POM.  Maven 2.0 is a complete rewrite of \
25                Maven 1.0 and as such is better organized, faster \
26                and easier to use.
27
28homepage        http://maven.apache.org/
29
30master_sites    apache:maven/binaries
31distname        apache-maven-${version}-bin
32worksrcdir      apache-maven-${version}
33use_bzip2       yes
34checksums       md5    c581a15cb0001d9b771ad6df7c8156f8 \
35                sha1   47ac0417a200cbc6d1b967d6b7c6ae1138e9e3e0 \
36                rmd160 25d523d3dc86cf4695b0e343cf0f6e58ea8a54e3
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}/lib *.jar] {
81                file attributes $f -permissions 0644
82        }
83
84        # Symlink maven into the bin directory
85        system "cd ${destroot}${prefix}/bin && ln -s ../share/java/${name}/bin/mvn mvn2"
86}
87
88notes \
89"To make maven $version the default, please run
90\tsudo port select --set ${select.group} $name"
91
92livecheck.type  regex
93livecheck.url   ${homepage}download.html
94livecheck.regex apache-maven-(2\\.\[0-9.\]+)-bin\\.tar
Note: See TracBrowser for help on using the repository browser.