PortSystem 1.0
PortGroup java 1.0
PortGroup deprecated 1.0

# Servlet API 2.4 was developed as part of Tomcat 5.x, which is now end-of-life.
# See https://tomcat.apache.org/whichversion.html
deprecated.eol_version yes

name            servlet24-api
version         5.5.28

categories      java
license         Apache-2
maintainers     nomaintainer
platforms       any
supported_archs noarch

description     Java Servlet 2.4 and JSP 2.0 APIs.
long_description \
    The Java Servlet and JavaServer Pages specifications are developed \
    by Sun under the Java Community Process.  This project provides \
    the servlet and JSP API jars from Tomcat 5.
homepage        https://tomcat.apache.org/

distname        apache-tomcat-${version}-src
dist_subdir     tomcat5
master_sites    apache:tomcat/tomcat-5/v${version}/src/

checksums       md5     73cd758f32dff07e7d26817b50d3448d \
                sha1    73a61aa067f5f90109ce5667136e6eb5f47d462c \
                rmd160  9f6beb4f613e1f075de6f1fe1bde3c9a3b7b18c8


depends_build   bin:ant:apache-ant
depends_lib     bin:java:kaffe

worksrcdir      ${distname}/build

use_configure   no

build.cmd       ant
build.target    build-servletapi build-jspapi
build.args      -Dbase.path=${worksrcpath}/../repository

destroot {
    xinstall -d ${destroot}${prefix}/share/java
    xinstall -m 644 ${worksrcpath}/../repository/jsp-api-2.0/lib/jsp-api.jar \
        ${destroot}${prefix}/share/java/jsp2-api.jar
    xinstall -m 644 \
        ${worksrcpath}/../repository/servlet-api-2.4/lib/servlet-api.jar \
        ${destroot}${prefix}/share/java/servlet24-api.jar
}

livecheck.type  regex
livecheck.url   ${homepage}/download-55.cgi
livecheck.regex "apache-tomcat-(\\d+\\.\\d+(\\.\\d+)?)-src.tar.gz"
