Blame SPECS/jakarta-servlet.spec

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