servletapi4/servletapi4.spec

118 lines
3.5 KiB
RPMSpec

#
# spec file for package servletapi4 (Version 4.0.4)
#
# Copyright (c) 2009 SUSE LINUX Products 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 http://bugs.opensuse.org/
#
# norootforbuild
Name: servletapi4
BuildRequires: ant java2-devel-packages xml-commons-apis
%define base_name servletapi
%define major_version 4
%define name %{base_name}%{major_version}
%define full_name jakarta-%{base_name}
%define version 4.0.4
%define release 3jpp
%define section free
Version: 4.0.4
Release: 272
Summary: Java servlet and JSP implementation classes
License: The Apache Software License
Group: Development/Libraries/Java
Source: %{full_name}-4-src.tar.gz
Patch150: java150_build.patch
Url: http://jakarta.apache.org/tomcat/
Provides: servlet
PreReq: /usr/sbin/update-alternatives
BuildRequires: ant >= 1.2
BuildRequires: jpackage-utils > 1.4
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Obsoletes: servlet4
Obsoletes: servlet23
Provides: servlet4
Provides: servlet23
%description
This subproject contains the source code for the implementation classes
of the Java Servlet and JSP APIs (packages javax.servlet).
%package javadoc
License: The Apache Software License
Group: Development/Libraries/Java
Summary: Javadoc for servletapi4
PreReq: coreutils
%description javadoc
This subproject contains the source code for the implementation classes
of the Java Servlet and JSP APIs (packages javax.servlet). This package
contains the javadoc documentation for the Java Servlet and JSP APIs.
%prep
rm -rf $RPM_BUILD_ROOT
%setup -n %{full_name}-4-src
%patch150 -p1
%build
ant dist -Dservletapi.build=build -Dservletapi.dist=dist
%install
# jars
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
install -m 644 dist/lib/servlet.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
# javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
cp -pr build/docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
%clean
rm -rf $RPM_BUILD_ROOT
%post
update-alternatives --install %{_javadir}/servlet.jar servlet %{_javadir}/%{name}-%{version}.jar 40
%postun
if [ "$1" = "0" ]; then
update-alternatives --remove servlet %{_javadir}/%{name}-%{version}.jar
fi
%files
%defattr(-,root,root)
%doc LICENSE README.txt
%{_javadir}/*
%files javadoc
%defattr(-,root,root)
%{_javadocdir}/%{name}
%changelog
* Mon Sep 25 2006 dbornkessel@suse.de
- fixes necessary to compile with Java 1.5.0
- set source="1.4" and target="1.4" for ant "javac" tasks
- set source="1.4" for ant "javadoc" tasks
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Thu Sep 29 2005 dmueller@suse.de
- add norootforbuild
* Thu Sep 16 2004 skh@suse.de
- Fix prerequires
* Thu Sep 02 2004 skh@suse.de
- Initial package created with version 4.0.4 (JPackage 1.5)