source: trunk/dports/java/maven2/Portfile

Last change on this file was 138773, checked in by blair@…, 17 months ago

maven2: do a better check for #48289, consistent with other maven* ports.

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