Blame SPECS/bsh.spec

5205bc
%{?scl:%scl_package bsh}
5205bc
%{!?scl:%global pkg_name %{name}}
5205bc
5205bc
# Copyright (c) 2000-2007, JPackage Project
5205bc
# All rights reserved.
5205bc
#
5205bc
# Redistribution and use in source and binary forms, with or without
5205bc
# modification, are permitted provided that the following conditions
5205bc
# are met:
5205bc
#
5205bc
# 1. Redistributions of source code must retain the above copyright
5205bc
#    notice, this list of conditions and the following disclaimer.
5205bc
# 2. Redistributions in binary form must reproduce the above copyright
5205bc
#    notice, this list of conditions and the following disclaimer in the
5205bc
#    documentation and/or other materials provided with the
5205bc
#    distribution.
5205bc
# 3. Neither the name of the JPackage Project nor the names of its
5205bc
#    contributors may be used to endorse or promote products derived
5205bc
#    from this software without specific prior written permission.
5205bc
#
5205bc
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
5205bc
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
5205bc
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
5205bc
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
5205bc
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
5205bc
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
5205bc
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
5205bc
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
5205bc
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
5205bc
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
5205bc
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5205bc
#
5205bc
5205bc
%global reltag b6
5205bc
%bcond_without  desktop
5205bc
5205bc
Name:           %{?scl_prefix}bsh
5205bc
Version:        2.0
5205bc
Release:        6.%{reltag}.2%{?dist}
5205bc
Epoch:          0
5205bc
Summary:        Lightweight Scripting for Java
5205bc
URL:            http://www.beanshell.org/
5205bc
# bundled asm is BSD
5205bc
# bsf/src/bsh/util/BeanShellBSFEngine.java is public-domain
5205bc
License:        ASL 2.0 and BSD and Public Domain
5205bc
BuildArch:      noarch
5205bc
Source0:        https://github.com/beanshell/beanshell/archive/%{version}%{reltag}.tar.gz
5205bc
Source1:        %{pkg_name}-desktop.desktop
5205bc
5205bc
BuildRequires:  %{?scl_prefix}javapackages-local
5205bc
BuildRequires:  %{?scl_prefix}ant
5205bc
BuildRequires:  %{?scl_prefix}bsf
5205bc
BuildRequires:  %{?scl_prefix}junit
5205bc
BuildRequires:  %{?scl_prefix}javacc
5205bc
BuildRequires:  ImageMagick
5205bc
BuildRequires:  desktop-file-utils
5205bc
BuildRequires:  %{?scl_prefix}glassfish-servlet-api
5205bc
Requires:       java-headless
5205bc
Requires:       %{?scl_prefix}bsf
5205bc
Requires:       %{?scl_prefix}jline
5205bc
5205bc
Provides:       %{name}-utils = %{epoch}:%{version}-%{release}
5205bc
5205bc
# bsh uses small subset of modified (shaded) classes from ancient version of
5205bc
# objecweb-asm under asm directory
5205bc
Provides:       %{?scl_prefix}bundled(objectweb-asm) = 1.3.6
5205bc
5205bc
%description
5205bc
BeanShell is a small, free, embeddable, Java source interpreter with
5205bc
object scripting language features, written in Java. BeanShell
5205bc
executes standard Java statements and expressions, in addition to
5205bc
obvious scripting commands and syntax. BeanShell supports scripted
5205bc
objects as simple method closures like those in Perl and
5205bc
JavaScript(tm). You can use BeanShell interactively for Java
5205bc
experimentation and debugging or as a simple scripting engine for your
5205bc
applications. In short: BeanShell is a dynamically interpreted Java,
5205bc
plus some useful stuff. Another way to describe it is to say that in
5205bc
many ways BeanShell is to Java as Tcl/Tk is to C: BeanShell is
5205bc
embeddable - You can call BeanShell from your Java applications to
5205bc
execute Java code dynamically at run-time or to provide scripting
5205bc
extensibility for your applications. Alternatively, you can call your
5205bc
Java applications and objects from BeanShell; working with Java
5205bc
objects and APIs dynamically. Since BeanShell is written in Java and
5205bc
runs in the same space as your application, you can freely pass
5205bc
references to "real live" objects into scripts and return them as
5205bc
results.
5205bc
5205bc
%package manual
5205bc
Summary:        Manual for %{pkg_name}
5205bc
5205bc
%description manual
5205bc
Documentation for %{pkg_name}.
5205bc
5205bc
%package javadoc
5205bc
Summary:        API documentation for %{pkg_name}
5205bc
5205bc
%description javadoc
5205bc
This package provides %{summary}.
5205bc
5205bc
%prep
5205bc
%setup -q -n beanshell-%{version}%{reltag}
5205bc
5205bc
rm -r lib
5205bc
find -name '*.jar' -delete
5205bc
find -name '*.class' -delete
5205bc
5205bc
# those are now included in JDK itself
5205bc
rm -r engine/javax-src
5205bc
5205bc
sed -i 's,org.apache.xalan.xslt.extensions.Redirect,http://xml.apache.org/xalan/redirect,' docs/manual/xsl/*.xsl
5205bc
5205bc
%mvn_alias :bsh bsh:bsh bsh:bsh-bsf org.beanshell:bsh
5205bc
5205bc
%mvn_file : %{pkg_name}
5205bc
5205bc
%build
5205bc
mkdir lib
5205bc
build-jar-repository lib bsf javacc junit glassfish-servlet-api
5205bc
5205bc
ant test dist
5205bc
5205bc
%install
5205bc
%mvn_artifact pom.xml dist/%{pkg_name}-%{version}%{reltag}.jar
5205bc
5205bc
%mvn_install -J javadoc
5205bc
5205bc
%if %{with desktop}
5205bc
# menu entry
5205bc
desktop-file-install --mode=644 \
5205bc
  --dir=%{buildroot}%{_datadir}/applications %{SOURCE1}
5205bc
install -d -m 755 %{buildroot}%{_datadir}/pixmaps
5205bc
convert src/bsh/util/lib/icon.gif \
5205bc
  %{buildroot}%{_datadir}/pixmaps/bsh.png
5205bc
%endif
5205bc
5205bc
install -d -m 755 %{buildroot}%{_datadir}/%{pkg_name}
5205bc
install -d -m 755 %{buildroot}%{_datadir}/%{pkg_name}/webapps
5205bc
install -m 644 dist/bshservlet.war %{buildroot}%{_datadir}/%{pkg_name}/webapps
5205bc
install -m 644 dist/bshservlet-wbsh.war %{buildroot}%{_datadir}/%{pkg_name}/webapps
5205bc
5205bc
# scripts
5205bc
install -d %{buildroot}%{_bindir}
5205bc
5205bc
%jpackage_script bsh.Interpreter "\${BSH_DEBUG:+-Ddebug=true}" jline.console.internal.ConsoleRunner %{pkg_name}:jline %{pkg_name} true
5205bc
%jpackage_script bsh.Console "\${BSH_DEBUG:+-Ddebug=true}" "" bsh bsh-console true
5205bc
5205bc
echo '#!%{_bindir}/bsh' > %{buildroot}%{_bindir}/bshdoc
5205bc
cat scripts/bshdoc.bsh >> %{buildroot}%{_bindir}/bshdoc
5205bc
5205bc
%files -f .mfiles
5205bc
%license LICENSE NOTICE
5205bc
%doc README.md src/Changes.html src/CodeMap.html docs/faq/faq.html
5205bc
%attr(0755,root,root) %{_bindir}/%{pkg_name}*
5205bc
%if %{with desktop}
5205bc
%{_datadir}/applications/%{pkg_name}-desktop.desktop
5205bc
%{_datadir}/pixmaps/%{pkg_name}.png
5205bc
%endif
5205bc
%{_datadir}/%{pkg_name}
5205bc
5205bc
%files manual
5205bc
%doc docs/manual/html
5205bc
%doc docs/manual/images/*.jpg
5205bc
%doc docs/manual/images/*.gif
5205bc
%license LICENSE NOTICE
5205bc
5205bc
%files javadoc -f .mfiles-javadoc
5205bc
%license LICENSE NOTICE
5205bc
5205bc
%changelog
5205bc
* Thu Jun 22 2017 Michael Simacek <msimacek@redhat.com> - 0:2.0-6.b6.2
5205bc
- Mass rebuild 2017-06-22
5205bc
5205bc
* Wed Jun 21 2017 Java Maintainers <java-maint@redhat.com> - 0:2.0-6.b6.1%{?dist}
5205bc
- Automated package import and SCL-ization
5205bc
5205bc
* Tue Jun 13 2017 Michael Simacek <msimacek@redhat.com> - 0:2.0-6.b6
5205bc
- Add conditional for desktop file
5205bc
5205bc
* Fri Mar  3 2017 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:2.0-5.b6
5205bc
- Install desktop icon to pixmaps instead of icons
5205bc
5205bc
* Fri Mar  3 2017 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:2.0-4.b6
5205bc
- Fix directory ownership
5205bc
5205bc
* Tue Feb 07 2017 Michael Simacek <msimacek@redhat.com> - 0:2.0-3.b6
5205bc
- Build against glassfish-servlet-api
5205bc
5205bc
* Thu Nov 24 2016 Michael Simacek <msimacek@redhat.com> - 0:2.0-2.b6
5205bc
- Install into expected location
5205bc
5205bc
* Thu Nov 24 2016 Michael Simacek <msimacek@redhat.com> - 0:2.0-1.b6
5205bc
- Update to upstream version 2.0.b6
5205bc
5205bc
* Wed Oct 12 2016 Ville Skyttä <ville.skytta@iki.fi> - 0:1.3.0-36
5205bc
- Switch to jline 2.x in -utils
5205bc
- Mark License.txt as %%license
5205bc
5205bc
* Thu Jul 21 2016 Michael Simacek <msimacek@redhat.com> - 0:1.3.0-35
5205bc
- Replace perl usage with sed
5205bc
5205bc
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0:1.3.0-34
5205bc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
5205bc
5205bc
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.3.0-33
5205bc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
5205bc
5205bc
* Wed Nov  5 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.3.0-32
5205bc
- Remove workaround for RPM bug #646523
5205bc
5205bc
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.3.0-31
5205bc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
5205bc
5205bc
* Wed May 21 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.3.0-30
5205bc
- Use .mfiles generated during build
5205bc
5205bc
* Tue Mar 04 2014 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0:1.3.0-29
5205bc
- Use Requires: java-headless rebuild (#1067528)
5205bc
5205bc
* Wed Oct 30 2013 Michal Srb <msrb@redhat.com> - 0:1.3.0-28
5205bc
- Switch to jline1 (Resolves rhbz#1023018)
5205bc
5205bc
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.3.0-27
5205bc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
5205bc
5205bc
* Fri Jul 12 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.3.0-26
5205bc
- Use %%add_maven_depmap instead of legacy macros
5205bc
- Install versionless javadocs
5205bc
- Remove old Obsoletes
5205bc
- Update and format descriptions
5205bc
- Install license file with manual and javadoc packages
5205bc
- Fix Requires and BuildRequires on java
5205bc
- Fix calls to %%jpackage_script
5205bc
5205bc
* Wed Jul 10 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.3.0-26
5205bc
- Remove arch-specific conditionals
5205bc
- Remove group tags
5205bc
- Remove Requires on jpackage-utils
5205bc
- Remove Requires on coreutils
5205bc
- Generate custom scripts with %%jpackage_script
5205bc
- Install versionless JARs only
5205bc
- Install POM files to %%{_mavenpomdir}
5205bc
5205bc
* Thu Jun 06 2013 Michal Srb <msrb@redhat.com> - 0:1.3.0-25
5205bc
- Enable tests
5205bc
- Fix BR
5205bc
5205bc
* Thu Feb 14 2013 Rahul Sundaram <sundaram@fedoraproject.org> - 0:1.3.0-24
5205bc
- remove vendor tag from desktop file. https://fedorahosted.org/fpc/ticket/247
5205bc
- clean up spec to follow current guidelines
5205bc
5205bc
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.3.0-23
5205bc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
5205bc
5205bc
* Tue Nov 20 2012 David Tardon <dtardon@redhat.com> - 0:1.3.0-22
5205bc
- Resolves: rhbz#850008 bsh - Should not own /usr/share/maven-fragments
5205bc
  directory
5205bc
- Resolves: rhbz#878163 bsh - javadoc subpackage doesn't require
5205bc
  jpackage-utils
5205bc
- Resolves: rhbz#878166 bsh: Public Domain not listed in license tag
5205bc
5205bc
* Thu Nov  1 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.3.0-21
5205bc
- Add additional maven depmap
5205bc
5205bc
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.3.0-20
5205bc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
5205bc
5205bc
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.3.0-19
5205bc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
5205bc
5205bc
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.3.0-18
5205bc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
5205bc
5205bc
* Thu Nov 25 2010 Ville Skyttä <ville.skytta@iki.fi> - 0:1.3.0-17
5205bc
- Rename -desktop to -utils, move shell scripts and menu entry to it (#417491).
5205bc
- Bring icon cache scriptlets up to date with current guidelines.
5205bc
- Use jline in bsh script for command history support.
5205bc
- Prefer JRE over SDK when finding JVM to invoke in scripts.
5205bc
- Build with -source 1.5.
5205bc
5205bc
* Thu Nov 25 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0:1.3.0-16
5205bc
- Fix pom filenames (Resolves rhbz#655791)
5205bc
- Fix xsl errors when building docs
5205bc
5205bc
* Sat Jan 9 2010 Alexander Kurtakov <akurtako@redhat.com> 0:1.3.0-15.2
5205bc
- Drop gcj_support.
5205bc
- Fix rpmlint warnings.
5205bc
5205bc
* Mon Sep 21 2009 Permaine Cheung <pcheung@redhat.com> 0:1.3.0-15.1
5205bc
- Do not build manual and faq for ppc64 or s390x as the style task is disabled
5205bc
5205bc
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.3.0-15
5205bc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
5205bc
5205bc
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.3.0-14
5205bc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
5205bc
5205bc
* Wed Jul  9 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0:1.3.0-13
5205bc
- drop repotag
5205bc
- fix license tag
5205bc
5205bc
* Mon Mar 10 2008 Permaine Cheung <pcheung@redhat.com> 0:1.3.0-12jpp.3
5205bc
- Fix bugzilla 436675. Separate menu entry into desktop subpackage.
5205bc
5205bc
* Thu Mar 06 2008 Permaine Cheung <pcheung@redhat.com> 0:1.3.0-12jpp.2
5205bc
- Fix bugzilla 417491. Thanks Ville Skytta for the patch.
5205bc
- Add menu entry and startup script for bsh desktop.
5205bc
- Ensure scriptlets exit with zero exit status.
5205bc
5205bc
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0:1.3.0-12jpp.1
5205bc
- Autorebuild for GCC 4.3
5205bc
5205bc
* Mon Jan 21 2008 Permaine Cheung <pcheung@redhat.com> 0:1.3.0-11jpp.1
5205bc
- Merge with upstream
5205bc
5205bc
* Thu Jul 12 2007 Ralph Apel <r.apel at r-apel.de> 0:1.3.0-11jpp
5205bc
- Fix aot build
5205bc
- Add pom and depmap frags
5205bc
- Restore all jars
5205bc
- Add webapps
5205bc
5205bc
* Fri Mar 16 2007 Permaine Cheung <pcheung@redhat.com> 0:1.3.0-10jpp.1
5205bc
- Merge with upstream
5205bc
- Removed unapplied patch and moved buildroot removal from prep to install,
5205bc
  and other rpmlint cleanup
5205bc
5205bc
* Mon Mar 12 2007 Karsten Hopp <karsten@redhat.com> 1.3.0-9jpp.2
5205bc
- add buildrequirement ant-trax for documentation
5205bc
5205bc
* Fri Aug 04 2006 Deepak Bhole <dbhole@redhat.com> 0:1.3.0-9jpp.1
5205bc
- Added missing requirements
5205bc
5205bc
* Sat Jul 22 2006 Jakub Jelinek <jakub@redhat.com> 0:1.3.0-8jpp_3fc
5205bc
- Rebuilt
5205bc
5205bc
* Fri Jul 21 2006 Deepak Bhole <dbhole@redhat.com> 0:1.3.0-8jpp_2fc
5205bc
- Removing vendor and distribution tags.
5205bc
5205bc
* Thu Jul 20 2006 Deepak Bhole <dbhole@redhat.com> 0:1.3.0-8jpp_1fc
5205bc
- Add conditional native compilation.
5205bc
5205bc
* Thu May 04 2006 Ralph Apel <r.apel at r-apel.de> 0:1.3.0-7jpp
5205bc
- First JPP-1.7 release
5205bc
5205bc
* Fri Aug 20 2004 Ralph Apel <r.apel at r-apel.de> 0:1.3.0-6jpp
5205bc
- Build with ant-1.6.2
5205bc
5205bc
* Mon Jan 26 2004 David Walluck <david@anti-microsoft.org> 0:1.3.0-5jpp
5205bc
- really drop readline patch
5205bc
5205bc
* Sun Jan 25 2004 David Walluck <david@anti-microsoft.org> 0:1.3.0-4jpp
5205bc
- drop readline patch
5205bc
5205bc
* Wed Jan 21 2004 David Walluck <david@anti-microsoft.org> 0:1.3.0-3jpp
5205bc
- port libreadline-java patch to new bsh
5205bc
5205bc
* Tue Jan 20 2004 David Walluck <david@anti-microsoft.org> 0:1.3.0-2jpp
5205bc
- add Distribution tag
5205bc
5205bc
* Tue Jan 20 2004 David Walluck <david@anti-microsoft.org> 0:1.3.0-1jpp
5205bc
- 1.3.0
5205bc
- remove bsf patch (fixed upstream)
5205bc
- add epoch to demo package Requires
5205bc
5205bc
* Sat Apr 12 2003 David Walluck <david@anti-microsoft.org> 0:1.2-0.b8.4jpp
5205bc
- fix strange permissions
5205bc
5205bc
* Fri Apr 11 2003 David Walluck <david@anti-microsoft.org> 0:1.2-0.b8.3jpp
5205bc
- rebuild for JPackage 1.5
5205bc
- add bsf patch
5205bc
5205bc
* Sat Feb 01 2003 David Walluck <david@anti-microsoft.org> 1.2-0.b8.2jpp
5205bc
- remove servlet dependency (if anyone wants to add this as a separate
5205bc
  package and do the tomcat integration, be my guest)
5205bc
5205bc
* Thu Jan 23 2003 David Walluck <david@anti-microsoft.org> 1.2-0.b8.1jpp
5205bc
- rename to bsh
5205bc
- add manual
5205bc
- add Changes.html to %%doc
5205bc
- add bsh and bshdoc scripts
5205bc
- add %%dir %%{_datadir}/%%{pkg_name} to main package
5205bc
- correct test interpreter and make bsh files executable
5205bc
5205bc
* Mon Jan 21 2002 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.01-3jpp
5205bc
- really section macro
5205bc
5205bc
* Sun Jan 20 2002 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.01-2jpp
5205bc
- additional sources in individual archives
5205bc
- versioned dir for javadoc
5205bc
- no dependencies for javadoc package
5205bc
- stricter dependency for demo package
5205bc
- section macro
5205bc
5205bc
* Tue Dec 18 2001 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.01-1jpp
5205bc
- first JPackage release