update to 2.1.0 [release 2.1.0-1mamba;Wed Jun 30 2021]

This commit is contained in:
Silvan Calarco 2024-01-06 00:02:59 +01:00
parent 90d356005b
commit 6ecb5d3a46
11 changed files with 72 additions and 456 deletions

View File

@ -2,5 +2,5 @@
BeanShell is a small, free, embeddable, Java source interpreter with object scripting language features, written in Java. BeanShell executes standard Java statements and expressions, in addition to obvious scripting commands and syntax. BeanShell supports scripted objects as simple method closures like those in Perl and JavaScript(tm).
You can use BeanShell interactively for Java experimentation and debugging or as a simple scripting engine for your applications. In short: BeanShell is a dynamically interpreted Java, plus some useful stuff. Another way to describe it is to say that in many ways BeanShell is to Java as Tcl/Tk is to C: BeanShell is embeddable - You can call BeanShell from your Java applications to execute Java code dynamically at run-time or to provide scripting extensibility for your applications.
Alternatively, you can call your Java applications and objects from BeanShell; working with Java objects and APIs dynamically. Since BeanShell is written in Java and runs in the same space as your application, you can freely pass references to "real live" objects into scripts and return them as results.
Alternatively, you can call your Java applications and objects from BeanShell; working with Java objects and APIs dynamically. Since BeanShell is written in Java and runs in the same space as your application, you can freely pass references to "real live" objects into scripts and return them as results.bsh.org.objectweb.asm.ClassWriter cannot be applied to

View File

@ -1,54 +0,0 @@
--- BeanShell/build.xml.orig 2004-01-20 19:12:20.888557245 -0500
+++ BeanShell/build.xml 2004-01-20 19:13:36.150184282 -0500
@@ -103,50 +103,7 @@
value="docs/manual/bshcommands-bshdoc.xml"/>
<!-- Begin Targets -->
-
- <!-- The javacc targets could be smarter... -->
- <target name="checkjjt">
- <uptodate property="jjtree.notRequired"
- targetfile="${src-dir}/bsh/bsh.jj"
- >
- <srcfiles dir="${src-dir}/bsh" includes="bsh.jjt"/>
- </uptodate>
- </target>
- <target name="checkjj">
- <uptodate property="javacc.notRequired"
- targetfile="${src-dir}/bsh/Parser.java"
- >
- <srcfiles dir="${src-dir}/bsh" includes="bsh.jj"/>
- </uptodate>
- </target>
-
- <!-- Create bsh.jj when bsh.jjt changes. -->
- <target name="jjtree" unless="jjtree.notRequired" depends="checkjjt">
- <java classname="jjtree"
- fork="yes"
- failonerror="yes" >
- <arg
- line="-OUTPUT_DIRECTORY=${src-dir}/bsh ${src-dir}/bsh/bsh.jjt"/>
- <classpath>
- <fileset refid="lib-fileset"/>
- </classpath>
- </java>
- </target>
-
- <!-- Create Parser.java when bsh.jj changes. -->
- <target name="javacc" unless="javacc.notRequired" depends="checkjj">
- <java classname="javacc"
- fork="yes"
- failonerror="yes" >
- <!-- classpath="${javacc-lib}" -->
- <arg line="-OUTPUT_DIRECTORY=${src-dir}/bsh ${src-dir}/bsh/bsh.jj"/>
- <classpath>
- <fileset refid="lib-fileset"/>
- </classpath>
- </java>
- </target>
-
- <target name="compile" depends="jjtree,javacc,builddir">
+ <target name="compile" depends="builddir">
<!-- exclude the ${excludes} as well as anything under a "bak" dir -->
<!--compiler="${build-compiler}"-->
<javac srcdir="${src-dir}:${test-src-dir}:${bsf-src-dir}"

View File

@ -1,40 +0,0 @@
#!/bin/sh
#
# bsh-desktop script
# JPackage Project (http://jpackage.sourceforge.net)
# Source functions library
. /usr/share/java-utils/java-functions
# Source system prefs
if [ -f /etc/bsh.conf ] ; then
. /etc/bsh.conf
fi
# Source user prefs
if [ -f $HOME/.bshrc ] ; then
. $HOME/.bshrc
fi
# Configuration
MAIN_CLASS=bsh.Console
if [ -n "$BSH_DEBUG" ]; then
BASE_FLAGS=-Ddebug=true
fi
BASE_JARS="bsh.jar"
#if [ -f /usr/lib/libJavaReadline.so ]; then
# BASE_FLAGS=" -Djava.library.path=/usr/lib"
# BASE_FLAGS="$BASE_FLAGS -Dbsh.console.readlinelib=GnuReadline"
# BASE_JARS="$BASE_JARS libreadline-java.jar"
#fi
# Set parameters
set_jvm
set_classpath $BASE_JARS
set_flags $BASE_FLAGS
set_options $BASE_OPTIONS
# Let's start
run "$@"

View File

@ -1,40 +0,0 @@
#!/bin/sh
#
# bsh script
# JPackage Project (http://jpackage.sourceforge.net)
# Source functions library
. /usr/share/java-utils/java-functions
# Source system prefs
if [ -f /etc/bsh.conf ] ; then
. /etc/bsh.conf
fi
# Source user prefs
if [ -f $HOME/.bshrc ] ; then
. $HOME/.bshrc
fi
# Configuration
MAIN_CLASS=bsh.Interpreter
if [ -n "$BSH_DEBUG" ]; then
BASE_FLAGS=-Ddebug=true
fi
BASE_JARS="bsh.jar"
#if [ -f /usr/lib/libJavaReadline.so ]; then
# BASE_FLAGS=" -Djava.library.path=/usr/lib"
# BASE_FLAGS="$BASE_FLAGS -Dbsh.console.readlinelib=GnuReadline"
# BASE_JARS="$BASE_JARS libreadline-java.jar"
#fi
# Set parameters
set_jvm
set_classpath $BASE_JARS
set_flags $BASE_FLAGS
set_options $BASE_OPTIONS
# Let's start
run "$@"

View File

@ -1,11 +0,0 @@
--- docs/faq/faq.xsl 2002-05-28 06:03:18.000000000 +0200
+++ docs/faq/faq.xsl-gil 2010-11-25 03:00:25.000000000 +0100
@@ -18,7 +18,7 @@
<!--xsl:param name="imagedir"/-->
<!-- Output directives -->
-<xsl:output method="xhtml" indent="yes"/>
+<xsl:output method="html" indent="yes"/>
<!--
Root

View File

@ -1,19 +0,0 @@
--- docs/manual/xsl/manual.xsl 2002-05-28 00:58:14.000000000 +0200
+++ docs/manual/xsl/manual.xsl-gil 2010-11-25 03:09:44.000000000 +0100
@@ -1,6 +1,6 @@
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
- xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"
+ xmlns:redirect="http://xml.apache.org/xalan/redirect"
extension-element-prefixes="redirect"
>
@@ -29,7 +29,7 @@
<xsl:param name="pagesdir"/>
<!-- Output directives -->
-<xsl:output method="xhtml" indent="no"/>
+<xsl:output method="html" indent="no"/>
<!--
Root

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>bsh</groupId>
<artifactId>bsh</artifactId>
<name>Beanshell</name>
<version>1.3.0</version>
</project>

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>bsh</groupId>
<artifactId>bsh-bsf</artifactId>
<name>Beanshell BSFEngine</name>
<version>1.3.0</version>
</project>

View File

@ -1,9 +0,0 @@
[Desktop Entry]
Name=BeanShell Desktop
Exec=bsh-desktop
Icon=bsh
Terminal=false
Type=Application
StartupWMClass=bsh-Console
Categories=Development;Java;
Version=1.0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

View File

@ -1,269 +1,93 @@
%define javahome %{_jvmdir}/jdk
Name: java-bsh
Version: 1.3.0
Release: 7mamba
Version: 2.1.0
Release: 1mamba
Summary: Lightweight Scripting for Java
Group: Development/Libraries/Java
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.beanshell.org/
# Source: http://www.beanshell.org/bsh-2.0b4-src.zip broken link
# svn co http://ikayzo.org/svn/beanshell
Source0: http://repository.jboss.com/beanshell/%{version}-brew/src/bsh-%{version}-src.tar.bz2
Source1: java-bsh.png
Source2: java-bsh-desktop.desktop
Source3: java-bsh-1.3.0.pom
Source4: java-bsh-bsf-1.3.0.pom
Source5: java-bsh-1.3.0-bsh-desktop-script
Source6: java-bsh-1.3.0-bsh-script
Patch0: http://repository.jboss.com/beanshell/%{version}-brew/src/bsh-build.patch
Patch1: java-bsh-1.3.0-faq.patch
Patch2: java-bsh-1.3.0-manual.patch
Source0: https://github.com/beanshell/beanshell/releases/download/%{version}/bsh-%{version}.jar
Source1: https://github.com/beanshell/beanshell/releases/download/%{version}/bsh-bsf-%{version}.jar
Source2: https://github.com/beanshell/beanshell/releases/download/%{version}/bsh-classgen-%{version}.jar
Source3: https://github.com/beanshell/beanshell/releases/download/%{version}/bsh-classpath-%{version}.jar
Source4: https://github.com/beanshell/beanshell/releases/download/%{version}/bsh-commands-%{version}.jar
Source5: https://github.com/beanshell/beanshell/releases/download/%{version}/bsh-core-%{version}.jar
Source6: https://github.com/beanshell/beanshell/releases/download/%{version}/bsh-reflect-%{version}.jar
Source7: https://github.com/beanshell/beanshell/releases/download/%{version}/bsh-util-%{version}.jar
License: LGPL, Sun Public License
BuildRequires: apache-ant
BuildRequires: apache-ant-trax
BuildRequires: desktop-file-utils
%if "%{stage1}" != "1"
BuildRequires: apache-tomcat5-servletapi5
%else
BuildRequires: java-servletapi4
%endif
BuildRequires: jakarta-bsf
BuildRequires: ImageMagick
BuildRequires: java-libreadline
BuildRequires: javacc
BuildRequires: xalan-j2
Requires: jakarta-bsf
Requires: jpackage-utils
BuildRoot: %{_tmppath}/%{name}-%{version}-root
## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END
BuildRequires: javapackages
Requires: javapackages
Provides: java-bsh2
Obsoletes: java-bsh2 <= 2.0b4
%description
BeanShell is a small, free, embeddable, Java source interpreter with object scripting language features, written in Java. BeanShell executes standard Java statements and expressions, in addition to obvious scripting commands and syntax. BeanShell supports scripted objects as simple method closures like those in Perl and JavaScript(tm).
You can use BeanShell interactively for Java experimentation and debugging or as a simple scripting engine for your applications. In short: BeanShell is a dynamically interpreted Java, plus some useful stuff. Another way to describe it is to say that in many ways BeanShell is to Java as Tcl/Tk is to C: BeanShell is embeddable - You can call BeanShell from your Java applications to execute Java code dynamically at run-time or to provide scripting extensibility for your applications.
Alternatively, you can call your Java applications and objects from BeanShell; working with Java objects and APIs dynamically. Since BeanShell is written in Java and runs in the same space as your application, you can freely pass references to "real live" objects into scripts and return them as results.
Alternatively, you can call your Java applications and objects from BeanShell; working with Java objects and APIs dynamically. Since BeanShell is written in Java and runs in the same space as your application, you can freely pass references to "real live" objects into scripts and return them as results.bsh.org.objectweb.asm.ClassWriter cannot be applied to
%package javadoc
Group: Documentation
Summary: Javadoc for %{name}
%package bsf
Group: Development/Libraries/Java
Summary: BSF support for %{name}
Provides: java-bsh2-bsf
Obsoletes: java-bsh2-bsf <= 2.0b4
%description javadoc
Lightweight Scripting for Java.
%description bsf
BeanShell - Lightweight Scripting for Java.
This package contains BSF support for %{name}.
This package contains Javadoc for %{name}.
%package classgen
Group: Development/Libraries/Java
Summary: ASM support for %{name}
Provides: java-classgen
Obsoletes: java-classgen <= 2.0b4
%package demo
Group: Documentation
Summary: Examples for %{name}
%description demo
Lightweight Scripting for Java.
This package contains demonstrations and samples for %{name}.
%package desktop
Summary: Desktop integraton for %{name}
Group: Development/Tools
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description desktop
Lightweight Scripting for Java.
This package contains a menu entry for %{name}.
%package manual
Group: Documentation
Summary: Manual for %{name}
%description manual
Lightweight Scripting for Java.
This package contains documentation for %{name}.
%description classgen
BeanShell - Lightweight Scripting for Java.
This package contains ASM support for %{name}.
%prep
%setup -q -n BeanShell
%patch0 -p1
%patch1 -p0
%patch2 -p0
for j in $(find . -name "*.jar"); do
mv $j $j.no
done
for dir in $(find . -type d -name CVS); do
rm -rf $dir
done
for file in $(find . -type d -name .cvsignore) ; do
rm -rf $file
done
for i in backbutton forwardbutton homebutton remoteconsole upbutton; do
chmod 644 docs/images/$i.gif
done
%setup -q -c -D -T
%build
mkdir -p lib
pushd lib
ln -sf $(build-classpath bsf) bsf.jar
%if "%{stage1}" != "1"
ln -sf $(build-classpath servletapi5) servlet.jar
%else
ln -sf $(build-classpath servletapi4) servlet.jar
%endif
ln -sf $(build-classpath javacc) javacc.jar
popd
export JAVA_HOME=%javahome
ant dist
(
cd docs/faq
ant -Dant.build.javac.source=1.4
)
(
cd docs/manual
export CLASSPATH=$(build-classpath xalan-j2 ant/ant-trax)
ant -Dant.build.javac.source=1.4
)
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
mkdir -p %{buildroot}%{_javadir}
install -m 644 dist/bsh-%{version}.jar \
%{buildroot}%{_javadir}/bsh-%{version}.jar
install -m 644 dist/bsh-bsf-%{version}.jar \
%{buildroot}%{_javadir}/bsh-bsf-%{version}.jar
install -m 644 dist/bsh-classpath-%{version}.jar \
%{buildroot}%{_javadir}/bsh-classpath-%{version}.jar
install -m 644 dist/bsh-commands-%{version}.jar \
%{buildroot}%{_javadir}/bsh-commands-%{version}.jar
install -m 644 dist/bsh-core-%{version}.jar \
%{buildroot}%{_javadir}/bsh-core-%{version}.jar
install -m 644 dist/bsh-reflect-%{version}.jar \
%{buildroot}%{_javadir}/bsh-reflect-%{version}.jar
install -m 644 dist/bsh-util-%{version}.jar \
%{buildroot}%{_javadir}/bsh-util-%{version}.jar
install -D -m 644 %{SOURCE0} \
%{buildroot}%{_javadir}/bsh-%{version}.jar
install -m 644 %{SOURCE1} \
%{buildroot}%{_javadir}/bsh-bsf-%{version}.jar
install -m 644 %{SOURCE2} \
%{buildroot}%{_javadir}/bsh-classgen-%{version}.jar
install -m 644 %{SOURCE3} \
%{buildroot}%{_javadir}/bsh-classpath-%{version}.jar
install -m 644 %{SOURCE4} \
%{buildroot}%{_javadir}/bsh-commands-%{version}.jar
install -m 644 %{SOURCE5} \
%{buildroot}%{_javadir}/bsh-core-%{version}.jar
install -m 644 %{SOURCE6} \
%{buildroot}%{_javadir}/bsh-reflect-%{version}.jar
install -m 644 %{SOURCE7} \
%{buildroot}%{_javadir}/bsh-util-%{version}.jar
(
cd %{buildroot}%{_javadir}
for jar in *-%{version}*; do
ln -sf ${jar} ${jar/-%{version}/}
done
cd %{buildroot}%{_javadir}
for jar in *-%{version}*; do
ln -sf ${jar} ${jar/-%{version}/}
done
)
find docs -name ".cvswrappers" -exec rm -f {} \;
find docs -name "*.xml" -exec rm -f {} \;
find docs -name "*.xsl" -exec rm -f {} \;
find docs -name "*.log" -exec rm -f {} \;
(
cd docs/manual
mv html/* .
)
(
cd docs/manual
rm -rf html
)
(
cd docs/manual
rm -rf xsl
)
mkdir -p %{buildroot}%{_javadocdir}/bsh-%{version}
cp -pr javadoc/* %{buildroot}%{_javadocdir}/bsh-%{version}
ln -s bsh-%{version} %{buildroot}%{_javadocdir}/bsh
for i in `find tests -name \*.bsh`; do
perl -p -i -e 's,^\n?#!(/(usr/)?bin/java bsh\.Interpreter|/bin/sh),#!/usr/bin/env %{_bindir}/bsh,' $i
if head -1 $i | grep '#!/usr/bin/env %{_bindir}/bsh' >/dev/null; then
chmod 755 $i
fi
done
find . -name "*.bsh" -exec perl -p -i -e 's|/bin/java|%{_bindir}/java|g;' {} \;
sed -i "s|/bin/java|%{_bindir}/java|" tests/Template
mkdir -p %{buildroot}%{_datadir}/bsh/webapps
chmod 755 tests/Template
cat > one << EOF
#!/bin/sh
EOF
cat tests/Interactive/reload/one >> one
cat one > tests/Interactive/reload/one
rm one
cat > two << EOF
#!/bin/sh
EOF
cat tests/Interactive/reload/two >> two
cat two > tests/Interactive/reload/two
rm two
cp -pr tests %{buildroot}%{_datadir}/bsh
install -m 644 dist/bshservlet.war %{buildroot}%{_datadir}/bsh/webapps
install -m 644 dist/bshservlet-wbsh.war %{buildroot}%{_datadir}/bsh/webapps
mkdir -p %{buildroot}%{_datadir}/applications
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/16x16/apps
mkdir -p %{buildroot}%{_datadir}/pixmaps
convert %{SOURCE1} \
%{buildroot}%{_datadir}/icons/hicolor/16x16/apps/bsh.png
convert %{SOURCE1} \
%{buildroot}%{_datadir}/pixmaps/bsh.png
desktop-file-install --vendor=%vendor --mode=644 \
--dir=%{buildroot}%{_datadir}/applications %{SOURCE2}
mkdir -p %{buildroot}%{_datadir}/maven2/poms
install -pm 644 %{SOURCE3} %{buildroot}%{_datadir}/maven2/poms/JPP.bsh.pom
install -pm 644 %{SOURCE4} %{buildroot}%{_datadir}/maven2/poms/JPP.bsh-bsf.pom
%add_to_maven_depmap bsh bsh %{version} JPP bsh
%add_to_maven_depmap bsh bsh-bsf %{version} JPP bsh-bsf
mkdir -p %{buildroot}%{_bindir}
cat > %{buildroot}%{_bindir}/bshdoc << EOF
#!/usr/bin/env %{_bindir}/bsh
EOF
cat scripts/bshdoc.bsh >> %{buildroot}%{_bindir}/bshdoc
install -pm 755 %{SOURCE5} %{buildroot}%{_bindir}/bsh-desktop
install -pm 755 %{SOURCE6} %{buildroot}%{_bindir}/bsh
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post desktop
touch --no-create %{_datadir}/icons/hicolor
if [ -x %{_bindir}/gtk-update-icon-cache ] ; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor
fi
%post
%update_maven_depmap
%postun desktop
touch --no-create %{_datadir}/icons/hicolor
if [ -x %{_bindir}/gtk-update-icon-cache ] ; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor
fi
%postun
%update_maven_depmap
%files
%defattr(-,root,root)
%{_bindir}/bsh
%{_bindir}/bshdoc
%{_javadir}/bsh-%{version}.jar
%{_javadir}/bsh-bsf-%{version}.jar
%{_javadir}/bsh-bsf.jar
%{_javadir}/bsh.jar
%{_javadir}/bsh-classpath-%{version}.jar
%{_javadir}/bsh-classpath.jar
%{_javadir}/bsh-commands-%{version}.jar
@ -274,55 +98,36 @@ fi
%{_javadir}/bsh-reflect.jar
%{_javadir}/bsh-util-%{version}.jar
%{_javadir}/bsh-util.jar
%{_javadir}/bsh.jar
%dir %{_datadir}/bsh
%{_datadir}/bsh/webapps
%{_datadir}/maven2/poms/*
%{_mavendepmapfragdir}
%doc src/Changes.html src/License.txt src/README.txt
%files javadoc
%files bsf
%defattr(-,root,root)
%{_javadocdir}/bsh-%{version}
%{_javadocdir}/bsh
%{_javadir}/bsh-bsf-%{version}.jar
%{_javadir}/bsh-bsf.jar
%files demo
%files classgen
%defattr(-,root,root)
%{_datadir}/bsh
%doc tests/README.txt tests/Interactive/README
%files manual
%defattr(-,root,root)
%doc docs/*
%files desktop
%defattr(-,root,root)
%{_bindir}/bsh-desktop
%{_datadir}/applications/*bsh-desktop.desktop
%{_datadir}/icons/hicolor/*x*/apps/bsh.png
%{_datadir}/pixmaps/bsh.png
%{_javadir}/bsh-classgen-%{version}.jar
%{_javadir}/bsh-classgen.jar
%changelog
* Mon Mar 28 2011 gil <puntogil@libero.it> 1.3.0-7mamba
- fixed demo rpm warning
* Wed Jun 30 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 2.1.0-1mamba
- update to 2.1.0
* Sun Mar 27 2011 gil <puntogil@libero.it> 1.3.0-6mamba
- rebuilt with java-openjdk support
* Sat Nov 27 2010 gil <puntogil@libero.it> 2.0b4-3mamba
- fix broken link in %{_datadir}/bsh2/bshservlet-wbsh
* Thu Nov 25 2010 gil <puntogil@libero.it> 1.3.0-5mamba
* Thu Nov 04 2010 gil <puntogil@libero.it> 2.0b4-2mamba
- rebuilt devel
- add new sub package desktop
- fix documentation build
- add %%post %%postun {,desktop} scripts
* Tue Mar 17 2009 gil <puntogil@libero.it> 1.3.0-4mamba
- rebuilt with sun-java 6u20
* Tue Mar 17 2009 gil <puntogil@libero.it> 2.0b4-1mamba
- update to 2.0b4
- renamed java-bsh2
* Tue Mar 17 2009 gil <puntogil@libero.it> 1.3.0-3mamba
- rebuilt
- add maven poms
* Fri Mar 13 2009 gil <puntogil@libero.it> 1.3.0-2mamba
- rebuilt
- add sub package console
* Thu Mar 05 2009 gil <puntogil@libero.it> 1.3.0-1mamba
- package created by autospec