File oldrhino.spec of Package oldrhino

#
# spec file for package oldrhino (Version 1.5)
#
# Copyright (c) 2008 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
# icecream 0


Name:           oldrhino
BuildRequires:  ant java2-devel-packages unzip xml-commons-apis
#!BuildIgnore: rhino
%define real_name	rhino
%define oldname		old%{real_name}
%define name		%{oldname}
%define version		1.5
%define cvs_version	1_5
%define tar_version	15
%define pre		R3
%define release		0.%{pre}.4jpp
%define section		free
Version:        1.5
Release:        271
Summary:        JavaScript for Java
License:        MOZILLA PUBLIC LICENSE (MPL/NPL)
Source0:        ftp://ftp.mozilla.org/pub/js/%{real_name}%{tar_version}%{pre}.zip
Source1:        http://java.sun.com/products/jfc/tsc/articles/treetable2/downloads/src.zip
Patch:          %{name}-java14compat.patch
Url:            http://www.mozilla.org/rhino/
Group:          Development/Libraries/Java
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Rhino is an open source implementation of JavaScript written entirely
in Java. It is typically embedded into Java applications to provide
scripting to end users.



%package manual
License:        MOZILLA PUBLIC LICENSE (MPL/NPL)
Summary:        Manual for oldrhino
Group:          Development/Libraries/Java

%description manual
Rhino is an open-source implementation of JavaScript written entirely
in Java. It is typically embedded into Java applications to provide
scripting to end users.

This package contains the manual for Rhino.



%package javadoc
License:        MOZILLA PUBLIC LICENSE (MPL/NPL)
PreReq:         coreutils
Summary:        Javadoc for oldrhino
Group:          Development/Libraries/Java

%description javadoc
Rhino is an open-source implementation of JavaScript written entirely
in Java. It is typically embedded into Java applications to provide
scripting to end users.

This package contains the javadoc documentation for Rhino.



%prep
%setup -n %{real_name}%{cvs_version}%{pre}
%patch

%build
perl -p -i -e 's|<javadoc sourcefiles="\${apiClasses}"|<javadoc sourcefiles="org.mozilla.\*"|;' build.xml
perl -p -i -e 's|<get src.*>||;' toolsrc/build.xml
# Fix path between manual and javadocs.
perl -pi -e 's|"apidocs/index.html"|"%{_javadocdir}/%{name}-%{version}/index.html"|' docs/doc.html
install -d -m 755 build
install -m 644 %{SOURCE1} build/swingExSrc.zip
ant -Dbuild.compiler=modern jar javadoc

%install
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
install -m 644 build/%{real_name}%{cvs_version}%{pre}/js.jar $RPM_BUILD_ROOT%{_javadir}/%{oldname}-%{version}.jar
(cd $RPM_BUILD_ROOT%{_javadir} && ln -sf %{oldname}-%{version}.jar oldjs-%{version}.jar)
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} ${jar/-%{version}/}; done)
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{oldname}-%{version}
cp -pr build/%{real_name}%{cvs_version}%{pre}/docs/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{oldname}-%{version}
rm -rf build/%{real_name}%{cvs_version}/docs/apidocs

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%{_javadir}/*

%files manual
%defattr(-,root,root)
%doc build/%{real_name}%{cvs_version}%{pre}/docs/*

%files javadoc
%defattr(-,root,root)
%{_javadocdir}/%{oldname}-%{version}

%changelog
* Wed Nov 05 2008 ro@suse.de
- buildignore rhino to fix build
* Fri Mar 30 2007 ro@suse.de
- added unzip to buildreq
* Thu Sep 21 2006 skh@suse.de
- don't use icecream
- use source="1.4" and target="1.4" for build with java 1.5
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Thu Jul 28 2005 jsmeix@suse.de
- Adjustments in the spec file.
* Mon Jul 18 2005 jsmeix@suse.de
- Current version 1.5 from JPackage.org
* Sat Sep 04 2004 skh@suse.de
- Initial package created with version 1.5 (JPackage 1.5)
openSUSE Build Service is sponsored by