Ticket #9055: Portfile

File Portfile, 2.2 KB (added by gk5885@…, 18 years ago)

a portfile for jboss-4.0.4

Line 
1PortSystem 1.0
2
3name                            jboss
4version                         4.0.4
5
6categories                      java www
7maintainers                     gk5885@kickstyle.net
8platforms                       darwin
9
10description                     The JBoss Application Server
11long_description        JBoss Application Server is the #1 most widely used Java \
12                    application server on the market. A J2EE certified \
13                    platform for developing and deploying enterprise Java \
14                    applications, Web applications, and Portals, JBoss \
15                    Application Server provides the full range of J2EE 1.4 \
16                    features as well as extended enterprise services including \
17                    clustering, caching, and persistence.
18homepage                        http://www.jboss.com/products/jbossas
19
20distname                        ${name}-${version}.GA-src
21master_sites            sourceforge:${name}
22checksums                       md5 86fafd6fee8e6b658a617e8c8d8ae1c2
23
24depends_lib                     bin:java:kaffe
25                               
26worksrcdir                      ${distname}/build
27
28use_configure           no
29
30build.cmd                       ${worksrcpath}/build.sh
31
32pre-build {
33        # make build.sh executable
34        system "chmod u+x ${worksrcpath}/build.sh"
35}
36
37destroot {
38        set target ${destroot}${prefix}/share/java/${name}
39
40        # Ensure we've got needed directories
41        xinstall -m 755 -d \
42                ${destroot}${prefix}/share/java \
43                ${destroot}${prefix}/share/doc
44       
45        # Install JBoss (use ejb3 if JDK1.5 was detected and it was built)
46        if { [file exists ${worksrcpath}/output/${name}-${version}.GA-ejb3]  } {
47        file copy ${worksrcpath}/output/${name}-${version}.GA-ejb3 ${target}
48        } else {
49                file copy ${worksrcpath}/output/${name}-${version}.GA/bin ${target}/bin
50                file copy ${worksrcpath}/output/${name}-${version}.GA/client ${target}/client
51                file copy ${worksrcpath}/output/${name}-${version}.GA/lib ${target}/lib
52                file copy ${worksrcpath}/output/${name}-${version}.GA/server ${target}/server
53        }
54               
55        # Remove unwanted files
56        foreach f [glob -directory ${target}/bin *.bat] { file delete $f }
57       
58        # make scripts executable
59        system "chmod u+x ${target}/bin/*.sh"
60       
61        # Install the docs
62        file copy ${worksrcpath}/output/${name}-${version}.GA/docs \
63                ${destroot}${prefix}/share/doc/${name}
64}
65
66startupitem.create              yes
67startupitem.start               "${prefix}/share/java/${name}/bin/run.sh"
68startupitem.stop                "${prefix}/share/java/${name}/bin/shutdown.sh"