source: trunk/dports/java/maven2/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.0 KB
RevLine 
[84550]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
[24141]2# $Id: Portfile 95479 2012-07-13 19:40:04Z blair@macports.org $
3
[17178]4PortSystem 1.0
[75113]5PortGroup select 1.0
[17178]6
[72276]7name            maven2
8version         2.2.1
[75113]9revision        3
[17178]10
[72276]11categories      java devel
[95479]12license         Apache-2
[72350]13maintainers     blair kickstyle.net:gk5885
[72276]14platforms       darwin
[17178]15
[72280]16description     A java-based build and project management environment.
[72276]17long_description \
18                Maven is a Java project management and project \
[72280]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 \
[72276]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 \
[72280]27                and easier to use.
28
[72276]29homepage        http://maven.apache.org/
[17178]30
[72276]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
[17178]38
[79255]39depends_run     port:maven_select
[72280]40depends_build   bin:java:kaffe
[54558]41
[72276]42use_configure   no
43universal_variant no
[33904]44
[75113]45select.group    maven
46select.file     ${filespath}/${name}
47
[33904]48# Source builds of maven are not possible. So, the default build is a binary
[17178]49# install of the jars.
[72280]50build.cmd       true
[17178]51
52destroot {
[95476]53    set mavendir ${destroot}${prefix}/share/java/${name}
[72309]54
[95476]55    # Create the target java directory exists
56    xinstall -m 755 -d ${mavendir}
[75112]57
[95476]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}
[75112]65
[95476]66    # Remove extraneous bat files
67    foreach f [glob -directory ${mavendir}/bin *.bat] {
68        file delete $f
69    }
[75112]70
[95476]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
[72276]75        }
[95476]76    }
[72308]77
[95476]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    }
[75112]84
[95476]85    # Symlink maven into the bin directory
86    system "cd ${destroot}${prefix}/bin && ln -s ../share/java/${name}/bin/mvn mvn2"
[17178]87}
88
[79255]89notes \
90"To make maven $version the default, please run
91\tsudo port select --set ${select.group} $name"
[75113]92
[72276]93livecheck.type  regex
94livecheck.url   ${homepage}download.html
[75107]95livecheck.regex apache-maven-(2\\.\[0-9.\]+)-bin\\.tar
Note: See TracBrowser for help on using the repository browser.