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
|
|
|
#
|
2019-02-12 11:57:28 +01:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2009-11-23 11:42:15 +01:00
|
|
|
# Copyright (c) 2000-2009, JPackage Project
|
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.
|
|
|
|
|
2018-11-18 17:33:30 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2008-09-24 17:27:47 +02:00
|
|
|
#
|
|
|
|
|
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
|
2018-05-17 21:58:12 +02:00
|
|
|
License: MPL-1.1 OR GPL-2.0-or-later
|
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
|
|
|
|
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
|
2008-09-24 17:27:47 +02:00
|
|
|
BuildRequires: ant
|
|
|
|
BuildRequires: bea-stax-api
|
2017-10-03 08:53:13 +02:00
|
|
|
BuildRequires: java-devel >= 1.6
|
2018-11-18 17:33:30 +01:00
|
|
|
BuildRequires: javapackages-local
|
2017-09-15 07:51:21 +02:00
|
|
|
BuildRequires: xmlbeans-mini
|
|
|
|
#!BuildIgnore: antlr
|
|
|
|
#!BuildIgnore: antlr-java
|
|
|
|
#!BuildIgnore: xerces-j2
|
2013-01-07 13:18:27 +01:00
|
|
|
#!BuildIgnore: xerces-j2-bootstrap
|
2017-09-15 07:51:21 +02:00
|
|
|
#!BuildIgnore: xml-commons
|
|
|
|
#!BuildIgnore: xml-commons-apis
|
2010-11-08 13:08:33 +01:00
|
|
|
#!BuildIgnore: xml-commons-jaxp-1.3-apis
|
2017-09-15 07:51:21 +02:00
|
|
|
#!BuildIgnore: xml-commons-resolver
|
2012-01-16 16:49:54 +01:00
|
|
|
Requires: bea-stax-api
|
2019-02-12 12:02:17 +01:00
|
|
|
Requires: jline
|
2012-01-16 16:49:54 +01:00
|
|
|
Requires: xmlbeans
|
2017-05-19 13:28:32 +02:00
|
|
|
BuildArch: noarch
|
2008-09-24 17:27:47 +02:00
|
|
|
|
|
|
|
%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}
|
2017-05-19 13:28:32 +02:00
|
|
|
%patch0 -b .build
|
2012-01-16 16:49:54 +01:00
|
|
|
%patch1 -p1 -b .fixManifest
|
|
|
|
%patch2 -p1 -b .crosslink
|
2017-05-19 13:28:32 +02:00
|
|
|
%patch3 -b .sav3
|
|
|
|
%patch100 -b .gjc
|
2008-09-24 17:27:47 +02:00
|
|
|
|
|
|
|
%build
|
2019-02-12 11:57:28 +01:00
|
|
|
export CLASSPATH=
|
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) \
|
2017-10-03 08:53:13 +02:00
|
|
|
-Dtarget-jvm=6 -Dsource-level=6 \
|
2017-05-19 13:28:32 +02:00
|
|
|
deepclean jar copy-all
|
2012-01-16 16:49:54 +01:00
|
|
|
|
2017-09-15 07:51:21 +02:00
|
|
|
export CLASSPATH=`pwd`/build/%{name}%{cvs_version}/js.jar:$(build-classpath xmlbeans/xbean 2>/dev/null)
|
|
|
|
SOURCEPATH=`pwd`/build/%{name}%{cvs_version}/src
|
2008-09-24 17:27:47 +02:00
|
|
|
pushd examples
|
2017-10-03 08:53:13 +02:00
|
|
|
javac -sourcepath ${SOURCEPATH} -source 6 -target 6 *.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
|
|
|
|
|
2018-11-18 17:33:30 +01:00
|
|
|
# pom
|
|
|
|
mkdir -p %{buildroot}%{_mavenpomdir}
|
|
|
|
cp -a %{SOURCE6} %{buildroot}%{_mavenpomdir}/js.pom
|
|
|
|
%add_maven_depmap js.pom js.jar -a "org.mozilla:rhino"
|
|
|
|
|
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
|
|
|
|
|
2008-09-24 17:27:47 +02:00
|
|
|
%files
|
|
|
|
%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
|
2018-11-18 17:33:30 +01:00
|
|
|
%{_mavenpomdir}/*.pom
|
|
|
|
%if %{defined _maven_repository}
|
|
|
|
%config(noreplace) %{_mavendepmapfragdir}/%{name}
|
|
|
|
%else
|
|
|
|
%{_datadir}/maven-metadata/%{name}.xml
|
|
|
|
%endif
|
2008-09-24 17:27:47 +02:00
|
|
|
|
|
|
|
%files demo
|
|
|
|
%{_datadir}/%{name}
|
|
|
|
|
|
|
|
%changelog
|