glassfish-jsp/glassfish-jsp.spec

109 lines
3.3 KiB
RPMSpec
Raw Normal View History

#
# spec file for package glassfish-jsp
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global artifactId javax.servlet.jsp
%global jspspec 2.3
Name: glassfish-jsp
Version: 2.3.4
Release: 0
Summary: Glassfish J2EE JSP API implementation
License: CDDL-1.1 OR GPL-2.0-only WITH Classpath-exception-2.0
Group: Development/Libraries/Java
URL: http://glassfish.org
Source0: %{artifactId}-%{version}.tar.xz
Source1: https://raw.githubusercontent.com/javaee/javaee-jsp-api/%{artifactId}-%{version}/LICENSE
Patch0: %{name}-build-eclipse-compilers.patch
Patch1: %{name}-port-to-servlet-3.1.patch
Patch2: Tag.patch
BuildRequires: fdupes
BuildRequires: maven-local
BuildRequires: xmvn-subst
BuildRequires: mvn(javax.servlet.jsp:javax.servlet.jsp-api)
BuildRequires: mvn(javax.servlet:javax.servlet-api)
BuildRequires: mvn(net.java:jvnet-parent:pom:)
BuildRequires: mvn(org.apache.ant:ant)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-source-plugin)
BuildRequires: mvn(org.eclipse.jdt:core)
BuildRequires: mvn(org.glassfish:javax.el)
# make sure the symlinks will be correct
Requires: glassfish-jsp-api
Provides: javax.servlet.jsp
Provides: jsp = %{jspspec}
Provides: jsp%{jspspec}
BuildArch: noarch
%description
This project provides a container independent implementation of JSP
2.3. The main goals are:
* Improves current implementation: bug fixes and performance
improvements
* Provides API for use by other tools, such as Netbeans
* Provides a sandbox for new JSP features; provides a reference
implementation of next JSP spec.
%package javadoc
Summary: API documentation for %{name}
Group: Documentation/HTML
%description javadoc
%{summary}.
%prep
%setup -q -n %{artifactId}-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%pom_add_dep org.eclipse.jdt:core::provided
%pom_add_dep org.apache.ant:ant::provided
cp -p %{SOURCE1} .
%{mvn_alias} : "org.eclipse.jetty.orbit:org.apache.jasper.glassfish"
# compat symlink
%{mvn_file} : %{name}/javax.servlet.jsp %{name}
%build
%{mvn_build} -f -- -Dsource=6
%install
%mvn_install
%fdupes -s %{buildroot}%{_javadocdir}
# install j2ee api symlinks
install -d -m 755 %{buildroot}%{_javadir}/javax.servlet.jsp/
pushd %{buildroot}%{_javadir}/javax.servlet.jsp/
for jar in ../%{name}/*jar; do
ln -sf $jar .
done
# copy jsp-api so that build-classpath will include dep as well
build-jar-repository -p . glassfish-jsp-api
xmvn-subst -R %{buildroot} -s .
popd
%files -f .mfiles
%{_javadir}/javax.servlet.jsp
%license LICENSE
%files javadoc -f .mfiles-javadoc
%license LICENSE
%changelog