# Copyright (c) 2000-2005, JPackage Project # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the # distribution. # 3. Neither the name of the JPackage Project nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # %define scm_version 1_7R4 Name: rhino # R3 doesn't mean a prerelease, but behind R there is a version of this implementation # of Javascript version 1.7 (which is independent from this particular implementation, # e.g., there is C++ implementation in Spidermonkey) Version: 1.7R4 Release: %mkrel 2 Summary: JavaScript for Java License: MPLv2.0 Group: Development/Java Source0: https://github.com/mozilla/rhino/archive/Rhino%{scm_version}_RELEASE.zip Source1: http://repo1.maven.org/maven2/org/mozilla/rhino/%{version}/rhino-%{version}.pom Source2: %{name}.script Patch0: %{name}-build.patch # 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 Patch3: %{name}-shell-manpage.patch URL: http://www.mozilla.org/rhino/ BuildRequires: ant BuildRequires: java-devel >= 1:1.6.0.0 Requires: jpackage-utils Requires: jline # Disable xmlbeans until we can get it into Fedora #Requires: xmlbeans #BuildRequires: xmlbeans BuildArch: noarch %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: Examples for %{name} Group: Development/Java %description demo Examples for %{name}. %package manual Summary: Manual for %{name} Group: Development/Java %description manual Documentation for %{name}. %package javadoc Summary: Javadoc for %{name} Group: Documentation BuildRequires: java-javadoc Requires: java-javadoc %description javadoc Javadoc for %{name}. %prep %setup -q -n %{name}-Rhino%{scm_version}_RELEASE %patch0 -p1 -b .build %patch1 -p1 -b .fixManifest %patch2 -p1 -b .crosslink %patch3 -p1 -b .manpage # Fix build sed -i -e '/.*<get.*src=.*>$/d' build.xml testsrc/build.xml \ toolsrc/org/mozilla/javascript/tools/debugger/build.xml xmlimplsrc/build.xml # Fix manifest sed -i -e '/^Class-Path:.*$/d' src/manifest # Add jpp release info to version sed -i -e 's|^implementation.version: Rhino .* release .* \${implementation.date}|implementation.version: Rhino %{version} release %{release} \${implementation.date}|' build.properties %build ant deepclean jar copy-all javadoc -Dno-xmlbeans=1 pushd examples export CLASSPATH=../build/%{name}%{scm_version}/js.jar:$(build-classpath xmlbeans/xbean 2>/dev/null) %{javac} *.java %{jar} cvf ../build/%{name}%{scm_version}/%{name}-examples.jar *.class popd %install # jars mkdir -p %{buildroot}%{_javadir} cp -a build/%{name}%{scm_version}/js.jar %{buildroot}%{_javadir} ln -s js.jar %{buildroot}%{_javadir}/%{name}.jar cp -a build/%{name}%{scm_version}/%{name}-examples.jar %{buildroot}%{_javadir}/%{name}-examples.jar # javadoc mkdir -p %{buildroot}%{_javadocdir}/%{name} cp -a build/%{name}%{scm_version}/javadoc/* %{buildroot}%{_javadocdir}/%{name} # man page mkdir -p %{buildroot}%{_mandir}/man1/ install -m 644 build/%{name}%{scm_version}/man/%{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1 ## script mkdir -p %{buildroot}%{_bindir} install -m 755 %{SOURCE2} %{buildroot}%{_bindir}/%{name} # examples mkdir -p %{buildroot}%{_datadir}/%{name} cp -a examples/* %{buildroot}%{_datadir}/%{name} find %{buildroot}%{_datadir}/%{name} -name '*.build' -delete # POM and depmap install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir} install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom %add_maven_depmap JPP-%{name}.pom %{name}.jar -a "rhino:js" %files %defattr(0644,root,root,0755) %attr(0755,root,root) %{_bindir}/* %{_javadir}/* %{_mavenpomdir}/JPP-%{name}.pom %{_mavendepmapfragdir}/%{name} %{_mandir}/man1/%{name}.1* %files demo %{_datadir}/%{name} %files manual %if 0 %doc build/%{name}%{scm_version}/docs/* %endif %files javadoc %doc %{_javadocdir}/%{name} %changelog * Tue Oct 22 2013 umeabot <umeabot> 1.7R4-2.mga4 + Revision: 542312 - Mageia 4 Mass Rebuild * Mon Oct 14 2013 dmorgan <dmorgan> 1.7R4-1.mga4 + Revision: 497352 - New version * Mon Jan 14 2013 umeabot <umeabot> 1.7R3-8.mga3 + Revision: 380334 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Sun Dec 16 2012 dmorgan <dmorgan> 1.7R3-7.mga3 + Revision: 331594 - New version * Mon Jan 16 2012 dmorgan <dmorgan> 0:1.7-1.mga2 + Revision: 196682 - Migrate to new maven macros - Remove gcj support * Mon Sep 12 2011 gil <gil> 0:1.7-0.0.7.mga2 + Revision: 142780 - added m2 pom2 + pterjan <pterjan> - imported package rhino * Fri Dec 03 2010 Oden Eriksson <oeriksson@mandriva.com> 0:1.7-0.0.6mdv2011.0 + Revision: 607365 - rebuild * Wed Mar 17 2010 Oden Eriksson <oeriksson@mandriva.com> 0:1.7-0.0.5mdv2010.1 + Revision: 523921 - rebuilt for 2010.1 * Thu Sep 03 2009 Christophe Fergeau <cfergeau@mandriva.com> 0:1.7-0.0.4mdv2010.0 + Revision: 426914 - rebuild * Sat Mar 07 2009 Antoine Ginies <aginies@mandriva.com> 0:1.7-0.0.3mdv2009.1 + Revision: 351560 - rebuild * Wed Jun 18 2008 Alexander Kurtakov <akurtakov@mandriva.org> 0:1.7-0.0.2mdv2009.0 + Revision: 225399 - switch to the 1.7 release, disable gcj_compile * Sat Jan 12 2008 David Walluck <walluck@mandriva.org> 0:1.7-0.0.1mdv2008.1 + Revision: 149258 - 1_7R1-RC1 + Olivier Blin <oblin@mandriva.com> - restore BuildRoot + Thierry Vignaud <tv@mandriva.org> - kill re-definition of %%buildroot on Pixel's request * Sun Dec 16 2007 Anssi Hannula <anssi@mandriva.org> 0:1.6-0.r5.5mdv2008.1 + Revision: 120815 - buildrequires java-rpmbuild * Sat Sep 15 2007 Anssi Hannula <anssi@mandriva.org> 0:1.6-0.r5.4mdv2008.0 + Revision: 87352 - rebuild to filter out autorequires of GCJ AOT objects - remove unnecessary Requires(post) on java-gcj-compat * Sat Sep 08 2007 Pascal Terjan <pterjan@mandriva.org> 0:1.6-0.r5.3mdv2008.0 + Revision: 82690 - update to new version * Mon Mar 12 2007 David Walluck <walluck@mandriva.org> 0:1.6-0.r5.2mdv2007.1 + Revision: 141810 - fix gcj_support - spec cleanup * Mon Dec 11 2006 David Walluck <walluck@mandriva.org> 0:1.6-0.r5.1mdv2007.1 + Revision: 95055 - 1.6.0R5 fix eol for javadoc - Import rhino * Thu Jun 15 2006 David Walluck <walluck@mandriva.org> 0:1.6-0.r2.2.1mdv2007.0 - bunmp release - still no E4X implementation (xmlbeans) or bea-stax-api * Fri Jun 02 2006 David Walluck <walluck@mandriva.org> 0:1.6-0.r2.1.1mdv2007.0 - release * Thu Jun 01 2006 Fernando Nasser <fnasser@redhat.com> 0:1.6-0.r2.1jpp - Upgrade to RC2 * Tue Apr 25 2006 Fernando Nasser <fnasser@redhat.com> 0:1.6-0.r1.2jpp - First JPP 1.7 build * Thu Dec 02 2004 David Walluck <david@jpackage.org> 0:1.6-0.r1.1jpp - 1_6R1 - add demo subpackage containing example code - add jpp release info to implementation version - add script to launch js shell - build E4X implementation (Requires: xmlbeans) - remove `Class-Path' from manifest * Wed Aug 25 2004 Fernando Nasser <fnasser@redhat.com> - 0:1.5-1.R5.1jpp - Update to 1.5R5. - Rebuild with Ant 1.6.2