Ticket #25656: Portfile

File Portfile, 2.2 KB (added by lists@…, 14 years ago)

maven3 Portfile

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$
3
4PortSystem 1.0
5
6name                    maven3
7version                 3.0-beta-1
8
9categories              java devel
10maintainers             jon.buffington.name:me
11platforms               darwin
12
13description             A java-based build and project management environment.
14
15long_description        Maven is a software project management and comprehension tool. Based on \
16                        the concept of a Project Object Model (POM), Maven can manage a project's \
17                        build, reporting and documentation from a central piece of information.
18
19homepage                        http://maven.apache.org/
20
21master_sites            apache:maven/binaries
22distname                        apache-maven-${version}-bin
23worksrcdir                      apache-maven-${version}
24
25checksums               md5     82d43745cf2f2d1d939f1139a09d6654 \
26                        sha1    639ada216287e1f2689e5e142f1e21aa7560d3d2 \
27                        rmd160  0d8e9576a9b330bd759ec741b05011ad0f48ff5a
28
29depends_build           bin:java:kaffe
30
31use_configure           no
32universal_variant       no
33build               {}
34
35destroot {
36        # Verify the target directory exists.
37        xinstall -m 755 -d ${destroot}${prefix}/share/java/${name}
38
39        # Copy the needed elements of the directory tree.
40        file copy \
41                ${worksrcpath}/bin \
42                ${worksrcpath}/boot \
43                ${worksrcpath}/conf \
44                ${worksrcpath}/lib \
45                ${destroot}${prefix}/share/java/${name}
46
47        # Remove extraneous bat files.
48        foreach f [glob -directory ${destroot}${prefix}/share/java/${name}/bin *.bat] {
49                file delete $f
50        }
51
52        # Fix permissions on shell scripts.
53        foreach f { maven install_repo.sh } {
54                if [file exists ${destroot}${prefix}/share/java/${name}/bin/$f] {
55                        file attributes ${destroot}${prefix}/share/java/${name}/bin/$f -permissions +x
56                }
57        }
58
59        # Reduce the permissions on the conf directory and settings.xml file.
60        file attributes ${destroot}${prefix}/share/java/${name}/conf -permissions 0755
61        file attributes ${destroot}${prefix}/share/java/${name}/conf/settings.xml -permissions 0644
62
63        # Symlink maven into the bin directory
64        system "cd ${destroot}${prefix}/bin && ln -s ${prefix}/share/java/${name}/bin/mvn"
65}
66
67livecheck.type          regex
68livecheck.url           ${homepage}download.html
69livecheck.regex         apache-maven-(\[0-9.\]+)-bin\\.tar