source: trunk/dports/java/maven1/Portfile

Last change on this file was 134045, checked in by blair@…, 2 years ago

maven{1,2,3}: switch from "cd ... && ln -s" to jus "ln -s".

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.5 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 134045 2015-03-17 18:41:42Z ryandesign@macports.org $
3
4PortSystem 1.0
5
6name                maven1
7version             1.1
8
9categories          java devel
10license             Apache-2
11maintainers         gmail.com:nhoj.patrick openmaintainer
12platforms           darwin
13
14description         A java-based build and project management environment.
15long_description    Maven is a Java project management and project comprehension \
16                    tool. Maven is based on the concept of a project object model (POM) \
17                    in that all the artifacts produced by Maven are a result of consulting \
18                    a well defined model for your project. Builds, documentation, source \
19                    metrics, and source  cross-references are all controlled by your POM.
20
21homepage            http://maven.apache.org/
22
23master_sites        apache:maven/binaries
24distname            maven-${version}
25checksums           md5    ec2b0ad8c78ba52497f63ee7f613b526 \
26                    sha1   d9174675f0e846a225278949869fa2d979fa7f3b \
27                    rmd160 82ef869218ac42d9132fc74316f0e8a5edcf9431
28
29depends_build       bin:java:kaffe \
30                    bin:ant:apache-ant
31
32use_configure       no
33
34# Source builds of maven are not possible. So, the default build is a binary
35# install of the jars.
36build.cmd           true
37
38destroot {
39    set mavendir ${destroot}${prefix}/share/java/${name}
40    # Create the target java directory exists
41    xinstall -m 755 -d ${mavendir}
42
43    # Copy over the needed elements of our directory tree
44    file copy \
45        ${worksrcpath}/bin \
46        ${worksrcpath}/lib \
47        ${worksrcpath}/plugins \
48        ${worksrcpath}/maven-project-3.xsd \
49        ${mavendir}
50
51    # Remove extraneous bat files
52    foreach f [glob -directory ${mavendir}/bin *.bat] {
53        file delete $f
54    }
55
56    # Fix permissions on shell scripts
57    foreach f { maven install_repo.sh } {
58        if [file exists ${mavendir}/bin/$f] {
59            file attributes ${mavendir}/bin/$f -permissions +x
60        }
61    }
62
63    # Reduce the permissions on the distribution files.
64    foreach f [glob -directory ${mavendir}/lib *.jar] {
65        file attributes $f -permissions 0644
66    }
67
68    # Symlink maven executable to mvn in the bin directory
69    ln -s maven ${mavendir}/bin/mvn
70
71    # Symlink maven into the bin directory
72    ln -s ../share/java/${name}/bin/mvn ${destroot}${prefix}/bin/mvn1
73}
74
75livecheck.type  none
Note: See TracBrowser for help on using the repository browser.