Ticket #14042: Portfile

File Portfile, 2.8 KB (added by graham.bakay@…, 17 years ago)

Portfile for Jetty 6.1.7

Line 
1# $Id$
2
3PortSystem 1.0
4name                    jetty
5version                 6.1.7
6platforms               darwin
7categories              www java
8maintainers             graham.bakay@gmail.com
9description             Java HTTP Servlet Server
10homepage                http://www.mortbay.org/jetty/
11long_description        Jetty is a 100% Java HTTP Server and Servlet \
12                        Container. Jetty is a fully featured web server for \
13                        static and dynamic content. Unlike separate \
14                        server/container solutions, this means that your web \
15                        server and web application run in the same process, \
16                        without interconnection overheads and complications. \
17                        Furthermore, as a pure java component, Jetty can be \
18                        simply included in your application for \
19                        demonstration, distribution or deployment.
20
21master_sites            http://dist.codehaus.org/jetty/${name}-${version}/ \
22                        ftp://ftp.mortbay.org/pub/${name}-${version}/
23
24distname                ${name}-${version}
25worksrcdir              ${name}-${version}
26
27checksums               md5 22b79a589bce55bc05f14fc974a24adf
28use_zip                 yes
29
30set javadest "${prefix}/share/java/${name}-${version}"
31
32use_configure           no
33
34build {}
35
36destroot {
37        # Create the target java directory exists
38        xinstall -m 755 -d ${destroot}${prefix}/share/java/${name}
39       
40        # Copy over the needed elements of our directory tree
41        file mkdir \
42                ${worksrcpath}/logs \
43
44        file copy \
45                ${worksrcpath}/bin \
46                ${worksrcpath}/contexts \
47                ${worksrcpath}/etc \
48                ${worksrcpath}/javadoc \
49                ${worksrcpath}/lib \
50                ${worksrcpath}/LICENSES \
51                ${worksrcpath}/logs \
52                ${worksrcpath}/README.txt \
53                ${worksrcpath}/resources \
54                ${worksrcpath}/start.jar \
55                ${worksrcpath}/VERSION.txt \
56                ${worksrcpath}/webapps \
57                ${destroot}${prefix}/share/java/${name}
58               
59        # Remove extraneous files
60        foreach f [glob -directory ${destroot}${prefix}/share/java/${name}/bin *.exe] {
61                file delete $f
62        }
63       
64        # Fix permissions on shell scripts
65        foreach f { maven install_repo.sh } {
66                if [file exists ${destroot}${prefix}/share/java/${name}/bin/$f] {
67                        file attributes ${destroot}${prefix}/share/java/${name}/bin/$f -permissions +x
68                }
69        }
70       
71        # Symlink maven into the bin directory
72        system "cd ${destroot}${prefix}/bin && ln -s ${prefix}/share/java/${name}/bin/jetty.sh jetty"
73}