diff --git a/.gitignore b/.gitignore
index ef8d6e7..02b4714 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,3 @@
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..968bc20 100644
--- a/bsh.spec
+++ b/bsh.spec
@@ -28,46 +28,45 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
+%global reltag b6
+%bcond_without desktop
+
Name: bsh
-Version: 2.1.0
-Release: 17%{?dist}
+Version: 2.0
+Release: 14.%{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
-
+License: ASL 2.0 and BSD and Public Domain
+BuildArch: noarch
# ./generate-tarball.sh
-Source0: %{name}-%{version}.tar.gz
+Source0: %{name}-%{version}-%{reltag}.tar.gz
+Source1: %{name}-desktop.desktop
# 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
-
-BuildArch: noarch
-ExclusiveArch: %{java_arches} noarch
-
-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: glassfish-servlet-api
+%if %{with desktop}
+BuildRequires: ImageMagick
+BuildRequires: desktop-file-utils
+%endif
+Requires: java-headless
Requires: bsf
-Requires: java-25-headless
-Requires: jline2
-
+Requires: jline
# Explicit javapackages-tools requires since scripts use
# /usr/share/java-utils/java-functions
Requires: javapackages-tools
+
Provides: %{name}-utils = %{epoch}:%{version}-%{release}
Obsoletes: %{name}-utils < 0:2.0
Obsoletes: %{name}-demo < 0:2.0
@@ -109,9 +108,7 @@ 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}
sed -i 's,org.apache.xalan.xslt.extensions.Redirect,http://xml.apache.org/xalan/redirect,' docs/manual/xsl/*.xsl
@@ -126,10 +123,19 @@ 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
+%if %{with desktop}
+# 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
+%endif
+
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 +144,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 +153,12 @@ 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}/
+%if %{with desktop}
+%{_datadir}/applications/%{name}-desktop.desktop
+%{_datadir}/pixmaps/%{name}.png
+%endif
+%{_datadir}/%{name}
%files manual
%doc docs/manual/html
@@ -161,81 +170,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
diff --git a/generate-tarball.sh b/generate-tarball.sh
index 4f222cc..bf091f9 100755
--- a/generate-tarball.sh
+++ b/generate-tarball.sh
@@ -3,22 +3,23 @@ set -e
name=bsh
version="$(sed -n 's/Version:\s*//p' *.spec)"
+reltag="$(sed -n 's/%global\s*reltag\s*//p' *.spec)"
# RETRIEVE
-wget "https://github.com/beanshell/beanshell/archive/${version}.tar.gz" -O "${name}-${version}.orig.tar.gz"
+wget "https://github.com/beanshell/beanshell/archive/${version}${reltag}.tar.gz" -O "${name}-${version}-${reltag}.orig.tar.gz"
rm -rf tarball-tmp
mkdir tarball-tmp
cd tarball-tmp
-tar xf "../${name}-${version}.orig.tar.gz"
+tar xf "../${name}-${version}-${reltag}.orig.tar.gz"
# CLEAN TARBALL
rm -r */lib
-find -name '*.jar' -print -delete
-find -name '*.class' -print -delete
+find -name '*.jar' -delete
+find -name '*.class' -delete
# Files marked as SUN PROPRIETARY/CONFIDENTAIL
-rm -rv */engine/javax-src
+rm -r */engine/javax-src
-tar cf "../${name}-${version}.tar.gz" *
+tar cf "../${name}-${version}-${reltag}.tar.gz" *
cd ..
-rm -r tarball-tmp "${name}-${version}.orig.tar.gz"
+rm -r tarball-tmp "${name}-${version}-${reltag}.orig.tar.gz"
diff --git a/sources b/sources
index 49df674..c02c0d3 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (bsh-2.1.0.tar.gz) = 4cee4ffc97e0214b0ef3fbfbfacc3ec55e8bbf7b26c36e51fd03f087c9317501e4d975f4b1c4b1d04afd0a9120789c45f8ea9390598e19802bc063d367bd247e
+SHA512 (bsh-2.0-b6.tar.gz) = 22e920fa78d2117cc27074f12a12246cb2923b1d308736b2ed5fd2faa9bbc8b77b4991abc862097cce4e9de473c17a9d9a85ee5bdab5462f4a92c64c3d49bfc1