8fb068
%global upstream_version %(echo %{version} | tr -d '~')
8fb068
8fb068
Name:           bsh
8fb068
Version:        2.0~b6
8fb068
Release:        3%{?dist}
8fb068
Summary:        Lightweight Scripting for Java
8fb068
URL:            http://www.beanshell.org/
8fb068
# bundled asm is BSD
8fb068
# bsf/src/bsh/util/BeanShellBSFEngine.java is public-domain
8fb068
License:        ASL 2.0 and BSD and Public Domain
8fb068
BuildArch:      noarch
8fb068
# ./generate-tarball.sh
8fb068
# TODO Use proper %%{version} when a newer version is available
8fb068
# TODO Also see TODO in ./generate-tarball.sh
8fb068
Source0:        %{name}-2.0-b6.tar.gz
8fb068
# Remove bundled jars which cannot be easily verified for licensing
8fb068
# Remove code marked as SUN PROPRIETARY/CONFIDENTAIL
8fb068
Source2:        generate-tarball.sh
8fb068
8fb068
Patch0:         %{name}-source-1.6.patch
8fb068
Patch1:         %{name}-java-9.patch
8fb068
8fb068
BuildRequires:  javapackages-local
8fb068
BuildRequires:  ant
8fb068
BuildRequires:  bsf
8fb068
BuildRequires:  junit
8fb068
BuildRequires:  javacc
8fb068
BuildRequires:  glassfish-servlet-api
8fb068
8fb068
Provides:       %{name}-utils = %{version}-%{release}
8fb068
8fb068
# bsh uses small subset of modified (shaded) classes from ancient version of
8fb068
# objecweb-asm under asm directory
8fb068
Provides:       bundled(objectweb-asm) = 1.3.6
8fb068
8fb068
%description
8fb068
BeanShell is a small, free, embeddable, Java source interpreter with
8fb068
object scripting language features, written in Java. BeanShell
8fb068
executes standard Java statements and expressions, in addition to
8fb068
obvious scripting commands and syntax. BeanShell supports scripted
8fb068
objects as simple method closures like those in Perl and
8fb068
JavaScript(tm). You can use BeanShell interactively for Java
8fb068
experimentation and debugging or as a simple scripting engine for your
8fb068
applications. In short: BeanShell is a dynamically interpreted Java,
8fb068
plus some useful stuff. Another way to describe it is to say that in
8fb068
many ways BeanShell is to Java as Tcl/Tk is to C: BeanShell is
8fb068
embeddable - You can call BeanShell from your Java applications to
8fb068
execute Java code dynamically at run-time or to provide scripting
8fb068
extensibility for your applications. Alternatively, you can call your
8fb068
Java applications and objects from BeanShell; working with Java
8fb068
objects and APIs dynamically. Since BeanShell is written in Java and
8fb068
runs in the same space as your application, you can freely pass
8fb068
references to "real live" objects into scripts and return them as
8fb068
results.
8fb068
8fb068
%package manual
8fb068
Summary:        Manual for %{name}
8fb068
8fb068
%description manual
8fb068
Documentation for %{name}.
8fb068
8fb068
%package javadoc
8fb068
Summary:        API documentation for %{name}
8fb068
8fb068
%description javadoc
8fb068
This package provides %{summary}.
8fb068
8fb068
%prep
8fb068
%setup -q -n beanshell-%{upstream_version}
8fb068
%patch0 -p1
8fb068
%patch1 -p1
8fb068
8fb068
sed -i 's,org.apache.xalan.xslt.extensions.Redirect,http://xml.apache.org/xalan/redirect,' docs/manual/xsl/*.xsl
8fb068
8fb068
%mvn_alias :bsh bsh:bsh bsh:bsh-bsf org.beanshell:bsh
8fb068
8fb068
%mvn_file : %{name}
8fb068
8fb068
%build
8fb068
mkdir lib
8fb068
build-jar-repository lib bsf javacc junit glassfish-servlet-api
8fb068
8fb068
ant test dist
8fb068
8fb068
%install
8fb068
%mvn_artifact pom.xml dist/%{name}-%{upstream_version}.jar
8fb068
8fb068
%mvn_install -J javadoc
8fb068
8fb068
%files -f .mfiles
8fb068
%license LICENSE NOTICE
8fb068
%doc README.md src/Changes.html src/CodeMap.html docs/faq/faq.html
8fb068
8fb068
%files manual
8fb068
%doc docs/manual/html
8fb068
%doc docs/manual/images/*.jpg
8fb068
%doc docs/manual/images/*.gif
8fb068
%license LICENSE NOTICE
8fb068
8fb068
%files javadoc -f .mfiles-javadoc
8fb068
%license LICENSE NOTICE
8fb068
8fb068
%changelog
8fb068
* Tue Nov 05 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.0~b6-3
8fb068
- Mass rebuild for javapackages-tools 201902
8fb068
8fb068
* Tue Nov 05 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.0~b6-2
8fb068
- Drop launcher scripts and servlet
8fb068
8fb068
* Mon Sep 16 2019 Marian Koncek <mkoncek@redhat.com> - 2.0~b6-1
8fb068
- Use tilde versioning
8fb068
8fb068
* Fri May 24 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.0-14.b6
8fb068
- Mass rebuild for javapackages-tools 201901
8fb068
8fb068
* Fri Aug 03 2018 Michael Simacek <msimacek@redhat.com> - 0:2.0-13.b6
8fb068
- Remove proprietary files from tarball
8fb068
8fb068
* Mon Jul 30 2018 Severin Gehwolf <sgehwolf@redhat.com> - 0:2.0-12.b6
8fb068
- Add requirement on javapackages-tools for script's usage of
8fb068
  java-functions.
8fb068
8fb068
* Mon Jul 30 2018 Michael Simacek <msimacek@redhat.com> - 0:2.0-11.b6
8fb068
- Repack the tarball without binaries
8fb068
8fb068
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0:2.0-10.b6
8fb068
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
8fb068
8fb068
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0:2.0-9.b6
8fb068
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
8fb068
8fb068
* Sat Sep 23 2017 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:2.0-8.b6
8fb068
- Properly conditionalize build-requires
8fb068
8fb068
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0:2.0-7.b6
8fb068
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
8fb068
8fb068
* Tue Jun 13 2017 Michael Simacek <msimacek@redhat.com> - 0:2.0-6.b6
8fb068
- Add conditional for desktop file
8fb068
8fb068
* Fri Mar  3 2017 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:2.0-5.b6
8fb068
- Install desktop icon to pixmaps instead of icons
8fb068
8fb068
* Fri Mar  3 2017 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:2.0-4.b6
8fb068
- Fix directory ownership
8fb068
8fb068
* Tue Feb 07 2017 Michael Simacek <msimacek@redhat.com> - 0:2.0-3.b6
8fb068
- Build against glassfish-servlet-api
8fb068
8fb068
* Thu Nov 24 2016 Michael Simacek <msimacek@redhat.com> - 0:2.0-2.b6
8fb068
- Install into expected location
8fb068
8fb068
* Thu Nov 24 2016 Michael Simacek <msimacek@redhat.com> - 0:2.0-1.b6
8fb068
- Update to upstream version 2.0.b6
8fb068
8fb068
* Wed Oct 12 2016 Ville Skyttä <ville.skytta@iki.fi> - 0:1.3.0-36
8fb068
- Switch to jline 2.x in -utils
8fb068
- Mark License.txt as %%license
8fb068
8fb068
* Thu Jul 21 2016 Michael Simacek <msimacek@redhat.com> - 0:1.3.0-35
8fb068
- Replace perl usage with sed
8fb068
8fb068
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0:1.3.0-34
8fb068
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
8fb068
8fb068
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.3.0-33
8fb068
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
8fb068
8fb068
* Wed Nov  5 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.3.0-32
8fb068
- Remove workaround for RPM bug #646523
8fb068
8fb068
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.3.0-31
8fb068
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
8fb068
8fb068
* Wed May 21 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.3.0-30
8fb068
- Use .mfiles generated during build
8fb068
8fb068
* Tue Mar 04 2014 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0:1.3.0-29
8fb068
- Use Requires: java-headless rebuild (#1067528)
8fb068
8fb068
* Wed Oct 30 2013 Michal Srb <msrb@redhat.com> - 0:1.3.0-28
8fb068
- Switch to jline1 (Resolves rhbz#1023018)
8fb068
8fb068
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.3.0-27
8fb068
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
8fb068
8fb068
* Fri Jul 12 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.3.0-26
8fb068
- Use %%add_maven_depmap instead of legacy macros
8fb068
- Install versionless javadocs
8fb068
- Remove old Obsoletes
8fb068
- Update and format descriptions
8fb068
- Install license file with manual and javadoc packages
8fb068
- Fix Requires and BuildRequires on java
8fb068
- Fix calls to %%jpackage_script
8fb068
8fb068
* Wed Jul 10 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.3.0-26
8fb068
- Remove arch-specific conditionals
8fb068
- Remove group tags
8fb068
- Remove Requires on jpackage-utils
8fb068
- Remove Requires on coreutils
8fb068
- Generate custom scripts with %%jpackage_script
8fb068
- Install versionless JARs only
8fb068
- Install POM files to %%{_mavenpomdir}
8fb068
8fb068
* Thu Jun 06 2013 Michal Srb <msrb@redhat.com> - 0:1.3.0-25
8fb068
- Enable tests
8fb068
- Fix BR
8fb068
8fb068
* Thu Feb 14 2013 Rahul Sundaram <sundaram@fedoraproject.org> - 0:1.3.0-24
8fb068
- remove vendor tag from desktop file. https://fedorahosted.org/fpc/ticket/247
8fb068
- clean up spec to follow current guidelines
8fb068
8fb068
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.3.0-23
8fb068
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
8fb068
8fb068
* Tue Nov 20 2012 David Tardon <dtardon@redhat.com> - 0:1.3.0-22
8fb068
- Resolves: rhbz#850008 bsh - Should not own /usr/share/maven-fragments
8fb068
  directory
8fb068
- Resolves: rhbz#878163 bsh - javadoc subpackage doesn't require
8fb068
  jpackage-utils
8fb068
- Resolves: rhbz#878166 bsh: Public Domain not listed in license tag
8fb068
8fb068
* Thu Nov  1 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.3.0-21
8fb068
- Add additional maven depmap
8fb068
8fb068
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.3.0-20
8fb068
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
8fb068
8fb068
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.3.0-19
8fb068
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
8fb068
8fb068
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.3.0-18
8fb068
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
8fb068
8fb068
* Thu Nov 25 2010 Ville Skyttä <ville.skytta@iki.fi> - 0:1.3.0-17
8fb068
- Rename -desktop to -utils, move shell scripts and menu entry to it (#417491).
8fb068
- Bring icon cache scriptlets up to date with current guidelines.
8fb068
- Use jline in bsh script for command history support.
8fb068
- Prefer JRE over SDK when finding JVM to invoke in scripts.
8fb068
- Build with -source 1.5.
8fb068
8fb068
* Thu Nov 25 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0:1.3.0-16
8fb068
- Fix pom filenames (Resolves rhbz#655791)
8fb068
- Fix xsl errors when building docs
8fb068
8fb068
* Sat Jan 9 2010 Alexander Kurtakov <akurtako@redhat.com> 0:1.3.0-15.2
8fb068
- Drop gcj_support.
8fb068
- Fix rpmlint warnings.
8fb068
8fb068
* Mon Sep 21 2009 Permaine Cheung <pcheung@redhat.com> 0:1.3.0-15.1
8fb068
- Do not build manual and faq for ppc64 or s390x as the style task is disabled
8fb068
8fb068
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.3.0-15
8fb068
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
8fb068
8fb068
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.3.0-14
8fb068
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
8fb068
8fb068
* Wed Jul  9 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0:1.3.0-13
8fb068
- drop repotag
8fb068
- fix license tag
8fb068
8fb068
* Mon Mar 10 2008 Permaine Cheung <pcheung@redhat.com> 0:1.3.0-12jpp.3
8fb068
- Fix bugzilla 436675. Separate menu entry into desktop subpackage.
8fb068
8fb068
* Thu Mar 06 2008 Permaine Cheung <pcheung@redhat.com> 0:1.3.0-12jpp.2
8fb068
- Fix bugzilla 417491. Thanks Ville Skytta for the patch.
8fb068
- Add menu entry and startup script for bsh desktop.
8fb068
- Ensure scriptlets exit with zero exit status.
8fb068
8fb068
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0:1.3.0-12jpp.1
8fb068
- Autorebuild for GCC 4.3
8fb068
8fb068
* Mon Jan 21 2008 Permaine Cheung <pcheung@redhat.com> 0:1.3.0-11jpp.1
8fb068
- Merge with upstream
8fb068
8fb068
* Thu Jul 12 2007 Ralph Apel <r.apel at r-apel.de> 0:1.3.0-11jpp
8fb068
- Fix aot build
8fb068
- Add pom and depmap frags
8fb068
- Restore all jars
8fb068
- Add webapps
8fb068
8fb068
* Fri Mar 16 2007 Permaine Cheung <pcheung@redhat.com> 0:1.3.0-10jpp.1
8fb068
- Merge with upstream
8fb068
- Removed unapplied patch and moved buildroot removal from prep to install,
8fb068
  and other rpmlint cleanup
8fb068
8fb068
* Mon Mar 12 2007 Karsten Hopp <karsten@redhat.com> 1.3.0-9jpp.2
8fb068
- add buildrequirement ant-trax for documentation
8fb068
8fb068
* Fri Aug 04 2006 Deepak Bhole <dbhole@redhat.com> 0:1.3.0-9jpp.1
8fb068
- Added missing requirements
8fb068
8fb068
* Sat Jul 22 2006 Jakub Jelinek <jakub@redhat.com> 0:1.3.0-8jpp_3fc
8fb068
- Rebuilt
8fb068
8fb068
* Fri Jul 21 2006 Deepak Bhole <dbhole@redhat.com> 0:1.3.0-8jpp_2fc
8fb068
- Removing vendor and distribution tags.
8fb068
8fb068
* Thu Jul 20 2006 Deepak Bhole <dbhole@redhat.com> 0:1.3.0-8jpp_1fc
8fb068
- Add conditional native compilation.
8fb068
8fb068
* Thu May 04 2006 Ralph Apel <r.apel at r-apel.de> 0:1.3.0-7jpp
8fb068
- First JPP-1.7 release
8fb068
8fb068
* Fri Aug 20 2004 Ralph Apel <r.apel at r-apel.de> 0:1.3.0-6jpp
8fb068
- Build with ant-1.6.2
8fb068
8fb068
* Mon Jan 26 2004 David Walluck <david@anti-microsoft.org> 0:1.3.0-5jpp
8fb068
- really drop readline patch
8fb068
8fb068
* Sun Jan 25 2004 David Walluck <david@anti-microsoft.org> 0:1.3.0-4jpp
8fb068
- drop readline patch
8fb068
8fb068
* Wed Jan 21 2004 David Walluck <david@anti-microsoft.org> 0:1.3.0-3jpp
8fb068
- port libreadline-java patch to new bsh
8fb068
8fb068
* Tue Jan 20 2004 David Walluck <david@anti-microsoft.org> 0:1.3.0-2jpp
8fb068
- add Distribution tag
8fb068
8fb068
* Tue Jan 20 2004 David Walluck <david@anti-microsoft.org> 0:1.3.0-1jpp
8fb068
- 1.3.0
8fb068
- remove bsf patch (fixed upstream)
8fb068
- add epoch to demo package Requires
8fb068
8fb068
* Sat Apr 12 2003 David Walluck <david@anti-microsoft.org> 0:1.2-0.b8.4jpp
8fb068
- fix strange permissions
8fb068
8fb068
* Fri Apr 11 2003 David Walluck <david@anti-microsoft.org> 0:1.2-0.b8.3jpp
8fb068
- rebuild for JPackage 1.5
8fb068
- add bsf patch
8fb068
8fb068
* Sat Feb 01 2003 David Walluck <david@anti-microsoft.org> 1.2-0.b8.2jpp
8fb068
- remove servlet dependency (if anyone wants to add this as a separate
8fb068
  package and do the tomcat integration, be my guest)
8fb068
8fb068
* Thu Jan 23 2003 David Walluck <david@anti-microsoft.org> 1.2-0.b8.1jpp
8fb068
- rename to bsh
8fb068
- add manual
8fb068
- add Changes.html to %%doc
8fb068
- add bsh and bshdoc scripts
8fb068
- add %%dir %%{_datadir}/%%{name} to main package
8fb068
- correct test interpreter and make bsh files executable
8fb068
8fb068
* Mon Jan 21 2002 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.01-3jpp
8fb068
- really section macro
8fb068
8fb068
* Sun Jan 20 2002 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.01-2jpp
8fb068
- additional sources in individual archives
8fb068
- versioned dir for javadoc
8fb068
- no dependencies for javadoc package
8fb068
- stricter dependency for demo package
8fb068
- section macro
8fb068
8fb068
* Tue Dec 18 2001 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.01-1jpp
8fb068
- first JPackage release