Changeset 95513


Ignore:
Timestamp:
Jul 14, 2012, 8:45:25 PM (7 years ago)
Author:
blair@…
Message:

tomcat{5,6}: whitespace changes: move to 4-space indentation.

Location:
trunk/dports/java
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/java/tomcat5/Portfile

    r93558 r95513  
    200200
    201201post-install {
    202         ui_msg "#"
    203         ui_msg "# Configuration files in ${prefix}/${home}/conf have been"
    204         ui_msg "# installed with a .sample extension so that they won't be replaced by a"
    205         ui_msg "# port update. Each will be copied to its proper location during the"
    206         ui_msg "# first startup of tomcat by catalina.sh or tomcatctl if you don't"
    207         ui_msg "# do this yourself first. If this _is_ an update, you might do a diff to"
    208         ui_msg "# verify that you're not missing anything in the newer .sample versions"
    209         ui_msg "# of these files."
    210         ui_msg "#"
    211         ui_msg "# The script ${prefix}/${home}/bin/tomcatctl has been installed to"
    212         ui_msg "# facilitate start and stop of tomcat using the jsvc utility, which allows you to"
    213         ui_msg "# start tomcat as a true daemon process. Once tomcat has acquired its TCP socket,"
    214         ui_msg "# jsvc will drop its root privileges and run as user ${tomcatuser}."
    215         ui_msg "#"
    216         ui_msg "# Under Apple Java, control over the Java version used to launch ${name} is"
    217         ui_msg "# through the shell variable JAVA_JVM_VERSION. This variable should be set"
    218         ui_msg "# to a java version such as 1.4, 1.5, or CurrentJDK (for the default version)."
    219         ui_msg "# You may set JAVA_JVM_VERSION in ${prefix}/${home}/bin/setenv.sh."
    220         ui_msg "#"
     202    ui_msg "#"
     203    ui_msg "# Configuration files in ${prefix}/${home}/conf have been"
     204    ui_msg "# installed with a .sample extension so that they won't be replaced by a"
     205    ui_msg "# port update. Each will be copied to its proper location during the"
     206    ui_msg "# first startup of tomcat by catalina.sh or tomcatctl if you don't"
     207    ui_msg "# do this yourself first. If this _is_ an update, you might do a diff to"
     208    ui_msg "# verify that you're not missing anything in the newer .sample versions"
     209    ui_msg "# of these files."
     210    ui_msg "#"
     211    ui_msg "# The script ${prefix}/${home}/bin/tomcatctl has been installed to"
     212    ui_msg "# facilitate start and stop of tomcat using the jsvc utility, which allows you to"
     213    ui_msg "# start tomcat as a true daemon process. Once tomcat has acquired its TCP socket,"
     214    ui_msg "# jsvc will drop its root privileges and run as user ${tomcatuser}."
     215    ui_msg "#"
     216    ui_msg "# Under Apple Java, control over the Java version used to launch ${name} is"
     217    ui_msg "# through the shell variable JAVA_JVM_VERSION. This variable should be set"
     218    ui_msg "# to a java version such as 1.4, 1.5, or CurrentJDK (for the default version)."
     219    ui_msg "# You may set JAVA_JVM_VERSION in ${prefix}/${home}/bin/setenv.sh."
     220    ui_msg "#"
    221221}
    222222
  • trunk/dports/java/tomcat6/Portfile

    r95045 r95513  
    44PortSystem 1.0
    55
    6 name                    tomcat6
    7 version                 6.0.32
    8 revision                1
    9 
    10 categories              java www
    11 maintainers             blair openmaintainer
    12 license                 Apache-2
    13 platforms               darwin
    14 
    15 description             Tomcat 6 HTTP Server and Java Servlet Container.
    16 long_description        Tomcat is the servlet container that is used in \
    17                         the official Reference Implementation for the \
    18                         Java Servlet and JavaServer Pages technologies.
    19 homepage                http://tomcat.apache.org/
    20 
    21 distname                apache-tomcat-${version}-src
    22 master_sites            apache:tomcat/tomcat-6/v${version}/src/
    23 
    24 checksums               md5    19a1eaa9c9938b520d3c360d8cf4af22 \
    25                         sha1   ec94c511e54da2b02dd2ba45b9fd1703d5771a45 \
    26                         rmd160 e6203645e6570564b25154018436d908c5b1a71a
    27 
    28 patchfiles              patch-bin-catalina.sh \
    29                         patch-build.xml.diff
    30 
    31 depends_build           bin:ant:apache-ant
    32 depends_lib             bin:java:kaffe \
    33                         bin:jsvc:commons-daemon \
    34                         port:jakarta-taglibs-standard-11 \
    35                         port:commons-beanutils \
    36                         port:commons-collections \
    37                         port:commons-launcher \
    38                         port:commons-daemon \
    39                         port:commons-digester \
    40                         port:commons-el \
    41                         port:commons-logging \
    42                         port:commons-modeler \
    43                         port:commons-httpclient \
    44                         port:commons-pool \
    45                         port:commons-dbcp \
    46                         port:commons-fileupload \
    47                         port:commons-io \
    48                         port:jakarta-regexp \
    49                         port:xercesj \
    50                         port:jakarta-log4j \
    51                         port:mx4j \
    52                         port:junit \
    53                         port:saxpath
    54 
    55 ##                      port:jaxen \
    56 
    57 set javaLibs            ${prefix}/share/java
    58 set home                share/java/tomcat6
    59 set tomcatuser          www
    60 set tomcatgroup         www
    61 
    62 use_configure           no
    63 
    64 build.cmd               ant
    65 build.target            download
    66 set antArgs             [join "
    67                                -Dversion=${version}
    68                                -Dversion.build=[lindex [split ${version} .] 2]
    69                                -Dbase.path=${worksrcpath}/Repository
    70                                -Dnsis.exe=${worksrcpath}/.bogus
    71                                -Dcommons-beanutils.jar=${javaLibs}/commons-beanutils.jar
    72                                -Dcommons-collections.jar=${javaLibs}/commons-collections.jar
    73                                -Dcommons-launcher.jar=${javaLibs}/commons-launcher.jar
    74                                -Dcommons-daemon.jar=${javaLibs}/commons-daemon.jar
    75                                -Dcommons-digester.jar=${javaLibs}/commons-digester.jar
    76                                -Dcommons-el.jar=${javaLibs}/commons-el.jar
    77                                -Dcommons-logging.jar=${javaLibs}/commons-logging.jar
    78                                -Dcommons-logging-api.jar=${javaLibs}/commons-logging-api.jar
    79                                -Dcommons-modeler.jar=${javaLibs}/commons-modeler.jar
    80                                -Dcommons-httpclient.jar=${javaLibs}/commons-httpclient.jar
    81                                -Dcommons-pool.jar=${javaLibs}/commons-pool.jar
    82                                -Dcommons-dbcp.jar=${javaLibs}/commons-dbcp.jar
    83                                -Dcommons-fileupload.jar=${javaLibs}/commons-fileupload.jar
    84                                -Dregexp.jar=${javaLibs}/jakarta-regexp.jar
    85                                -DxercesImpl.jar=${javaLibs}/xercesImpl.jar
    86                                -Dxml-apis.jar=${javaLibs}/xml-apis.jar
    87                                -Dlog4j.jar=${javaLibs}/jakarta-log4j.jar
    88                                -Djmx.lib=${javaLibs}
    89                                -Djunit.jar=${javaLibs}/junit.jar
    90                                -Dsaxpath.jar=${javaLibs}/saxpath.jar
    91                                -Djasper.home=${worksrcpath}/../jasper
    92                               "]
    93 #                              -Dstruts.lib=${javaLibs}/struts/lib
    94 ##                             -Djaxen.jar=${javaLibs}/jaxen.jar
    95 
    96 build.args              $antArgs
     6name            tomcat6
     7version         6.0.32
     8revision        1
     9
     10categories      java www
     11maintainers     blair openmaintainer
     12license         Apache-2
     13platforms       darwin
     14
     15description     Tomcat 6 HTTP Server and Java Servlet Container.
     16long_description \
     17    Tomcat is the servlet container that is used in the official
     18    Reference Implementation for the Java Servlet and JavaServer Pages
     19    technologies.
     20homepage        http://tomcat.apache.org/
     21
     22distname        apache-tomcat-${version}-src
     23master_sites    apache:tomcat/tomcat-6/v${version}/src/
     24
     25checksums       md5    19a1eaa9c9938b520d3c360d8cf4af22 \
     26                sha1   ec94c511e54da2b02dd2ba45b9fd1703d5771a45 \
     27                rmd160 e6203645e6570564b25154018436d908c5b1a71a
     28
     29patchfiles      patch-bin-catalina.sh \
     30                patch-build.xml.diff
     31
     32depends_build   bin:ant:apache-ant
     33depends_lib     bin:java:kaffe \
     34                bin:jsvc:commons-daemon \
     35                port:jakarta-taglibs-standard-11 \
     36                port:commons-beanutils \
     37                port:commons-collections \
     38                port:commons-launcher \
     39                port:commons-daemon \
     40                port:commons-digester \
     41                port:commons-el \
     42                port:commons-logging \
     43                port:commons-modeler \
     44                port:commons-httpclient \
     45                port:commons-pool \
     46                port:commons-dbcp \
     47                port:commons-fileupload \
     48                port:commons-io \
     49                port:jakarta-regexp \
     50                port:xercesj \
     51                port:jakarta-log4j \
     52                port:mx4j \
     53                port:junit \
     54                port:saxpath
     55
     56##              port:jaxen \
     57
     58set javaLibs    ${prefix}/share/java
     59set home        share/java/tomcat6
     60set tomcatuser  www
     61set tomcatgroup www
     62
     63use_configure   no
     64
     65build.cmd       ant
     66build.target    download
     67set antArgs     [join "
     68                       -Dversion=${version}
     69                       -Dversion.build=[lindex [split ${version} .] 2]
     70                       -Dbase.path=${worksrcpath}/Repository
     71                       -Dnsis.exe=${worksrcpath}/.bogus
     72                       -Dcommons-beanutils.jar=${javaLibs}/commons-beanutils.jar
     73                       -Dcommons-collections.jar=${javaLibs}/commons-collections.jar
     74                       -Dcommons-launcher.jar=${javaLibs}/commons-launcher.jar
     75                       -Dcommons-daemon.jar=${javaLibs}/commons-daemon.jar
     76                       -Dcommons-digester.jar=${javaLibs}/commons-digester.jar
     77                       -Dcommons-el.jar=${javaLibs}/commons-el.jar
     78                       -Dcommons-logging.jar=${javaLibs}/commons-logging.jar
     79                       -Dcommons-logging-api.jar=${javaLibs}/commons-logging-api.jar
     80                       -Dcommons-modeler.jar=${javaLibs}/commons-modeler.jar
     81                       -Dcommons-httpclient.jar=${javaLibs}/commons-httpclient.jar
     82                       -Dcommons-pool.jar=${javaLibs}/commons-pool.jar
     83                       -Dcommons-dbcp.jar=${javaLibs}/commons-dbcp.jar
     84                       -Dcommons-fileupload.jar=${javaLibs}/commons-fileupload.jar
     85                       -Dregexp.jar=${javaLibs}/jakarta-regexp.jar
     86                       -DxercesImpl.jar=${javaLibs}/xercesImpl.jar
     87                       -Dxml-apis.jar=${javaLibs}/xml-apis.jar
     88                       -Dlog4j.jar=${javaLibs}/jakarta-log4j.jar
     89                       -Djmx.lib=${javaLibs}
     90                       -Djunit.jar=${javaLibs}/junit.jar
     91                       -Dsaxpath.jar=${javaLibs}/saxpath.jar
     92                       -Djasper.home=${worksrcpath}/../jasper
     93                      "]
     94#                      -Dstruts.lib=${javaLibs}/struts/lib
     95##                     -Djaxen.jar=${javaLibs}/jaxen.jar
     96
     97build.args      $antArgs
    9798
    9899pre-build {
    99         #
    100         # Tomcat in this version requires ant 1.6.5.
    101         # If the current version of ant is not at least 1.6.5 then
    102         # tell the user and fail.
    103         #
    104         if { [string length [auto_execok ant]] } {
    105                 set verOutput [exec ant -version]
    106                 regexp {version (\d+(\.\d+)*)} $verOutput -> antVersion
    107                 if { [vercmp $antVersion "1.6.5"] < 0 } {
    108                         return -code error "This version of tomcat requires ant version 1.6.5 or better. Please install a newer ant before proceeding."
    109                 }
     100    #
     101    # Tomcat in this version requires ant 1.6.5.
     102    # If the current version of ant is not at least 1.6.5 then
     103    # tell the user and fail.
     104    #
     105    if { [string length [auto_execok ant]] } {
     106        set verOutput [exec ant -version]
     107        regexp {version (\d+(\.\d+)*)} $verOutput -> antVersion
     108        if { [vercmp $antVersion "1.6.5"] < 0 } {
     109            return -code error "This version of tomcat requires ant version 1.6.5 or better. Please install a newer ant before proceeding."
    110110        }
    111 
    112         # Make a bogus file to prevent nsis.exe from downloading
    113         system "touch ${worksrcpath}/.bogus"
     111    }
     112
     113    # Make a bogus file to prevent nsis.exe from downloading
     114    system "touch ${worksrcpath}/.bogus"
    114115}
    115116
    116117destroot {
    117         set target ${destroot}${prefix}/${home}
    118         xinstall -m 755 -d ${target}
    119 
    120         # Ensure we've got needed directories
    121         ui_msg "# setting up needed dirs"
    122         xinstall -m 755 -d \
    123                 ${destroot}${prefix}/share/java \
    124                 ${destroot}${prefix}/share/doc \
    125                 ${destroot}${prefix}/etc/rc.d
    126 
    127         # Create the tomcat user
    128         addgroup ${tomcatgroup}
    129         set gid [existsgroup ${tomcatgroup}]
    130         add_users ${tomcatuser} gid=${gid} realname=Web Server
    131 
    132         # Install Tomcat
    133         ui_msg "# installing tomcat..."
    134         system "cd ${worksrcpath} && ant $antArgs deploy"
    135         ## build space:
    136         file copy ${worksrcpath}/output/build/bin ${target}
    137         file copy ${worksrcpath}/output/build/conf ${target}
    138         file copy ${worksrcpath}/output/build/lib ${target}
    139         file copy ${worksrcpath}/output/build/temp ${target}
    140         file copy ${worksrcpath}/output/build/webapps ${target}
    141         ## and classes:
    142         file copy ${worksrcpath}/output/classes ${target}/shared/
    143 
    144         # Add the jstl libs to tomcat6/shared/lib so that they're
    145         # available to all
    146         ui_msg "# adding the jstl libs "
    147         xinstall -m 755 -d ${target}/shared/lib
    148         xinstall -m 644 \
    149                 ${prefix}/share/java/jstl.jar \
    150                 ${prefix}/share/java/standard.jar \
    151                 ${target}/shared/lib
    152 
    153         # Remove unwanted files
    154         foreach f [glob -directory ${target}/bin *.bat] { file delete $f }
    155 
    156         # Maintain empty directories
    157         ui_msg "# maint. empty dirs... "
    158         xinstall -m 755 -d ${target}/work
    159         xinstall -m 755 -d ${target}/logs
    160         destroot.keepdirs-append \
    161                 ${target}/logs \
    162                 ${target}/temp \
    163                 ${target}/work \
    164                 ${target}/shared/classes \
    165                 ${target}/common/classes
    166 
    167         # Install our scripts
    168         ui_msg "# adding our scripts "
    169         xinstall -m 755 \
    170                 ${filespath}/tomcatctl \
    171                 ${filespath}/conf_setup.sh \
    172                 ${filespath}/setenv.sh \
    173                 ${target}/bin
    174         ui_msg "# adding our scripts 2"
    175         xinstall -m 755 \
    176                 ${filespath}/setenv.local \
    177                 ${target}/conf
    178 
    179         # Add a symlink from bin directory to tomcatctl
    180         system "cd ${destroot}${prefix}/bin && ln -s ../${home}/bin/tomcatctl"
    181 
    182         # Configure the scripts
    183         reinplace s|PREFIX=$|PREFIX=${prefix}| ${target}/bin/tomcatctl
    184         reinplace s|TOMCAT_USER=$|TOMCAT_USER=${tomcatuser}| ${target}/bin/tomcatctl
    185 
    186         # Rename certain files as .sample to avoid replacing them on update
    187         # These will be "repaired" by conf_setup.sh on first run
    188         foreach f "
    189                    catalina.policy
    190                    catalina.properties
    191                    server.xml
    192                    tomcat-users.xml
    193                    web.xml
    194                    setenv.local
    195                   " {
    196                 file rename ${target}/conf/${f} ${target}/conf/${f}.sample
    197         }
    198 
    199         # Fix ownership of some directories tomcat really needs to write to
    200         system "chown -R ${tomcatuser}:${tomcatgroup} \
    201                 ${target}/conf \
    202                 ${target}/logs \
    203                 ${target}/temp \
    204                 ${target}/webapps \
    205                 ${target}/work"
    206 
    207         # Install the docs
    208         file copy ${worksrcpath}/webapps/docs \
    209                 ${destroot}${prefix}/share/doc/${name}
     118    set target ${destroot}${prefix}/${home}
     119    xinstall -m 755 -d ${target}
     120
     121    # Ensure we've got needed directories
     122    ui_msg "# setting up needed dirs"
     123    xinstall -m 755 -d \
     124        ${destroot}${prefix}/share/java \
     125        ${destroot}${prefix}/share/doc \
     126        ${destroot}${prefix}/etc/rc.d
     127
     128    # Create the tomcat user
     129    addgroup ${tomcatgroup}
     130    set gid [existsgroup ${tomcatgroup}]
     131    add_users ${tomcatuser} gid=${gid} realname=Web Server
     132
     133    # Install Tomcat
     134    ui_msg "# installing tomcat..."
     135    system "cd ${worksrcpath} && ant $antArgs deploy"
     136    ## build space:
     137    file copy ${worksrcpath}/output/build/bin ${target}
     138    file copy ${worksrcpath}/output/build/conf ${target}
     139    file copy ${worksrcpath}/output/build/lib ${target}
     140    file copy ${worksrcpath}/output/build/temp ${target}
     141    file copy ${worksrcpath}/output/build/webapps ${target}
     142    ## and classes:
     143    file copy ${worksrcpath}/output/classes ${target}/shared/
     144
     145    # Add the jstl libs to tomcat6/shared/lib so that they're
     146    # available to all
     147    ui_msg "# adding the jstl libs "
     148    xinstall -m 755 -d ${target}/shared/lib
     149    xinstall -m 644 \
     150        ${prefix}/share/java/jstl.jar \
     151        ${prefix}/share/java/standard.jar \
     152        ${target}/shared/lib
     153
     154    # Remove unwanted files
     155    foreach f [glob -directory ${target}/bin *.bat] { file delete $f }
     156
     157    # Maintain empty directories
     158    ui_msg "# maint. empty dirs... "
     159    xinstall -m 755 -d ${target}/work
     160    xinstall -m 755 -d ${target}/logs
     161    destroot.keepdirs-append \
     162        ${target}/logs \
     163        ${target}/temp \
     164        ${target}/work \
     165        ${target}/shared/classes \
     166        ${target}/common/classes
     167
     168    # Install our scripts
     169    ui_msg "# adding our scripts "
     170    xinstall -m 755 \
     171        ${filespath}/tomcatctl \
     172        ${filespath}/conf_setup.sh \
     173        ${filespath}/setenv.sh \
     174        ${target}/bin
     175    ui_msg "# adding our scripts 2"
     176    xinstall -m 755 \
     177        ${filespath}/setenv.local \
     178        ${target}/conf
     179
     180    # Add a symlink from bin directory to tomcatctl
     181    system "cd ${destroot}${prefix}/bin && ln -s ../${home}/bin/tomcatctl"
     182
     183    # Configure the scripts
     184    reinplace s|PREFIX=$|PREFIX=${prefix}| ${target}/bin/tomcatctl
     185    reinplace s|TOMCAT_USER=$|TOMCAT_USER=${tomcatuser}| ${target}/bin/tomcatctl
     186
     187    # Rename certain files as .sample to avoid replacing them on update
     188    # These will be "repaired" by conf_setup.sh on first run
     189    foreach f "
     190               catalina.policy
     191               catalina.properties
     192               server.xml
     193               tomcat-users.xml
     194               web.xml
     195               setenv.local
     196              " {
     197        file rename ${target}/conf/${f} ${target}/conf/${f}.sample
     198    }
     199
     200    # Fix ownership of some directories tomcat really needs to write to
     201    system "chown -R ${tomcatuser}:${tomcatgroup} \
     202            ${target}/conf \
     203            ${target}/logs \
     204            ${target}/temp \
     205            ${target}/webapps \
     206            ${target}/work"
     207
     208    # Install the docs
     209    file copy ${worksrcpath}/webapps/docs \
     210        ${destroot}${prefix}/share/doc/${name}
    210211}
    211212
    212213
    213214post-install {
    214         ui_msg "#"
    215         ui_msg "# Configuration files in ${prefix}/${home}/conf have been"
    216         ui_msg "# installed with a .sample extension so that they won't be replaced by a"
    217         ui_msg "# port update. Each will be copied to its proper location during the"
    218         ui_msg "# first startup of tomcat by catalina.sh or tomcatctl if you don't"
    219         ui_msg "# do this yourself first. If this _is_ an update, you might do a diff to"
    220         ui_msg "# verify that you're not missing anything in the newer .sample versions"
    221         ui_msg "# of these files."
    222         ui_msg "#"
    223         ui_msg "# The script ${prefix}/${home}/bin/tomcatctl has been installed to"
    224         ui_msg "# facilitate start and stop of tomcat using the jsvc utility, which allows you to"
    225         ui_msg "# start tomcat as a true daemon process. Once tomcat has acquired its TCP socket,"
    226         ui_msg "# jsvc will drop its root privileges and run as user ${tomcatuser}."
    227         ui_msg "#"
    228         ui_msg "# Under Apple Java, control over the Java version used to launch ${name} is"
    229         ui_msg "# through the shell variable JAVA_JVM_VERSION. This variable should be set"
    230         ui_msg "# to a java version such as 1.5, 1.6, or CurrentJDK (for the default version)."
    231         ui_msg "# You may set JAVA_JVM_VERSION in ${prefix}/${home}/bin/setenv.sh."
    232         ui_msg "#"
     215    ui_msg "#"
     216    ui_msg "# Configuration files in ${prefix}/${home}/conf have been"
     217    ui_msg "# installed with a .sample extension so that they won't be replaced by a"
     218    ui_msg "# port update. Each will be copied to its proper location during the"
     219    ui_msg "# first startup of tomcat by catalina.sh or tomcatctl if you don't"
     220    ui_msg "# do this yourself first. If this _is_ an update, you might do a diff to"
     221    ui_msg "# verify that you're not missing anything in the newer .sample versions"
     222    ui_msg "# of these files."
     223    ui_msg "#"
     224    ui_msg "# The script ${prefix}/${home}/bin/tomcatctl has been installed to"
     225    ui_msg "# facilitate start and stop of tomcat using the jsvc utility, which allows you to"
     226    ui_msg "# start tomcat as a true daemon process. Once tomcat has acquired its TCP socket,"
     227    ui_msg "# jsvc will drop its root privileges and run as user ${tomcatuser}."
     228    ui_msg "#"
     229    ui_msg "# Under Apple Java, control over the Java version used to launch ${name} is"
     230    ui_msg "# through the shell variable JAVA_JVM_VERSION. This variable should be set"
     231    ui_msg "# to a java version such as 1.5, 1.6, or CurrentJDK (for the default version)."
     232    ui_msg "# You may set JAVA_JVM_VERSION in ${prefix}/${home}/bin/setenv.sh."
     233    ui_msg "#"
    233234}
    234235
     
    237238startupitem.pidfile     clean "${prefix}/share/java/tomcat6/logs/${name}.pid"
    238239
    239 
    240240livecheck.type          regex
    241241livecheck.url           ${homepage}/download-60.cgi
Note: See TracChangeset for help on using the changeset viewer.