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

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

maven*: add license.

  • 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 95479 2012-07-13 19:40:04Z blair@macports.org $
3
4PortSystem 1.0
5PortGroup select 1.0
6
7name            maven3
8version         3.0.4
9
10categories      java devel
11license         Apache-2
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 3 aims to ensure backward \
25                compatibility with Maven 2, improve usability, \
26                increase performance, allow safe embedding, and \
27                pave the way to implement many highly demanded \
28                features.
29
30homepage        http://maven.apache.org/
31
32master_sites    apache:maven/binaries
33distname        apache-maven-${version}-bin
34worksrcdir      apache-maven-${version}
35checksums       md5    e513740978238cb9e4d482103751f6b7 \
36                sha1   0de5dc162bafde3fcb0a6b009cfeea81a042523b \
37                rmd160 c55335fb5c10380db64e6b56ee26cd6f42307a72
38
39depends_run     port:maven_select
40depends_build   bin:java:kaffe
41
42use_configure   no
43universal_variant no
44
45select.group    maven
46select.file     ${filespath}/${name}
47
48# Source builds of maven are not possible. So, the default build is a binary
49# install of the jars.
50build.cmd       true
51
52destroot {
53    set mavendir ${destroot}${prefix}/share/java/${name}
54
55    # Create the target java directory exists
56    xinstall -m 755 -d ${mavendir}
57
58    # Copy over the needed elements of our directory tree
59    file copy \
60        ${worksrcpath}/bin \
61        ${worksrcpath}/boot \
62        ${worksrcpath}/conf \
63        ${worksrcpath}/lib \
64        ${mavendir}
65
66    # Remove extraneous bat files
67    foreach f [glob -directory ${mavendir}/bin *.bat] {
68        file delete $f
69    }
70
71    # Fix permissions on shell scripts
72    foreach f { maven install_repo.sh } {
73        if [file exists ${mavendir}/bin/$f] {
74            file attributes ${mavendir}/bin/$f -permissions +x
75        }
76    }
77
78    # Reduce the permissions on the distribution files.
79    file attributes ${mavendir}/conf -permissions 0755
80    file attributes ${mavendir}/conf/settings.xml -permissions 0644
81    foreach f [glob -directory ${mavendir}/boot *.jar] {
82        file attributes $f -permissions 0644
83    }
84    foreach f [glob -directory ${mavendir}/lib *.jar] {
85        file attributes $f -permissions 0644
86    }
87
88    # Symlink maven into the bin directory
89    system "cd ${destroot}${prefix}/bin && ln -s ../share/java/${name}/bin/mvn mvn3"
90}
91
92notes \
93"To make maven $version the default, please run
94\tsudo port select --set ${select.group} $name"
95
96livecheck.type  regex
97livecheck.url   ${homepage}download.html
98livecheck.regex apache-maven-(3\\.\[0-9.\]+)-bin\\.tar
Note: See TracBrowser for help on using the repository browser.