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

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

maven{2,3}: whitespace changes: move to 4-space indentation.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.2 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 95476 2012-07-13 19:28:51Z blair@macports.org $
3
4PortSystem 1.0
5PortGroup select 1.0
6
7name            maven3
8version         3.0.4
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    e513740978238cb9e4d482103751f6b7 \
35                sha1   0de5dc162bafde3fcb0a6b009cfeea81a042523b \
36                rmd160 c55335fb5c10380db64e6b56ee26cd6f42307a72
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.