204 lines
6.9 KiB
RPMSpec
204 lines
6.9 KiB
RPMSpec
#
|
|
# spec file for package rhino
|
|
#
|
|
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
# Copyright (c) 2000-2009, JPackage Project
|
|
# All rights reserved.
|
|
#
|
|
# 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/
|
|
#
|
|
|
|
|
|
%define section free
|
|
%define cvs_version 1_7R2
|
|
%define archive_version 1_7R2
|
|
|
|
Name: rhino
|
|
Version: 1.7
|
|
Release: 20
|
|
Summary: JavaScript for Java
|
|
License: MPL ..
|
|
# wget ftp://ftp.mozilla.org/pub/mozilla.org/js/rhino%{archive_version}.zip
|
|
# unzip -q rhino%{archive_version}.zip
|
|
# find rhino%{archive_version}/ -name '*jar' | xargs rm -rf
|
|
# tar -cjf rhino%{archive_version}.tar.bz2 rhino%{archive_version}/
|
|
Source0: rhino%{archive_version}.tar.bz2
|
|
Source2: rhino.script
|
|
Source3: rhino-debugger.script
|
|
Source4: rhino-idswitch.script
|
|
Source5: rhino-jsc.script
|
|
Source6: rhino-js.pom
|
|
Source7: rhino.pom
|
|
Source8: rhino-component-info.xml
|
|
# export CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/www
|
|
# vs -z3 co mozilla-org/html/rhino
|
|
# cd mozilla-org/html/
|
|
# rm -r rhino/apidocs # the javadoc is in different directory
|
|
# tar -cjf rhino-docs.tar.bz2 rhino
|
|
Source100: rhino-docs.tar.bz2
|
|
Patch0: rhino-build.patch
|
|
Patch1: rhino-dojo.patch
|
|
Patch2: rhino-class-loader.patch
|
|
Patch3: rhino-288467.patch
|
|
#PATCH-FIX-OPENSUSE: allow build under gcj
|
|
Patch100: rhino-1.7-gcj.patch
|
|
Url: http://www.mozilla.org/rhino/
|
|
Group: Development/Libraries/Java
|
|
Requires: jline
|
|
Requires: bea-stax-api
|
|
Requires: xmlbeans
|
|
BuildRequires: ant
|
|
BuildRequires: jpackage-utils
|
|
BuildRequires: jline
|
|
BuildRequires: bea-stax-api
|
|
BuildRequires: xmlbeans-mini
|
|
BuildRequires: unzip
|
|
BuildRequires: xerces-j2-bootstrap
|
|
#!BuildIgnore: xerces-j2 xml-commons xml-commons-apis xml-commons-resolver
|
|
#!BuildIgnore: antlr antlr-java
|
|
#!BuildIgnore: xml-commons-jaxp-1.3-apis
|
|
BuildArch: noarch
|
|
BuildRequires: java-1_5_0-gcj-compat-devel
|
|
#!BuildIgnore: java-1_6_0-openjdk java-1_6_0-openjdk-devel
|
|
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.
|
|
|
|
This version contains Dojo's JavaScript compression patch.
|
|
|
|
%package demo
|
|
License: MPL ..
|
|
Summary: JavaScript for Java
|
|
Group: Development/Libraries/Java
|
|
|
|
%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.
|
|
|
|
|
|
|
|
%package manual
|
|
License: MPL ..
|
|
Summary: JavaScript for Java
|
|
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.
|
|
|
|
|
|
|
|
%package javadoc
|
|
License: MPL ..
|
|
Summary: JavaScript for Java
|
|
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.
|
|
|
|
|
|
|
|
%prep
|
|
%setup -q -n %{name}%{cvs_version} -a 100
|
|
%patch0 -p0 -b .sav0
|
|
%patch1 -p0 -b .sav1
|
|
%patch2 -p0 -b .sav2
|
|
%patch3 -p0 -b .sav3
|
|
%patch100 -p0 -b .sav0
|
|
# Fix build
|
|
%{__perl} -pi -e 's|.*<get.*src=.*>\n||' build.xml testsrc/build.xml toolsrc/org/mozilla/javascript/tools/debugger/build.xml xmlimplsrc/build.xml
|
|
# Fix manifest
|
|
%{__perl} -pi -e 's|^Class-Path:.*\n||g' src/manifest
|
|
# Add jpp release info to version
|
|
%{__perl} -pi -e 's|^implementation.version: Rhino .* release .* \${implementation.date}|implementation.version: Rhino %{version} release %{release} \${implementation.date}|' build.properties
|
|
|
|
%build
|
|
export CLASSPATH=$(build-classpath jline)
|
|
export OPT_JAR_LIST=:
|
|
%{ant} \
|
|
-Dxbean.jar=$(build-classpath xmlbeans/xbean) \
|
|
-Djsr173.jar=$(build-classpath bea-stax-api) \
|
|
deepclean jar copy-all javadoc
|
|
# % if 0
|
|
pushd examples
|
|
export CLASSPATH=../build/%{name}%{archive_version}/js.jar:$(build-classpath xmlbeans/xbean 2>/dev/null)
|
|
javac -C *.java
|
|
jar cvf ../build/%{name}%{archive_version}/%{name}-examples-%{version}.jar *.class
|
|
popd
|
|
# % endif
|
|
|
|
%install
|
|
# jars
|
|
%{__mkdir_p} %{buildroot}%{_javadir}
|
|
%{__cp} -a build/%{name}%{archive_version}/js.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
|
|
# % if 0
|
|
%{__cp} -a build/%{name}%{archive_version}/%{name}-examples-%{version}.jar %{buildroot}%{_javadir}/%{name}-examples-%{version}.jar
|
|
# % endif
|
|
(cd %{buildroot}%{_javadir} && %{__ln_s} %{name}-%{version}.jar js-%{version}.jar)
|
|
(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do %{__ln_s} ${jar} `echo $jar| %{__sed} "s|-%{version}||g"`; done)
|
|
# poms
|
|
%{__mkdir_p} %{buildroot}%{_datadir}/maven2/poms
|
|
%{__cp} -a %{SOURCE6} $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-js.pom
|
|
%{__cp} -a %{SOURCE7} $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}.pom
|
|
%add_to_maven_depmap %{name} %{name} %{version} JPP %{name}
|
|
%add_to_maven_depmap %{name} js %{version} JPP js
|
|
# javadoc
|
|
%{__mkdir_p} %{buildroot}%{_javadocdir}/%{name}-%{version}
|
|
%{__cp} -a javadoc/* %{buildroot}%{_javadocdir}/%{name}-%{version}
|
|
%{__ln_s} %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}
|
|
%{_bindir}/find %{buildroot}%{_javadocdir}/%{name}-%{version} -type f -name '*.html' | %{_bindir}/xargs %{__perl} -pi -e 's/\r$//g'
|
|
# scripts
|
|
%{__mkdir_p} %{buildroot}%{_bindir}
|
|
%{__install} -p -m 0755 %{SOURCE2} %{buildroot}%{_bindir}/%{name}
|
|
%{__install} -p -m 0755 %{SOURCE3} %{buildroot}%{_bindir}/%{name}-debugger
|
|
%{__install} -p -m 0755 %{SOURCE4} %{buildroot}%{_bindir}/%{name}-idswitch
|
|
%{__install} -p -m 0755 %{SOURCE5} %{buildroot}%{_bindir}/%{name}-jsc
|
|
# examples
|
|
%{__mkdir_p} %{buildroot}%{_datadir}/%{name}
|
|
%{__cp} -a examples/* %{buildroot}%{_datadir}/%{name}
|
|
|
|
%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
|
|
%{_datadir}/maven2
|
|
%config %{_mavendepmapfragdir}
|
|
|
|
%files demo
|
|
%defattr(0644,root,root,0755)
|
|
%{_datadir}/%{name}
|
|
|
|
%files manual
|
|
%defattr(0644,root,root,0755)
|
|
%doc %{name}/*
|
|
|
|
%files javadoc
|
|
%defattr(0644,root,root,0755)
|
|
%{_javadocdir}/%{name}-%{version}
|
|
%{_javadocdir}/%{name}
|
|
|
|
%changelog
|