Bootstrap Maven as non-modular packages

Resolves: rhbz#1951482
This commit is contained in:
Mikolaj Izdebski 2021-06-08 20:17:56 +02:00
parent 5aff686c28
commit 359da8b8dd
1 changed files with 23 additions and 28 deletions

View File

@ -1,45 +1,40 @@
%global srcname servlet-api # Workaround for rhbz#1969370: __bootstrap macro is not defined in
# CentOS Stream, See https://bugzilla.redhat.com/1969370
%global __bootstrap ~bootstrap
%bcond_without bootstrap
Name: jakarta-servlet Name: jakarta-servlet
Version: 5.0.0 Version: 5.0.0
Release: 6%{?dist} Release: 8%{?dist}
Summary: Server-side API for handling HTTP requests and responses Summary: Server-side API for handling HTTP requests and responses
# most of the project is EPL-2.0 or GPLv2 w/exceptions, # most of the project is EPL-2.0 or GPLv2 w/exceptions,
# but some files still have Apache-2.0 license headers: # but some files still have Apache-2.0 license headers:
# https://github.com/eclipse-ee4j/servlet-api/issues/347 # https://github.com/eclipse-ee4j/servlet-api/issues/347
License: (EPL-2.0 or GPLv2 with exceptions) and ASL 2.0 License: (EPL-2.0 or GPLv2 with exceptions) and ASL 2.0
URL: https://github.com/eclipse-ee4j/servlet-api URL: https://github.com/eclipse-ee4j/servlet-api
Source0: %{url}/archive/%{version}-RELEASE/%{srcname}-%{version}.tar.gz
BuildArch: noarch BuildArch: noarch
Source0: https://github.com/eclipse-ee4j/servlet-api/archive/%{version}-RELEASE/servlet-api-%{version}.tar.gz
BuildRequires: maven-local BuildRequires: maven-local
%if %{with bootstrap}
BuildRequires: javapackages-bootstrap
%else
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin) BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin)
%endif
# package renamed in fedora 33, remove in fedora 35
Provides: glassfish-servlet-api = %{version}-%{release} Provides: glassfish-servlet-api = %{version}-%{release}
Obsoletes: glassfish-servlet-api < 3.1.0-21
%description %description
Jakarta Servlet defines a server-side API for handling HTTP requests Jakarta Servlet defines a server-side API for handling HTTP requests
and responses. and responses.
%{?javadoc_package}
%package javadoc
Summary: Javadoc for %{name}
# package renamed in fedora 33, remove in fedora 35
Provides: glassfish-servlet-api-javadoc = %{version}-%{release}
Obsoletes: glassfish-servlet-api-javadoc < 3.1.0-21
%description javadoc
This package contains the API documentation for %{name}.
%prep %prep
%setup -q -n %{srcname}-%{version}-RELEASE %setup -q -n servlet-api-%{version}-RELEASE
# remove unnecessary dependency on parent POM # remove unnecessary dependency on parent POM
%pom_remove_parent . api %pom_remove_parent . api
@ -72,26 +67,26 @@ sed -i -e 's/jakarta\./javax./g' $(find api/src/main/java/javax -name *.java)
# add compat symlink for packages constructing the classpath manually # add compat symlink for packages constructing the classpath manually
%mvn_file :{*} %{name}/@1 glassfish-servlet-api %mvn_file :{*} %{name}/@1 glassfish-servlet-api
%build %build
%mvn_build %mvn_build
%install %install
%mvn_install %mvn_install
%files -f .mfiles %files -f .mfiles
%license LICENSE.md NOTICE.md %license LICENSE.md NOTICE.md
%doc README.md %doc README.md
%files javadoc -f .mfiles-javadoc
%license LICENSE.md NOTICE.md
%changelog %changelog
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 5.0.0-6 * Tue Jun 08 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 5.0.0-8
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 - Bootstrap Maven for CentOS Stream 9
* Wed May 26 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 5.0.0-7
- Re-add provides on glassfish-servlet-api
* Mon May 17 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 5.0.0-6
- Bootstrap build
- Non-bootstrap build
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.0-5 * Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild