Blame SPECS/rhino.spec

92c34b
%{?scl:%scl_package rhino}
92c34b
%{!?scl:%global pkg_name %{name}}
92c34b
92c34b
# Copyright (c) 2000-2005, JPackage Project
92c34b
# All rights reserved.
92c34b
#
92c34b
# Redistribution and use in source and binary forms, with or without
92c34b
# modification, are permitted provided that the following conditions
92c34b
# are met:
92c34b
#
92c34b
# 1. Redistributions of source code must retain the above copyright
92c34b
#    notice, this list of conditions and the following disclaimer.
92c34b
# 2. Redistributions in binary form must reproduce the above copyright
92c34b
#    notice, this list of conditions and the following disclaimer in the
92c34b
#    documentation and/or other materials provided with the
92c34b
#    distribution.
92c34b
# 3. Neither the name of the JPackage Project nor the names of its
92c34b
#    contributors may be used to endorse or promote products derived
92c34b
#    from this software without specific prior written permission.
92c34b
#
92c34b
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
92c34b
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
92c34b
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
92c34b
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
92c34b
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
92c34b
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
92c34b
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
92c34b
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
92c34b
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
92c34b
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
92c34b
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
92c34b
#
92c34b
92c34b
%define scm_version 1_7_7_1
92c34b
92c34b
Name:           %{?scl_prefix}rhino
92c34b
Version:        1.7.7.1
92c34b
Release:        2.2%{?dist}
92c34b
Summary:        JavaScript for Java
92c34b
License:        MPLv2.0
92c34b
92c34b
Source0:        https://github.com/mozilla/rhino/archive/Rhino%{scm_version}_RELEASE.tar.gz
92c34b
Source1:        http://repo1.maven.org/maven2/org/mozilla/rhino/%{version}/rhino-%{version}.pom
92c34b
Source2:        %{pkg_name}.script
92c34b
92c34b
Patch0:         %{pkg_name}-build.patch
92c34b
# Add OSGi metadata from Eclipse Orbit project
92c34b
Patch1:         %{pkg_name}-addOrbitManifest.patch
92c34b
92c34b
URL:            http://www.mozilla.org/rhino/
92c34b
92c34b
BuildRequires:  %{?scl_prefix}ant
92c34b
BuildRequires:  java-devel >= 1:1.6.0.0
92c34b
BuildRequires:  %{?scl_prefix}sonatype-oss-parent
92c34b
BuildRequires:  %{?scl_prefix}javapackages-local
92c34b
Requires:       %{?scl_prefix}jline
92c34b
92c34b
# Disable xmlbeans until we can get it into Fedora
92c34b
#Requires:       xmlbeans
92c34b
#BuildRequires:  xmlbeans
92c34b
BuildArch:      noarch
92c34b
92c34b
%description
92c34b
Rhino is an open-source implementation of JavaScript written entirely
92c34b
in Java. It is typically embedded into Java applications to provide
92c34b
scripting to end users.
92c34b
92c34b
%package        demo
92c34b
Summary:        Examples for %{pkg_name}
92c34b
92c34b
%description    demo
92c34b
Examples for %{pkg_name}.
92c34b
92c34b
%prep
92c34b
%setup -q -n %{pkg_name}-Rhino%{scm_version}_RELEASE
92c34b
%patch0 -p1 -b .build
92c34b
%patch1 -b .fixManifest
92c34b
92c34b
# Fix manifest
92c34b
sed -i -e '/^Class-Path:.*$/d' src/manifest
92c34b
92c34b
# Add jpp release info to version
92c34b
sed -i -e 's|^implementation.version: Rhino .* release .* \${implementation.date}|implementation.version: Rhino %{version} release %{release} \${implementation.date}|' build.properties
92c34b
92c34b
%mvn_alias : rhino:js
92c34b
%mvn_file : js %{pkg_name}
92c34b
92c34b
%build
92c34b
ant deepclean jar copy-all -Dno-xmlbeans=1
92c34b
%mvn_artifact %{SOURCE1} build/%{pkg_name}%{version}/js.jar
92c34b
92c34b
pushd examples
92c34b
92c34b
export CLASSPATH=../build/%{pkg_name}%{version}/js.jar:$(build-classpath xmlbeans/xbean 2>/dev/null)
92c34b
%{javac} *.java
92c34b
%{jar} cf ../build/%{pkg_name}%{version}/%{pkg_name}-examples.jar *.class
92c34b
popd
92c34b
92c34b
%install
92c34b
%mvn_install
92c34b
92c34b
# man page
92c34b
mkdir -p %{buildroot}%{_mandir}/man1/
92c34b
install -m 644 man/%{pkg_name}.1 %{buildroot}%{_mandir}/man1/%{pkg_name}.1
92c34b
92c34b
## script
92c34b
mkdir -p %{buildroot}%{_bindir}
92c34b
install -m 755 %{SOURCE2} %{buildroot}%{_bindir}/%{pkg_name}
92c34b
92c34b
# examples
92c34b
cp -a build/%{pkg_name}%{version}/%{pkg_name}-examples.jar %{buildroot}%{_javadir}/%{pkg_name}-examples.jar
92c34b
mkdir -p %{buildroot}%{_datadir}/%{pkg_name}
92c34b
cp -a examples/* %{buildroot}%{_datadir}/%{pkg_name}
92c34b
find %{buildroot}%{_datadir}/%{pkg_name} -name '*.build' -delete
92c34b
92c34b
%files -f .mfiles
92c34b
%defattr(0644,root,root,0755)
92c34b
%attr(0755,root,root) %{_bindir}/*
92c34b
%{_javadir}/*
92c34b
%{_mandir}/man1/%{pkg_name}.1*
92c34b
92c34b
%files demo
92c34b
%{_datadir}/%{pkg_name}
92c34b
92c34b
%changelog
92c34b
* Thu Jun 22 2017 Michael Simacek <msimacek@redhat.com> - 1.7.7.1-2.2
92c34b
- Mass rebuild 2017-06-22
92c34b
92c34b
* Wed Jun 21 2017 Java Maintainers <java-maint@redhat.com> - 1.7.7.1-2.1
92c34b
- Automated package import and SCL-ization
92c34b
92c34b
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.7.1-2
92c34b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
92c34b
92c34b
* Thu Jun 16 2016 Alexander Kurtakov <akurtako@redhat.com> 1.7.7.1-1
92c34b
- Update to version 1.7.7.1.
92c34b
92c34b
* Thu Jun 16 2016 Alexander Kurtakov <akurtako@redhat.com> 1.7.7-5
92c34b
- Add BR javapackages-local to unbreak build.
92c34b
92c34b
* Wed Jun 15 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.7.7-4
92c34b
- Install JAR and POM with %%mvn_install
92c34b
92c34b
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.7-3
92c34b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
92c34b
92c34b
* Tue Jul 28 2015 Alexander Kurtakov <akurtako@redhat.com> 1.7.7-2
92c34b
- Fix launch script.
92c34b
92c34b
* Fri Jun 26 2015 Alexander Kurtakov <akurtako@redhat.com> 1.7.7-1
92c34b
- Update to upstream 1.7.7 release.
92c34b
92c34b
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7R4-11
92c34b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
92c34b
92c34b
* Tue Jun 10 2014 Alexander Kurtakov <akurtako@redhat.com> 1.7R4-10
92c34b
- No longer ship javadoc subpackage and obsolete it.
92c34b
92c34b
* Tue Jun 10 2014 Alexander Kurtakov <akurtako@redhat.com> 1.7R4-9
92c34b
- Use mfiles.
92c34b
92c34b
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7R4-8
92c34b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
92c34b
92c34b
* Tue Jan 14 2014 Matěj Cepl <mcepl@redhat.com> - 1.7R4-7
92c34b
- Add overlow detection patch from the upstream (RHBZ# 1011947)
92c34b
- Update all patches.
92c34b
92c34b
* Mon Sep 09 2013 Elliott Baron <ebaron@redhat.com> 1.7R4-6
92c34b
- Update and add missing options for Rhino shell man page.
92c34b
92c34b
* Thu Aug 29 2013 Alexander Kurtakov <akurtako@redhat.com> 1.7R4-5
92c34b
- Drop R on java-devel  - rhbz #991706.
92c34b
92c34b
* Thu Aug 1 2013 akurtakov <akurtakov@localhost.localdomain> 1.7R4-4
92c34b
- Add R on java-devel as rhino requires tools.jar at runtime.
92c34b
92c34b
* Mon Jun 24 2013 Elliott Baron <ebaron@redhat.com> 1.7R4-3
92c34b
- Add man page for Rhino shell.
92c34b
92c34b
* Thu Feb 28 2013 Krzysztof Daniel <kdaniel@redhat.com> 1.7R4-2
92c34b
- Add a depmap to keep compatibility with previous versions.
92c34b
92c34b
* Tue Feb 26 2013 Alexander Kurtakov <akurtako@redhat.com> 1.7R4-1
92c34b
- Update to 1.7R4.
92c34b
92c34b
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7R3-8
92c34b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
92c34b
92c34b
* Fri Nov  2 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.7R3-7
92c34b
- Add maven POM
92c34b
92c34b
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7R3-6
92c34b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
92c34b
92c34b
* Tue Jun 12 2012 Bill Nottingham - 1.7R3-5
92c34b
- build against OpenJDK 1.7
92c34b
92c34b
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7R3-4
92c34b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
92c34b
92c34b
* Sun Oct 16 2011 Ville Skyttä <ville.skytta@iki.fi> - 1.7R3-3
92c34b
- Crosslink javadocs with Java's.
92c34b
- Drop versioned jars and javadoc dir.
92c34b
- Exclude patch backup files from -examples.
92c34b
92c34b
* Wed Sep 21 2011 Matěj Cepl <mcepl@redhat.com> - 1.7R3-2
92c34b
- Remove bea-stax-api dependency (and perl as well)
92c34b
92c34b
* Fri Sep 16 2011 Matěj Cepl <mcepl@redhat.com> - 1.7R3-1
92c34b
- Fix numbering of the package (this is not a prerelease)
92c34b
- Remove unnecessary macros
92c34b
- Increase happines of rpmlint (better Group tags)
92c34b
92c34b
* Wed Sep 14 2011 Matěj Cepl <mcepl@redhat.com> - 1.7-0.10.r3
92c34b
- New upstream pre-release.
92c34b
92c34b
* Wed Jul 6 2011 Andrew Overholt <overholt@redhat.com> 0:1.7-0.9.r2
92c34b
- Inject OSGi metadata from Eclipse Orbit project.
92c34b
92c34b
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.7-0.8.r2
92c34b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
92c34b
92c34b
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.7-0.7.r2
92c34b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
92c34b
92c34b
* Sun May 31 2009 Toshio Kuratomi <toshio@fedoraproject.org> - 0:1.7-0.6.r2
92c34b
- Update to rhino1_7R2
92c34b
- Add patch from Steven Elliott to fix exception in the interpreter shell.
92c34b
92c34b
* Mon Apr 20 2009 Lillian Angel <langel@redhat.com> - 0:1.7-0.4.r2pre.1.1
92c34b
- Added jpackage-utils requirement.
92c34b
- Resolves: rhbz#496435
92c34b
92c34b
* Thu Mar 26 2009 Lillian Angel <langel@redhat.com> - 0:1.7-0.3.r2pre.1.1
92c34b
- Updated rhino-build.patch
92c34b
- License for treetable has been fixed. Re-included this code, and removed patch.
92c34b
- Resolves: rhbz#457336
92c34b
92c34b
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.7-0.2.r2pre.1.1
92c34b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
92c34b
92c34b
* Fri Feb 13 2009 Lillian Angel <langel@redhat.com> - 0:1.7-0.1.r2pre.1.1
92c34b
- Upgraded to 1.7r2pre.
92c34b
- Resolves: rhbz#485135
92c34b
92c34b
* Thu Jul 10 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0:1.6-0.1.r5.1.3
92c34b
- drop repotag
92c34b
- fix license tag
92c34b
92c34b
* Thu Mar 15 2007 Matt Wringe <mwringe@redhat.com> 0:1.6-0.1.r5.1jpp.2
92c34b
- Remove script from build as the debugging tool is disabled due to it
92c34b
  containing proprietary code from Sun.
92c34b
92c34b
* Wed Mar 07 2007 Deepak Bhole <dbhole@redhat.com> 0:1.6-0.1.r5.1jpp.1
92c34b
- Upgrade to 1.6r5
92c34b
- Change release per Fedora guidelines
92c34b
- Disable dependency on xmlbeans (optional component, not in Fedora yet)
92c34b
- Disable building of debugger tool, as it needs confidential code from Sun
92c34b
- Remove post/postuns for javadoc and add the two dirs as %%doc
92c34b
92c34b
* Wed Jun 14 2006 Ralph Apel <r.apel@r-apel.de> 0:1.6-0.r2.2jpp
92c34b
- Add bea-stax-api in order to build xmlimpl classes
92c34b
92c34b
* Wed May 31 2006 Fernando Nasser <fnasser@redhat.com> 0:1.6-0.r2.1jpp
92c34b
- Upgrade to RC2
92c34b
92c34b
* Mon Apr 24 2006 Fernando Nasser <fnasser@redhat.com> 0:1.6-0.r1.2jpp
92c34b
- First JPP 1.7 build
92c34b
92c34b
* Thu Dec 02 2004 David Walluck <david@jpackage.org> 0:1.6-0.r1.1jpp
92c34b
- 1_6R1
92c34b
- add demo subpackage containing example code
92c34b
- add jpp release info to implementation version
92c34b
- add script to launch js shell
92c34b
- build E4X implementation (Requires: xmlbeans)
92c34b
- remove `Class-Path' from manifest
92c34b
92c34b
* Tue Aug 24 2004 Fernando Nasser <fnasser@redhat.com> - 0:1.5-1.R5.1jpp
92c34b
- Update to 1.5R5.
92c34b
- Rebuild with Ant 1.6.2
92c34b
92c34b
* Sat Jul 19 2003 Ville Skyttä <ville.skytta@iki.fi> - 0:1.5-1.R4.1.1jpp
92c34b
- Update to 1.5R4.1.
92c34b
- Non-versioned javadoc dir symlink.
92c34b
92c34b
* Fri Apr 11 2003 David Walluck <davdi@anti-microsoft.org> 0:1.5-0.R4.2jpp
92c34b
- remove build patches in favor of perl
92c34b
- add epoch
92c34b
92c34b
* Sun Mar 30 2003 Ville Skyttä <ville.skytta@iki.fi> - 1.5-0.r4.1jpp
92c34b
- Update to 1.5R4.
92c34b
- Rebuild for JPackage 1.5.
92c34b
92c34b
* Wed May 08 2002 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.5-0.R3.1jpp
92c34b
- 1.5R3
92c34b
- versioned dir for javadoc
92c34b
92c34b
* Sun Mar 10 2002 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.5-0.R2.9jpp
92c34b
- versioned compatibility symlink
92c34b
92c34b
* Mon Jan 21 2002 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.5-0.R2.8jpp
92c34b
- section macro
92c34b
- new release scheme
92c34b
92c34b
* Thu Jan 17 2002 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.5R2-7jpp
92c34b
- spec cleanup
92c34b
- changelog corrections
92c34b
92c34b
* Fri Jan 11 2002 2002 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.5R2-6jpp
92c34b
- backward compatibility js.jar symlink
92c34b
- used original swing exemples archive
92c34b
- fixed javadoc empty package-list file
92c34b
- no dependencies for manual and javadoc packages
92c34b
92c34b
* Sat Dec 1 2001 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.5R2-5jpp
92c34b
- javadoc in javadoc package
92c34b
- fixed offline build
92c34b
92c34b
* Wed Nov 21 2001 Christian Zoffoli <czoffoli@littlepenguin.org> 1.5R2-4jpp
92c34b
- changed extension --> jpp
92c34b
92c34b
* Sat Oct 6 2001 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.5R2-3jpp
92c34b
- first unified release
92c34b
- s/jPackage/JPackage
92c34b
- corrected license to MPL
92c34b
92c34b
* Sat Sep 15 2001 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.5R2-2mdk
92c34b
- spec cleanup
92c34b
- standardized cvs references
92c34b
92c34b
* Fri Aug 31 2001 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.5R2-1mdk
92c34b
- first Mandrake release