diff --git a/.gitignore b/.gitignore
index ef8d6e7..112da74 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,2 @@
bsh-1.3.0-src.tar.bz2
/2.0b6.tar.gz
-/bsh-2.0-b6.tar.gz
-/bsh-2.1.0.tar.gz
diff --git a/0000-source-target-1.8.patch b/0000-source-target-1.8.patch
deleted file mode 100644
index 5fb7dfd..0000000
--- a/0000-source-target-1.8.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-diff --git a/build.xml b/build.xml
-index 8542245..6179cfa 100644
---- a/build.xml
-+++ b/build.xml
-@@ -16,8 +16,8 @@
-
-
-
--
--
-+
-+
-
-
-
-@@ -178,8 +178,8 @@
- debug="on"
- includes="**/*.java"
- excludes="${excludes},**/bak/**"
-- source="1.6"
-- target="1.6"
-+ source="1.8"
-+ target="1.8"
- >
-
-
-@@ -213,8 +213,8 @@
- debug="on"
- includes="**/*.java"
- excludes="${excludes},**/bak/**"
-- source="1.6"
-- target="1.6"
-+ source="1.8"
-+ target="1.8"
- >
-
-
-@@ -255,7 +255,7 @@
- destdir="${javadoc-dir}"
- author="true"
- version="true"
-- source="1.6"
-+ source="1.8"
- use="true"
- windowtitle="BeanShell ${version}"
- doctitle="<h1>BeanShell ${version}<h1>"
-@@ -680,8 +680,8 @@
- destdir="${build-dir}"
- debug="on"
- debuglevel="lines,vars,source"
-- source="1.6"
-- target="1.6"
-+ source="1.8"
-+ target="1.8"
- >
-
-
diff --git a/0001-java-11-compatibility.patch b/0001-java-11-compatibility.patch
deleted file mode 100644
index 36271b8..0000000
--- a/0001-java-11-compatibility.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 9b83372c64f30f44bd56696ae6adcbe6a83e1e2f Mon Sep 17 00:00:00 2001
-From: Fabio Valentini
-Date: Mon, 20 Jul 2020 21:28:13 +0200
-Subject: [PATCH 1/1] java 11 compatibility
-
----
- src/bsh/util/AWTConsole.java | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/bsh/util/AWTConsole.java b/src/bsh/util/AWTConsole.java
-index e88fbff..fbb237b 100644
---- a/src/bsh/util/AWTConsole.java
-+++ b/src/bsh/util/AWTConsole.java
-@@ -214,8 +214,8 @@ public class AWTConsole extends TextArea
- Great. What a piece of crap.
- */
- public void setCaretPosition( int pos ) {
-- ((java.awt.peer.TextComponentPeer)getPeer()).setCaretPosition(
-- pos + countNLs() );
-+ //((java.awt.peer.TextComponentPeer)getPeer()).setCaretPosition(
-+ // pos + countNLs() );
- }
-
- /*
---
-2.26.2
-
diff --git a/bsh-desktop.desktop b/bsh-desktop.desktop
new file mode 100644
index 0000000..da0f1ed
--- /dev/null
+++ b/bsh-desktop.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=BeanShell Desktop
+Exec=bsh-desktop
+Icon=bsh
+Terminal=false
+Type=Application
+StartupWMClass=bsh-Console
+Categories=Development;Java;
+Version=1.0
diff --git a/bsh.spec b/bsh.spec
index 6f60e19..be29400 100644
--- a/bsh.spec
+++ b/bsh.spec
@@ -28,45 +28,32 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
+%global reltag b6
+
Name: bsh
-Version: 2.1.0
-Release: 17%{?dist}
+Version: 2.0
+Release: 5.%{reltag}%{?dist}
Epoch: 0
Summary: Lightweight Scripting for Java
-URL: https://beanshell.github.io/
+URL: http://www.beanshell.org/
# bundled asm is BSD
# bsf/src/bsh/util/BeanShellBSFEngine.java is public-domain
-License: Apache-2.0 AND BSD-3-Clause AND LicenseRef-Fedora-Public-Domain
-
-# ./generate-tarball.sh
-Source0: %{name}-%{version}.tar.gz
-# Remove bundled jars which cannot be easily verified for licensing
-# Remove code marked as SUN PROPRIETARY/CONFIDENTAIL
-Source2: generate-tarball.sh
-
-# compatibility with Java 11:
-# - set javac / javadoc source and target values to 1.8
-Patch0: 0000-source-target-1.8.patch
-# - remove references to invisible symbols and methods
-Patch1: 0001-java-11-compatibility.patch
-
+License: ASL 2.0 and BSD and Public Domain
BuildArch: noarch
-ExclusiveArch: %{java_arches} noarch
+Source0: https://github.com/beanshell/beanshell/archive/%{version}%{reltag}.tar.gz
+Source1: %{name}-desktop.desktop
-BuildRequires: ant-openjdk25
+BuildRequires: javapackages-local
+BuildRequires: ant
BuildRequires: bsf
-BuildRequires: glassfish-servlet-api
-BuildRequires: javacc
-BuildRequires: javapackages-local-openjdk25
BuildRequires: junit
-
+BuildRequires: javacc
+BuildRequires: ImageMagick
+BuildRequires: desktop-file-utils
+BuildRequires: glassfish-servlet-api
+Requires: java-headless
Requires: bsf
-Requires: java-25-headless
-Requires: jline2
-
-# Explicit javapackages-tools requires since scripts use
-# /usr/share/java-utils/java-functions
-Requires: javapackages-tools
+Requires: jline
Provides: %{name}-utils = %{epoch}:%{version}-%{release}
Obsoletes: %{name}-utils < 0:2.0
@@ -109,9 +96,14 @@ Summary: API documentation for %{name}
This package provides %{summary}.
%prep
-%setup -q -n beanshell-%{version}
-%patch 0 -p1
-%patch 1 -p1
+%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
@@ -126,10 +118,17 @@ build-jar-repository lib bsf javacc junit glassfish-servlet-api
ant test dist
%install
-%mvn_artifact pom.xml dist/%{name}-%{version}.jar
+%mvn_artifact pom.xml dist/%{name}-%{version}%{reltag}.jar
%mvn_install -J javadoc
+# menu entry
+desktop-file-install --mode=644 \
+ --dir=%{buildroot}%{_datadir}/applications %{SOURCE1}
+install -d -m 755 %{buildroot}%{_datadir}/pixmaps
+convert src/bsh/util/lib/icon.gif \
+ %{buildroot}%{_datadir}/pixmaps/bsh.png
+
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
@@ -138,7 +137,7 @@ install -m 644 dist/bshservlet-wbsh.war %{buildroot}%{_datadir}/%{name}/webapps
# scripts
install -d %{buildroot}%{_bindir}
-%jpackage_script bsh.Interpreter "\${BSH_DEBUG:+-Ddebug=true}" jline.console.internal.ConsoleRunner %{name}:jline2/jline %{name} true
+%jpackage_script bsh.Interpreter "\${BSH_DEBUG:+-Ddebug=true}" jline.console.internal.ConsoleRunner %{name}:jline %{name} true
%jpackage_script bsh.Console "\${BSH_DEBUG:+-Ddebug=true}" "" bsh bsh-console true
echo '#!%{_bindir}/bsh' > %{buildroot}%{_bindir}/bshdoc
@@ -147,9 +146,10 @@ cat scripts/bshdoc.bsh >> %{buildroot}%{_bindir}/bshdoc
%files -f .mfiles
%license LICENSE NOTICE
%doc README.md src/Changes.html src/CodeMap.html docs/faq/faq.html
-
%attr(0755,root,root) %{_bindir}/%{name}*
-%{_datadir}/%{name}/
+%{_datadir}/applications/%{name}-desktop.desktop
+%{_datadir}/pixmaps/%{name}.png
+%{_datadir}/%{name}
%files manual
%doc docs/manual/html
@@ -161,109 +161,6 @@ cat scripts/bshdoc.bsh >> %{buildroot}%{_bindir}/bshdoc
%license LICENSE NOTICE
%changelog
-* Mon Jul 28 2025 jiri vanek - 0:2.1.0-17
-- Rebuilt for java-25-openjdk as preffered jdk
-
-* Wed Jul 23 2025 Fedora Release Engineering - 0:2.1.0-16
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
-
-* Thu Jan 16 2025 Fedora Release Engineering - 0:2.1.0-15
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
-
-* Wed Jul 17 2024 Fedora Release Engineering - 0:2.1.0-14
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
-
-* Wed May 22 2024 Marian Koncek - 0:2.1.0-13
-- Fix license field
-
-* Tue Feb 27 2024 Jiri Vanek - 0:2.1.0-12
-- Rebuilt for java-21-openjdk as system jdk
-
-* Tue Jan 23 2024 Fedora Release Engineering - 0:2.1.0-11
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
-
-* Fri Jan 19 2024 Fedora Release Engineering - 0:2.1.0-10
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
-
-* Wed Jul 19 2023 Fedora Release Engineering - 0:2.1.0-9
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
-
-* Wed Jan 18 2023 Fedora Release Engineering - 0:2.1.0-8
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
-
-* Wed Jul 20 2022 Fedora Release Engineering - 0:2.1.0-7
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
-
-* Fri Jul 08 2022 Jiri Vanek - 0:2.1.0-6
-- Rebuilt for Drop i686 JDKs
-
-* Sat Feb 05 2022 Jiri Vanek - 0:2.1.0-5
-- Rebuilt for java-17-openjdk as system jdk
-
-* Wed Jan 19 2022 Fedora Release Engineering - 0:2.1.0-4
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
-
-* Thu Dec 2 2021 Hans de Goede - 0:2.1.0-3
-- Fix building with Java 17
-
-* Wed Jul 21 2021 Fedora Release Engineering - 0:2.1.0-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
-
-* Mon Feb 01 2021 Fabio Valentini - 0:2.1.0-1
-- Update to version 2.1.0.
-
-* Wed Jan 27 2021 Tomas Popela - 0:2.0-22.b6
-- Don't build the desktop support on RHEL 8+ as ImageMagick isn't available there.
-
-* Tue Jan 26 2021 Fedora Release Engineering - 0:2.0-21.b6
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
-
-* Mon Dec 14 2020 Jerry James - 0:2.0-20.b6
-- Change jline Requires to jline2
-
-* Mon Jul 27 2020 Fedora Release Engineering - 0:2.0-19.b6
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
-
-* Mon Jul 20 2020 Fabio Valentini - 0:2.0-18.b6
-- Make adjustments for Java 11 compatibility.
-
-* Fri Jul 10 2020 Jiri Vanek - 0:2.0-17.b6
-- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
-
-* Tue Jan 28 2020 Fedora Release Engineering - 0:2.0-16.b6
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
-
-* Wed Jul 24 2019 Fedora Release Engineering - 0:2.0-15.b6
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
-
-* Thu Jan 31 2019 Fedora Release Engineering - 0:2.0-14.b6
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
-
-* Fri Aug 03 2018 Michael Simacek - 0:2.0-13.b6
-- Remove proprietary files from tarball
-
-* Mon Jul 30 2018 Severin Gehwolf - 0:2.0-12.b6
-- Add requirement on javapackages-tools for script's usage of
- java-functions.
-
-* Mon Jul 30 2018 Michael Simacek - 0:2.0-11.b6
-- Repack the tarball without binaries
-
-* Thu Jul 12 2018 Fedora Release Engineering - 0:2.0-10.b6
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
-
-* Wed Feb 07 2018 Fedora Release Engineering - 0:2.0-9.b6
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
-
-* Sat Sep 23 2017 Mikolaj Izdebski - 0:2.0-8.b6
-- Properly conditionalize build-requires
-
-* Wed Jul 26 2017 Fedora Release Engineering - 0:2.0-7.b6
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
-
-* Tue Jun 13 2017 Michael Simacek - 0:2.0-6.b6
-- Add conditional for desktop file
-
* Fri Mar 3 2017 Mikolaj Izdebski - 0:2.0-5.b6
- Install desktop icon to pixmaps instead of icons
diff --git a/generate-tarball.sh b/generate-tarball.sh
deleted file mode 100755
index 4f222cc..0000000
--- a/generate-tarball.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/bash
-set -e
-
-name=bsh
-version="$(sed -n 's/Version:\s*//p' *.spec)"
-
-# RETRIEVE
-wget "https://github.com/beanshell/beanshell/archive/${version}.tar.gz" -O "${name}-${version}.orig.tar.gz"
-
-rm -rf tarball-tmp
-mkdir tarball-tmp
-cd tarball-tmp
-tar xf "../${name}-${version}.orig.tar.gz"
-
-# CLEAN TARBALL
-rm -r */lib
-find -name '*.jar' -print -delete
-find -name '*.class' -print -delete
-# Files marked as SUN PROPRIETARY/CONFIDENTAIL
-rm -rv */engine/javax-src
-
-tar cf "../${name}-${version}.tar.gz" *
-cd ..
-rm -r tarball-tmp "${name}-${version}.orig.tar.gz"
diff --git a/sources b/sources
index 49df674..b47a7ec 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (bsh-2.1.0.tar.gz) = 4cee4ffc97e0214b0ef3fbfbfacc3ec55e8bbf7b26c36e51fd03f087c9317501e4d975f4b1c4b1d04afd0a9120789c45f8ea9390598e19802bc063d367bd247e
+b2cc737a850d49c2eb94567de33135cc 2.0b6.tar.gz