Name:           glassfish-jsp-api
Version:        2.3.3
Release:        3
Summary:        Glassfish J2EE JSP API specification
License:        (CDDL-1.1 or GPLv2 with exceptions) and ASL 2.0
URL:            https://github.com/javaee/javaee-jsp-api
Source0:        https://github.com/javaee/javaee-jsp-api/archive/javax.servlet.jsp-api-%{version}.tar.gz
Source1:        http://www.apache.org/licenses/LICENSE-2.0.txt
BuildArch:      noarch
BuildRequires:  maven-local mvn(javax.el:javax.el-api)
BuildRequires:  glassfish-jsp-api <= 2.3.3 glassfish-jsp <= 2.3.3 glassfish-servlet-api <= 3.1.0 
BuildRequires:  mvn(net.java:jvnet-parent:pom:) mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires:  mvn(org.apache.maven.plugins:maven-source-plugin)
Obsoletes:      glassfish-jsp-api-javadoc < %{version}-%{release}
Provides:       glassfish-jsp-api-javadoc = %{version}-%{release}

%description
This project provides a container independent specification of JSP 2.2.

%prep
%setup -q -n javaee-jsp-api-javax.servlet.jsp-api-%{version}
cp -p %{SOURCE1} LICENSE-ASL-2.0.txt

pushd api
sed -i "/<bundle.symbolicName>/s/-api//" pom.xml
%pom_xpath_remove "pom:dependency[pom:groupId='javax.el' or pom:groupId='javax.servlet']/pom:scope"
%pom_remove_plugin :maven-gpg-plugin
%pom_remove_plugin :maven-javadoc-plugin
%mvn_alias : javax.servlet:jsp-api
popd

%build
pushd api
%mvn_build
popd

%install
pushd api
%mvn_install
popd

%files
%attr(0644,root,root) %{_datadir}/maven-metadata/glassfish-jsp-api.xml
%attr(0755,root,root) %dir %{_datadir}/java/glassfish-jsp-api
%attr(0644,root,root) %{_datadir}/java/glassfish-jsp-api/javax.servlet.jsp-api.jar
%attr(0755,root,root) %dir %{_datadir}/maven-poms/glassfish-jsp-api
%attr(0644,root,root) %{_datadir}/maven-poms/glassfish-jsp-api/javax.servlet.jsp-api.pom
%{_javadocdir}/%{name}
%license LICENSE-ASL-2.0.txt LICENSE

%changelog
* Wed Feb 22 2023 liyanan <liyanan32@h-partners.com> - 2.3.3-3
- Add glassfish-jsp and glassfish-jsp-api and glassfish-servlet-api version limit

* Thu Dec 11 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.3.3-2
- Package init

