Blame SPECS/jakarta-servlet.spec

469a10
%bcond_with bootstrap
469a10
469a10
Name:           jakarta-servlet
469a10
Version:        5.0.0
469a10
Release:        10%{?dist}
469a10
Summary:        Server-side API for handling HTTP requests and responses
469a10
# most of the project is EPL-2.0 or GPLv2 w/exceptions,
469a10
# but some files still have Apache-2.0 license headers:
469a10
# https://github.com/eclipse-ee4j/servlet-api/issues/347
469a10
License:        (EPL-2.0 or GPLv2 with exceptions) and ASL 2.0
469a10
URL:            https://github.com/eclipse-ee4j/servlet-api
469a10
BuildArch:      noarch
469a10
469a10
Source0:        https://github.com/eclipse-ee4j/servlet-api/archive/%{version}-RELEASE/servlet-api-%{version}.tar.gz
469a10
469a10
BuildRequires:  maven-local
469a10
%if %{with bootstrap}
469a10
BuildRequires:  javapackages-bootstrap
469a10
%else
469a10
BuildRequires:  mvn(org.apache.felix:maven-bundle-plugin)
469a10
BuildRequires:  mvn(org.codehaus.mojo:build-helper-maven-plugin)
469a10
%endif
469a10
469a10
Provides:       glassfish-servlet-api = %{version}-%{release}
469a10
469a10
%description
469a10
Jakarta Servlet defines a server-side API for handling HTTP requests
469a10
and responses.
469a10
469a10
%{?javadoc_package}
469a10
469a10
%prep
469a10
%setup -q -n servlet-api-%{version}-RELEASE
469a10
469a10
# remove unnecessary dependency on parent POM
469a10
%pom_remove_parent . api
469a10
469a10
# do not build specification documentation
469a10
%pom_disable_module spec
469a10
469a10
# Copy to old package name
469a10
# TODO: Remove when all dependencies are migrated from javax.servlet to jakarta.servlet
469a10
cp -pr api/src/main/java/jakarta api/src/main/java/javax
469a10
sed -i -e 's/jakarta\./javax./g' $(find api/src/main/java/javax -name *.java)
469a10
%pom_xpath_replace pom:instructions/pom:Export-Package \
469a10
  '<Export-Package>jakarta.servlet.*,javax.servlet.*;version="4.0.0"</Export-Package>' api
469a10
469a10
# do not install useless parent POM
469a10
%mvn_package jakarta.servlet:servlet-parent __noinstall
469a10
469a10
# remove unnecessary maven plugins
469a10
%pom_remove_plugin -r :formatter-maven-plugin
469a10
%pom_remove_plugin -r :impsort-maven-plugin
469a10
%pom_remove_plugin -r :maven-enforcer-plugin
469a10
%pom_remove_plugin -r :maven-javadoc-plugin
469a10
%pom_remove_plugin -r :maven-source-plugin
469a10
469a10
# add maven artifact coordinate aliases for backwards compatibility
469a10
%mvn_alias jakarta.servlet:jakarta.servlet-api \
469a10
    javax.servlet:javax.servlet-api \
469a10
    javax.servlet:servlet-api
469a10
469a10
# add compat symlink for packages constructing the classpath manually
469a10
%mvn_file :{*} %{name}/@1 glassfish-servlet-api
469a10
469a10
%build
469a10
%mvn_build
469a10
469a10
%install
469a10
%mvn_install
469a10
469a10
%files -f .mfiles
469a10
%license LICENSE.md NOTICE.md
469a10
%doc README.md
469a10
469a10
%changelog
469a10
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 5.0.0-10
469a10
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
469a10
  Related: rhbz#1991688
469a10
469a10
* Wed Jun 09 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 5.0.0-9
469a10
- Rebuild to workaround DistroBaker issue
469a10
469a10
* Tue Jun 08 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 5.0.0-8
469a10
- Bootstrap Maven for CentOS Stream 9
469a10
469a10
* Wed May 26 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 5.0.0-7
469a10
- Re-add provides on glassfish-servlet-api
469a10
469a10
* Mon May 17 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 5.0.0-6
469a10
- Bootstrap build
469a10
- Non-bootstrap build
469a10
469a10
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.0-5
469a10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
469a10
469a10
* Thu Aug 20 2020 Mat Booth <mat.booth@redhat.com> - 5.0.0-4
469a10
- Correct mvn_file macro invokation
469a10
469a10
* Wed Aug 19 2020 Fabio Valentini <decathorpe@gmail.com> - 5.0.0-3
469a10
- Add compat symlink for packages constructing the classpath manually.
469a10
469a10
* Wed Aug 19 2020 Mat Booth <mat.booth@redhat.com> - 5.0.0-2
469a10
- Also ship the API in the old javax namespace to aid transition
469a10
469a10
* Thu Aug 13 2020 Fabio Valentini <decathorpe@gmail.com> - 5.0.0-1
469a10
- Initial package renamed from glassfish-servlet-api.
469a10