Update to upstream version 2.0.b6

This commit is contained in:
Michael Simacek 2016-11-23 17:49:36 +01:00
parent 746caad222
commit 9a27cb9c42
7 changed files with 73 additions and 243 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
bsh-1.3.0-src.tar.bz2
/2.0b6.tar.gz

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,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,34 +0,0 @@
diff --git a/docs/faq/faq.xsl b/docs/faq/faq.xsl
index 44615de..341b435 100644
--- a/docs/faq/faq.xsl
+++ b/docs/faq/faq.xsl
@@ -18,7 +18,7 @@
<!--xsl:param name="imagedir"/-->
<!-- Output directives -->
-<xsl:output method="xhtml" indent="yes"/>
+<xsl:output method="html" indent="yes"/>
<!--
Root
diff --git a/docs/manual/xsl/manual.xsl b/docs/manual/xsl/manual.xsl
index 3b8208c..d733260 100644
--- a/docs/manual/xsl/manual.xsl
+++ b/docs/manual/xsl/manual.xsl
@@ -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

209
bsh.spec
View File

@ -28,32 +28,40 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
%global reltag b6
Name: bsh
Version: 1.3.0
Release: 36%{?dist}
Version: 2.0
Release: 1.%{reltag}%{?dist}
Epoch: 0
Summary: Lightweight Scripting for Java
License: (SPL or LGPLv2+) and Public Domain
Source0: %{name}-%{version}-src.tar.bz2
#cvs -d:pserver:anonymous@beanshell.cvs.sourceforge.net:/cvsroot/beanshell login
#cvs -z3 -d:pserver:anonymous@beanshell.cvs.sourceforge.net:/cvsroot/beanshell export -r rel_1_3_0_final BeanShell
#tar cjf bsh-1.3.0-src.tar.bz2 BeanShell
Source1: bsh-1.3.0.pom
Source2: bsh-bsf-1.3.0.pom
Source3: %{name}-desktop.desktop
URL: http://www.beanshell.org/
# bundled asm is BSD
# bsf/src/bsh/util/BeanShellBSFEngine.java is public-domain
License: ASL 2.0 and BSD and Public Domain
BuildArch: noarch
Source0: https://github.com/beanshell/beanshell/archive/%{version}%{reltag}.tar.gz
Source1: %{name}-desktop.desktop
Patch0: %{name}-build.patch
Patch1: %{name}-xsl-fixes.patch
BuildRequires: java-devel
BuildRequires: javapackages-local
BuildRequires: ant
BuildRequires: bsf
BuildRequires: junit
BuildRequires: javacc
BuildRequires: ImageMagick
BuildRequires: desktop-file-utils
BuildRequires: servlet
Requires: java-headless
Requires: bsf
URL: http://www.beanshell.org/
BuildArch: noarch
Requires: jline
Provides: %{name}-utils = %{epoch}:%{version}-%{release}
Obsoletes: %{name}-utils < 0:2.0
Obsoletes: %{name}-demo < 0:2.0
# bsh uses small subset of modified (shaded) classes from ancient version of
# objecweb-asm under asm directory
Provides: bundled(objectweb-asm) = 1.3.6
%description
BeanShell is a small, free, embeddable, Java source interpreter with
@ -87,161 +95,86 @@ Summary: API documentation for %{name}
%description javadoc
This package provides %{summary}.
%package demo
Summary: Demo for %{name}
AutoReqProv: no
Requires: %{name} = %{epoch}:%{version}-%{release}
%description demo
Demonstrations and samples for %{name}.
%package utils
Summary: %{name} utilities
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: jline
Provides: %{name}-desktop = %{epoch}:%{version}-%{release}
%description utils
%{name} utilities.
%prep
%setup -q -n BeanShell
%patch0 -p1
%patch1 -p1
for j in $(find . -name "*.jar"); do
mv $j $j.no
done
# remove all CVS files
for dir in `find . -type d -name CVS`; do rm -rf $dir; done
for file in `find . -type f -name .cvsignore`; do rm -rf $file; done
# fix rpmlint spurious-executable-perm warnings
for i in backbutton forwardbutton homebutton remoteconsole upbutton; do
chmod 644 docs/images/$i.gif
done
%setup -q -n beanshell-%{version}%{reltag}
rm -r lib
find -name '*.jar' -delete
find -name '*.class' -delete
# those are now included in JDK itself
rm -r engine/javax-src
sed -i 's,org.apache.xalan.xslt.extensions.Redirect,http://xml.apache.org/xalan/redirect,' docs/manual/xsl/*.xsl
%mvn_alias :bsh bsh:bsh bsh:bsh-bsf org.beanshell:bsh
%build
mkdir -p lib
pushd lib
ln -sf $(build-classpath bsf)
ln -sf $(build-classpath servlet)
popd
ant="ant -Dant.build.javac.source=1.5"
$ant test dist
(cd docs/faq && $ant)
(cd docs/manual && $ant)
mkdir lib
build-jar-repository lib bsf javacc junit servlet
ant test dist
%install
# jars
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
for mod in '' bsf classpath commands core reflect util; do
install -p -m 644 dist/%{name}${mod:+-${mod}}-%{version}.jar \
$RPM_BUILD_ROOT%{_javadir}/%{name}${mod:+-${mod}}.jar
done
%mvn_artifact pom.xml dist/%{name}-%{version}%{reltag}.jar
# poms
install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
install -pm 644 %{SOURCE1} \
$RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
install -pm 644 %{SOURCE2} \
$RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}-bsf.pom
%mvn_install -J javadoc
%add_maven_depmap JPP-%{name}.pom %{name}.jar -a org.beanshell:%{name}
%add_maven_depmap JPP-%{name}-bsf.pom %{name}-bsf.jar
# manual
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)
# javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
cp -pr javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
# menu entry
desktop-file-install --mode=644 \
--dir=$RPM_BUILD_ROOT%{_datadir}/applications %{SOURCE3}
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/apps
--dir=%{buildroot}%{_datadir}/applications %{SOURCE1}
install -d -m 755 %{buildroot}%{_datadir}/icons/hicolor/16x16/apps
convert src/bsh/util/lib/icon.gif \
$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/apps/bsh.png
%{buildroot}%{_datadir}/icons/hicolor/16x16/apps/bsh.png
# demo
for i in `find tests -name \*.bsh`; do
sed -ri '1s,^#!(/(usr/)?bin/java bsh\.Interpreter|/bin/sh),#!/usr/bin/env %{_bindir}/%{name},' $i
if head -1 $i | grep '#!/usr/bin/env %{_bindir}/%{name}' >/dev/null; then
chmod 755 $i
fi
done
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
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name}
cp -pr tests $RPM_BUILD_ROOT%{_datadir}/%{name}
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name}/webapps
install -m 644 dist/bshservlet.war $RPM_BUILD_ROOT%{_datadir}/%{name}/webapps
install -m 644 dist/bshservlet-wbsh.war $RPM_BUILD_ROOT%{_datadir}/%{name}/webapps
install -d -m 755 %{buildroot}%{_datadir}/%{name}
install -d -m 755 %{buildroot}%{_datadir}/%{name}/webapps
install -m 644 dist/bshservlet.war %{buildroot}%{_datadir}/%{name}/webapps
install -m 644 dist/bshservlet-wbsh.war %{buildroot}%{_datadir}/%{name}/webapps
# scripts
install -d $RPM_BUILD_ROOT%{_bindir}
install -d %{buildroot}%{_bindir}
%jpackage_script bsh.Interpreter "\${BSH_DEBUG:+-Ddebug=true}" jline.console.internal.ConsoleRunner %{name}:jline %{name} true
%jpackage_script bsh.Console "\${BSH_DEBUG:+-Ddebug=true}" "" %{name} %{name}-console true
%jpackage_script bsh.Console "\${BSH_DEBUG:+-Ddebug=true}" "" bsh bsh-console true
cat > $RPM_BUILD_ROOT%{_bindir}/%{name}doc << EOF
#!/usr/bin/env %{_bindir}/%{name}
EOF
cat scripts/bshdoc.bsh >> $RPM_BUILD_ROOT%{_bindir}/%{name}doc
echo '#!%{_bindir}/bsh' > %{buildroot}%{_bindir}/bshdoc
cat scripts/bshdoc.bsh >> %{buildroot}%{_bindir}/bshdoc
%post utils
%post
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
%postun utils
%postun
if [ $1 -eq 0 ] ; then
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi
%posttrans utils
%posttrans
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%files -f .mfiles
%license src/License.txt
%doc src/Changes.html src/README.txt
%{_javadir}/*
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/webapps
%files manual
%license src/License.txt
%doc docs/*
%files javadoc
%license src/License.txt
%{_javadocdir}/%{name}
%files demo
%doc tests/README.txt tests/Interactive/README
%{_datadir}/%{name}/*
%files utils
%license LICENSE NOTICE
%doc README.md src/Changes.html src/CodeMap.html docs/faq/faq.html
%attr(0755,root,root) %{_bindir}/%{name}*
%{_datadir}/applications/%{name}-desktop.desktop
%{_datadir}/icons/hicolor/*x*/apps/%{name}.png
%{_datadir}/%{name}/webapps
%files manual
%doc docs/manual/html
%doc docs/manual/images/*.jpg
%doc docs/manual/images/*.gif
%license LICENSE NOTICE
%files javadoc -f .mfiles-javadoc
%license LICENSE NOTICE
%changelog
* Thu Nov 24 2016 Michael Simacek <msimacek@redhat.com> - 0:2.0-1.b6
- Update to upstream version 2.0.b6
* Wed Oct 12 2016 Ville Skyttä <ville.skytta@iki.fi> - 0:1.3.0-36
- Switch to jline 2.x in -utils
- Mark License.txt as %%license

View File

@ -1 +1 @@
3d8c14c2a223aa577108efa8bd17bdd3 bsh-1.3.0-src.tar.bz2
b2cc737a850d49c2eb94567de33135cc 2.0b6.tar.gz