Compare commits

..

No commits in common. "c8-beta-stream-201801" and "c8-stream-201902" have entirely different histories.

6 changed files with 64 additions and 98 deletions

View File

@ -1 +1 @@
768bb817ac49869bde97d27d2c99a9cce1b88a3c SOURCES/bsh-2.0-b6.tar.gz f4663ea0f648301b4d2b6c38a1bbbfb763e6d2f8 SOURCES/bsh-2.0-b6.tar.gz

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

11
SOURCES/bsh-java-9.patch Normal file
View File

@ -0,0 +1,11 @@
--- beanshell-2.0b6/src/bsh/util/AWTConsole.java~ 2016-02-05 18:16:07.000000000 +0100
+++ beanshell-2.0b6/src/bsh/util/AWTConsole.java 2019-10-28 14:07:07.370526037 +0100
@@ -212,7 +212,7 @@
We have to get to the peer because TextComponent will refuse to
let us set us set a caret position greater than the text length.
Great. What a piece of crap.
- */
+ //
public void setCaretPosition( int pos ) {
((java.awt.peer.TextComponentPeer)getPeer()).setCaretPosition(
pos + countNLs() );

View File

@ -0,0 +1,21 @@
--- beanshell-2.0b6/build.xml~ 2016-02-05 18:16:07.000000000 +0100
+++ beanshell-2.0b6/build.xml 2019-10-28 14:00:52.279528558 +0100
@@ -170,7 +170,8 @@
deprecation="${deprecation}"
optimize="on"
debug="on"
- target="1.5"
+ source="1.6"
+ target="1.6"
includes="**/*.java"
excludes="${excludes},**/bak/**"
>
@@ -213,7 +214,7 @@
destdir="${javadoc-dir}"
author="true"
version="true"
- source="1.5"
+ source="1.6"
use="true"
windowtitle="BeanShell ${version}"
doctitle="<h1>BeanShell ${version}<h1>"

View File

@ -3,15 +3,14 @@ set -e
name=bsh name=bsh
version="$(sed -n 's/Version:\s*//p' *.spec)" version="$(sed -n 's/Version:\s*//p' *.spec)"
reltag="$(sed -n 's/%global\s*reltag\s*//p' *.spec)"
# RETRIEVE # RETRIEVE
wget "https://github.com/beanshell/beanshell/archive/${version}${reltag}.tar.gz" -O "${name}-${version}-${reltag}.orig.tar.gz" wget "https://github.com/beanshell/beanshell/archive/${version/'~'}.tar.gz" -O "${name}-${version}.orig.tar.gz"
rm -rf tarball-tmp rm -rf tarball-tmp
mkdir tarball-tmp mkdir tarball-tmp
cd tarball-tmp cd tarball-tmp
tar xf "../${name}-${version}-${reltag}.orig.tar.gz" tar xf "../${name}-${version}.orig.tar.gz"
# CLEAN TARBALL # CLEAN TARBALL
rm -r */lib rm -r */lib
@ -20,6 +19,7 @@ find -name '*.class' -delete
# Files marked as SUN PROPRIETARY/CONFIDENTAIL # Files marked as SUN PROPRIETARY/CONFIDENTAIL
rm -r */engine/javax-src rm -r */engine/javax-src
tar cf "../${name}-${version}-${reltag}.tar.gz" * # TODO Simply use ${version} without substitution when a newer version is available
tar czf "../${name}-${version/'~'/'-'}.tar.gz" *
cd .. cd ..
rm -r tarball-tmp "${name}-${version}-${reltag}.orig.tar.gz" rm -r tarball-tmp "${name}-${version}.orig.tar.gz"

View File

@ -1,40 +1,8 @@
# Copyright (c) 2000-2007, JPackage Project %global upstream_version %(echo %{version} | tr -d '~')
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the
# distribution.
# 3. Neither the name of the JPackage Project nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
%global reltag b6
%bcond_without desktop
Name: bsh Name: bsh
Version: 2.0 Version: 2.0~b6
Release: 13.%{reltag}%{?dist} Release: 3%{?dist}
Epoch: 0
Summary: Lightweight Scripting for Java Summary: Lightweight Scripting for Java
URL: http://www.beanshell.org/ URL: http://www.beanshell.org/
# bundled asm is BSD # bundled asm is BSD
@ -42,34 +10,24 @@ URL: http://www.beanshell.org/
License: ASL 2.0 and BSD and Public Domain License: ASL 2.0 and BSD and Public Domain
BuildArch: noarch BuildArch: noarch
# ./generate-tarball.sh # ./generate-tarball.sh
Source0: %{name}-%{version}-%{reltag}.tar.gz # TODO Use proper %%{version} when a newer version is available
Source1: %{name}-desktop.desktop # TODO Also see TODO in ./generate-tarball.sh
Source0: %{name}-2.0-b6.tar.gz
# Remove bundled jars which cannot be easily verified for licensing # Remove bundled jars which cannot be easily verified for licensing
# Remove code marked as SUN PROPRIETARY/CONFIDENTAIL # Remove code marked as SUN PROPRIETARY/CONFIDENTAIL
Source2: generate-tarball.sh Source2: generate-tarball.sh
Patch0: %{name}-source-1.6.patch
Patch1: %{name}-java-9.patch
BuildRequires: javapackages-local BuildRequires: javapackages-local
BuildRequires: ant BuildRequires: ant
BuildRequires: bsf BuildRequires: bsf
BuildRequires: junit BuildRequires: junit
BuildRequires: javacc BuildRequires: javacc
BuildRequires: glassfish-servlet-api BuildRequires: glassfish-servlet-api
%if %{with desktop}
BuildRequires: ImageMagick
BuildRequires: desktop-file-utils
%endif
Requires: java-headless Provides: %{name}-utils = %{version}-%{release}
Requires: bsf
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
# bsh uses small subset of modified (shaded) classes from ancient version of # bsh uses small subset of modified (shaded) classes from ancient version of
# objecweb-asm under asm directory # objecweb-asm under asm directory
@ -108,7 +66,9 @@ Summary: API documentation for %{name}
This package provides %{summary}. This package provides %{summary}.
%prep %prep
%setup -q -n beanshell-%{version}%{reltag} %setup -q -n beanshell-%{upstream_version}
%patch0 -p1
%patch1 -p1
sed -i 's,org.apache.xalan.xslt.extensions.Redirect,http://xml.apache.org/xalan/redirect,' docs/manual/xsl/*.xsl sed -i 's,org.apache.xalan.xslt.extensions.Redirect,http://xml.apache.org/xalan/redirect,' docs/manual/xsl/*.xsl
@ -123,42 +83,13 @@ build-jar-repository lib bsf javacc junit glassfish-servlet-api
ant test dist ant test dist
%install %install
%mvn_artifact pom.xml dist/%{name}-%{version}%{reltag}.jar %mvn_artifact pom.xml dist/%{name}-%{upstream_version}.jar
%mvn_install -J javadoc %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
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}:jline %{name} true
%jpackage_script bsh.Console "\${BSH_DEBUG:+-Ddebug=true}" "" bsh bsh-console true
echo '#!%{_bindir}/bsh' > %{buildroot}%{_bindir}/bshdoc
cat scripts/bshdoc.bsh >> %{buildroot}%{_bindir}/bshdoc
%files -f .mfiles %files -f .mfiles
%license LICENSE NOTICE %license LICENSE NOTICE
%doc README.md src/Changes.html src/CodeMap.html docs/faq/faq.html %doc README.md src/Changes.html src/CodeMap.html docs/faq/faq.html
%attr(0755,root,root) %{_bindir}/%{name}*
%if %{with desktop}
%{_datadir}/applications/%{name}-desktop.desktop
%{_datadir}/pixmaps/%{name}.png
%endif
%{_datadir}/%{name}
%files manual %files manual
%doc docs/manual/html %doc docs/manual/html
@ -170,6 +101,18 @@ cat scripts/bshdoc.bsh >> %{buildroot}%{_bindir}/bshdoc
%license LICENSE NOTICE %license LICENSE NOTICE
%changelog %changelog
* Tue Nov 05 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.0~b6-3
- Mass rebuild for javapackages-tools 201902
* Tue Nov 05 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.0~b6-2
- Drop launcher scripts and servlet
* Mon Sep 16 2019 Marian Koncek <mkoncek@redhat.com> - 2.0~b6-1
- Use tilde versioning
* Fri May 24 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.0-14.b6
- Mass rebuild for javapackages-tools 201901
* Fri Aug 03 2018 Michael Simacek <msimacek@redhat.com> - 0:2.0-13.b6 * Fri Aug 03 2018 Michael Simacek <msimacek@redhat.com> - 0:2.0-13.b6
- Remove proprietary files from tarball - Remove proprietary files from tarball