|
|
|
@ -1,8 +1,40 @@
|
|
|
|
|
%global upstream_version %(echo %{version} | tr -d '~')
|
|
|
|
|
# Copyright (c) 2000-2007, JPackage Project
|
|
|
|
|
# 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
|
|
|
|
|
Version: 2.0~b6
|
|
|
|
|
Release: 3%{?dist}
|
|
|
|
|
Version: 2.0
|
|
|
|
|
Release: 13.%{reltag}%{?dist}
|
|
|
|
|
Epoch: 0
|
|
|
|
|
Summary: Lightweight Scripting for Java
|
|
|
|
|
URL: http://www.beanshell.org/
|
|
|
|
|
# bundled asm is BSD
|
|
|
|
@ -10,24 +42,34 @@ URL: http://www.beanshell.org/
|
|
|
|
|
License: ASL 2.0 and BSD and Public Domain
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
# ./generate-tarball.sh
|
|
|
|
|
# TODO Use proper %%{version} when a newer version is available
|
|
|
|
|
# TODO Also see TODO in ./generate-tarball.sh
|
|
|
|
|
Source0: %{name}-2.0-b6.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
|
|
|
|
|
|
|
|
|
|
Patch0: %{name}-source-1.6.patch
|
|
|
|
|
Patch1: %{name}-java-9.patch
|
|
|
|
|
|
|
|
|
|
BuildRequires: javapackages-local
|
|
|
|
|
BuildRequires: ant
|
|
|
|
|
BuildRequires: bsf
|
|
|
|
|
BuildRequires: junit
|
|
|
|
|
BuildRequires: javacc
|
|
|
|
|
BuildRequires: glassfish-servlet-api
|
|
|
|
|
%if %{with desktop}
|
|
|
|
|
BuildRequires: ImageMagick
|
|
|
|
|
BuildRequires: desktop-file-utils
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
Requires: java-headless
|
|
|
|
|
Requires: bsf
|
|
|
|
|
Requires: jline
|
|
|
|
|
# Explicit javapackages-tools requires since scripts use
|
|
|
|
|
# /usr/share/java-utils/java-functions
|
|
|
|
|
Requires: javapackages-tools
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Provides: %{name}-utils = %{version}-%{release}
|
|
|
|
|
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
|
|
|
|
@ -66,9 +108,7 @@ Summary: API documentation for %{name}
|
|
|
|
|
This package provides %{summary}.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n beanshell-%{upstream_version}
|
|
|
|
|
%patch0 -p1
|
|
|
|
|
%patch1 -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
|
|
|
|
|
|
|
|
|
@ -83,13 +123,42 @@ build-jar-repository lib bsf javacc junit glassfish-servlet-api
|
|
|
|
|
ant test dist
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%mvn_artifact pom.xml dist/%{name}-%{upstream_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
|
|
|
|
|
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
|
|
|
|
|
%license LICENSE NOTICE
|
|
|
|
|
%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
|
|
|
|
|
%doc docs/manual/html
|
|
|
|
@ -101,18 +170,6 @@ ant test dist
|
|
|
|
|
%license LICENSE NOTICE
|
|
|
|
|
|
|
|
|
|
%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
|
|
|
|
|
- Remove proprietary files from tarball
|
|
|
|
|
|
|
|
|
|