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

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

maven3: fix master_sites.

Patch by: ciserlohn

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