2008-09-24 17:27:47 +02:00
|
|
|
#
|
2011-12-20 11:25:45 +01:00
|
|
|
# spec file for package rhino
|
2008-09-24 17:27:47 +02:00
|
|
|
#
|
2013-01-07 13:18:27 +01:00
|
|
|
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2009-11-23 11:42:15 +01:00
|
|
|
# Copyright (c) 2000-2009, JPackage Project
|
|
|
|
# All rights reserved.
|
2008-09-24 17:27:47 +02:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
2012-01-16 16:49:54 +01:00
|
|
|
|
2008-09-24 17:27:47 +02:00
|
|
|
%define section free
|
2012-01-16 16:49:54 +01:00
|
|
|
%define cvs_version 1_7R3
|
2008-09-24 17:27:47 +02:00
|
|
|
|
|
|
|
Name: rhino
|
2012-01-16 16:49:54 +01:00
|
|
|
Version: 1.7R3
|
2012-06-18 15:25:37 +02:00
|
|
|
Release: 0
|
2008-09-24 17:27:47 +02:00
|
|
|
Summary: JavaScript for Java
|
2012-01-17 14:48:05 +01:00
|
|
|
License: MPL-1.1 or GPL-2.0+
|
2011-12-20 11:25:45 +01:00
|
|
|
Group: Development/Libraries/Java
|
2012-01-16 16:49:54 +01:00
|
|
|
Url: http://www.mozilla.org/rhino/
|
|
|
|
|
|
|
|
# wget ftp://ftp.mozilla.org/pub/mozilla.org/js/rhino%{cvs_version}.zip
|
|
|
|
# unzip -q rhino%{cvs_version}.zip
|
|
|
|
# find rhino%{cvs_version}/ -name '*jar' | xargs rm -rf
|
|
|
|
# tar -czf rhino%{cvs_version}-suse.tar.gz rhino%{cvs_version}/
|
|
|
|
Source0: rhino%{cvs_version}-suse.tar.gz
|
2008-09-24 17:27:47 +02:00
|
|
|
Source2: rhino.script
|
|
|
|
Source3: rhino-debugger.script
|
|
|
|
Source4: rhino-idswitch.script
|
|
|
|
Source5: rhino-jsc.script
|
|
|
|
Source6: rhino-js.pom
|
|
|
|
Source7: rhino.pom
|
2009-11-23 11:42:15 +01:00
|
|
|
Source8: rhino-component-info.xml
|
2012-01-16 16:49:54 +01:00
|
|
|
|
2009-11-23 11:42:15 +01:00
|
|
|
Patch0: rhino-build.patch
|
2012-01-16 16:49:54 +01:00
|
|
|
# Add OSGi metadata from Eclipse Orbit project
|
|
|
|
# Rip out of MANIFEST.MF included in this JAR:
|
|
|
|
# http://www.eclipse.org/downloads/download.php?r=1&file=/tools/orbit/downloads/drops/R20110523182458/repository/plugins/org.mozilla.javascript_1.7.2.v201005080400.jar
|
|
|
|
Patch1: %{name}-addOrbitManifest.patch
|
|
|
|
Patch2: %{name}-1.7R3-crosslink.patch
|
2009-11-23 11:42:15 +01:00
|
|
|
Patch3: rhino-288467.patch
|
|
|
|
#PATCH-FIX-OPENSUSE: allow build under gcj
|
|
|
|
Patch100: rhino-1.7-gcj.patch
|
2012-01-16 16:49:54 +01:00
|
|
|
|
2008-09-24 17:27:47 +02:00
|
|
|
BuildRequires: ant
|
|
|
|
BuildRequires: bea-stax-api
|
2012-06-18 15:25:37 +02:00
|
|
|
BuildRequires: java-1_5_0-gcj-compat-devel
|
2013-09-09 14:00:26 +02:00
|
|
|
BuildRequires: javapackages-tools
|
2011-12-20 11:25:45 +01:00
|
|
|
BuildRequires: jline
|
2013-01-07 13:18:27 +01:00
|
|
|
#BuildRequires: xerces-j2-bootstrap
|
|
|
|
#!BuildIgnore: xerces-j2-bootstrap
|
2011-12-20 11:25:45 +01:00
|
|
|
BuildRequires: xmlbeans-mini
|
2008-10-16 14:33:55 +02:00
|
|
|
#!BuildIgnore: xerces-j2 xml-commons xml-commons-apis xml-commons-resolver
|
2010-09-03 13:32:07 +02:00
|
|
|
#!BuildIgnore: antlr antlr-java
|
2010-11-08 13:08:33 +01:00
|
|
|
#!BuildIgnore: xml-commons-jaxp-1.3-apis
|
2011-03-14 13:55:49 +01:00
|
|
|
#!BuildIgnore: java-1_6_0-openjdk java-1_6_0-openjdk-devel
|
2012-06-18 15:25:37 +02:00
|
|
|
#!BuildIgnore: java-1_7_0-openjdk java-1_7_0-openjdk-devel
|
2012-01-16 16:49:54 +01:00
|
|
|
|
|
|
|
Requires: bea-stax-api
|
2012-06-18 15:25:37 +02:00
|
|
|
Requires: jline
|
2012-01-16 16:49:54 +01:00
|
|
|
Requires: xmlbeans
|
|
|
|
|
|
|
|
BuildArch: noarch
|
2008-09-24 17:27:47 +02:00
|
|
|
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 demo
|
|
|
|
Summary: JavaScript for Java
|
2012-06-18 15:25:37 +02:00
|
|
|
Group: Development/Libraries/Java
|
2008-09-24 17:27:47 +02:00
|
|
|
|
|
|
|
%description demo
|
|
|
|
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.
|
|
|
|
|
|
|
|
%prep
|
2012-01-16 16:49:54 +01:00
|
|
|
# % setup -q -n %{name}%{cvs_version} -a 100
|
|
|
|
%setup -q -n %{name}%{cvs_version}
|
|
|
|
|
2008-09-24 17:27:47 +02:00
|
|
|
# Fix build
|
2012-01-16 16:49:54 +01:00
|
|
|
sed -i -e '/.*<get.*src=.*>$/d' build.xml testsrc/build.xml \
|
|
|
|
toolsrc/org/mozilla/javascript/tools/debugger/build.xml xmlimplsrc/build.xml
|
|
|
|
|
2008-09-24 17:27:47 +02:00
|
|
|
# Fix manifest
|
2012-01-16 16:49:54 +01:00
|
|
|
sed -i -e '/^Class-Path:.*$/d' src/manifest
|
|
|
|
|
2008-09-24 17:27:47 +02:00
|
|
|
# Add jpp release info to version
|
2012-01-16 16:49:54 +01:00
|
|
|
sed -i -e 's|^implementation.version: Rhino .* release .* \${implementation.date}|implementation.version: Rhino %{version} release %{release} \${implementation.date}|' build.properties
|
|
|
|
|
|
|
|
%setup -q -n %{name}%{cvs_version}
|
|
|
|
%patch0 -p0 -b .build
|
|
|
|
%patch1 -p1 -b .fixManifest
|
|
|
|
%patch2 -p1 -b .crosslink
|
|
|
|
%patch3 -p0 -b .sav3
|
|
|
|
%patch100 -p0 -b .gjc
|
2008-09-24 17:27:47 +02:00
|
|
|
|
|
|
|
%build
|
2009-11-23 11:42:15 +01:00
|
|
|
export CLASSPATH=$(build-classpath jline)
|
2008-09-24 17:27:47 +02:00
|
|
|
export OPT_JAR_LIST=:
|
2013-01-07 13:18:27 +01:00
|
|
|
%{ant} -v -d \
|
2013-08-23 13:35:00 +02:00
|
|
|
-Dxbean.jar=$(build-classpath xmlbeans/xbean | cut -d ':' -f 1) \
|
2008-09-24 17:27:47 +02:00
|
|
|
-Djsr173.jar=$(build-classpath bea-stax-api) \
|
2013-08-23 13:35:00 +02:00
|
|
|
deepclean jar copy-all
|
2012-01-16 16:49:54 +01:00
|
|
|
|
2008-09-24 17:27:47 +02:00
|
|
|
pushd examples
|
2012-01-16 16:49:54 +01:00
|
|
|
export CLASSPATH=../build/%{name}%{cvs_version}/js.jar:$(build-classpath xmlbeans/xbean 2>/dev/null)
|
2008-09-24 17:27:47 +02:00
|
|
|
javac -C *.java
|
2012-01-16 16:49:54 +01:00
|
|
|
jar cvf ../build/%{name}%{cvs_version}/%{name}-examples.jar *.class
|
2008-09-24 17:27:47 +02:00
|
|
|
popd
|
|
|
|
|
|
|
|
%install
|
2012-01-16 16:49:54 +01:00
|
|
|
|
2008-09-24 17:27:47 +02:00
|
|
|
# jars
|
2012-01-16 16:49:54 +01:00
|
|
|
mkdir -p %{buildroot}%{_javadir}
|
|
|
|
cp -a build/%{name}%{cvs_version}/js.jar %{buildroot}%{_javadir}
|
|
|
|
ln -s js.jar %{buildroot}%{_javadir}/%{name}.jar
|
|
|
|
|
2008-09-24 17:27:47 +02:00
|
|
|
# scripts
|
2012-01-16 16:49:54 +01:00
|
|
|
mkdir -p %{buildroot}%{_bindir}
|
|
|
|
install -m 0755 %{SOURCE2} %{buildroot}%{_bindir}/%{name}
|
|
|
|
install -m 0755 %{SOURCE3} %{buildroot}%{_bindir}/%{name}-debugger
|
|
|
|
install -m 0755 %{SOURCE4} %{buildroot}%{_bindir}/%{name}-idswitch
|
|
|
|
install -m 0755 %{SOURCE5} %{buildroot}%{_bindir}/%{name}-jsc
|
|
|
|
|
2008-09-24 17:27:47 +02:00
|
|
|
# examples
|
2012-01-16 16:49:54 +01:00
|
|
|
mkdir -p %{buildroot}%{_datadir}/%{name}
|
|
|
|
cp -a examples/* %{buildroot}%{_datadir}/%{name}
|
|
|
|
cp -a build/%{name}%{cvs_version}/%{name}-examples.jar %{buildroot}%{_javadir}/%{name}-examples.jar
|
|
|
|
|
|
|
|
# poms
|
2013-08-23 13:35:00 +02:00
|
|
|
mkdir -p %{buildroot}%{_mavenpomdir}
|
|
|
|
|
|
|
|
cp -a %{SOURCE6} %{buildroot}%{_mavenpomdir}/JPP-js.pom
|
|
|
|
cp -a %{SOURCE7} %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
|
|
|
|
%add_maven_depmap JPP-%{name}.pom %{name}.jar
|
|
|
|
%add_maven_depmap JPP-js.pom js.jar
|
2008-09-24 17:27:47 +02:00
|
|
|
|
|
|
|
%clean
|
|
|
|
%{__rm} -rf %{buildroot}
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(0644,root,root,0755)
|
|
|
|
%doc LICENSE.txt
|
|
|
|
%attr(0755,root,root) %{_bindir}/%{name}
|
|
|
|
%attr(0755,root,root) %{_bindir}/%{name}-debugger
|
|
|
|
%attr(0755,root,root) %{_bindir}/%{name}-idswitch
|
|
|
|
%attr(0755,root,root) %{_bindir}/%{name}-jsc
|
|
|
|
%{_javadir}/*.jar
|
2013-08-23 13:35:00 +02:00
|
|
|
%{_mavenpomdir}/*
|
2009-11-23 11:42:15 +01:00
|
|
|
%config %{_mavendepmapfragdir}
|
2008-09-24 17:27:47 +02:00
|
|
|
|
|
|
|
%files demo
|
|
|
|
%defattr(0644,root,root,0755)
|
|
|
|
%{_datadir}/%{name}
|
|
|
|
|
|
|
|
%changelog
|