805852
# Copyright (c) 2000-2007, JPackage Project
805852
# All rights reserved.
805852
#
805852
# Redistribution and use in source and binary forms, with or without
805852
# modification, are permitted provided that the following conditions
805852
# are met:
805852
#
805852
# 1. Redistributions of source code must retain the above copyright
805852
#    notice, this list of conditions and the following disclaimer.
805852
# 2. Redistributions in binary form must reproduce the above copyright
805852
#    notice, this list of conditions and the following disclaimer in the
805852
#    documentation and/or other materials provided with the
805852
#    distribution.
805852
# 3. Neither the name of the JPackage Project nor the names of its
805852
#    contributors may be used to endorse or promote products derived
805852
#    from this software without specific prior written permission.
805852
#
805852
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
805852
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
805852
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
805852
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
805852
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
805852
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
805852
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
805852
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
805852
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
805852
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
805852
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
805852
#
805852
805852
Name:           bsh
805852
Version:        1.3.0
805852
Release:        29%{?dist}
805852
Epoch:          0
805852
Summary:        Lightweight Scripting for Java
805852
License:        (SPL or LGPLv2+) and Public Domain
805852
Source0:        %{name}-%{version}-src.tar.bz2
805852
#cvs -d:pserver:anonymous@beanshell.cvs.sourceforge.net:/cvsroot/beanshell login
805852
#cvs -z3 -d:pserver:anonymous@beanshell.cvs.sourceforge.net:/cvsroot/beanshell export -r rel_1_3_0_final BeanShell
805852
#tar cjf bsh-1.3.0-src.tar.bz2 BeanShell
805852
Source1:        bsh-1.3.0.pom
805852
Source2:        bsh-bsf-1.3.0.pom
805852
805852
Patch0:         %{name}-build.patch
805852
Patch1:         %{name}-xsl-fixes.patch
805852
BuildRequires:  java-devel
805852
BuildRequires:  ant, bsf, ImageMagick
805852
BuildRequires:  servlet
805852
Requires:       java
805852
Requires:       bsf
805852
URL:            http://www.beanshell.org/
805852
BuildArch:      noarch
805852
805852
%description
805852
BeanShell is a small, free, embeddable, Java source interpreter with
805852
object scripting language features, written in Java.  BeanShell
805852
executes standard Java statements and expressions, in addition to
805852
obvious scripting commands and syntax.  BeanShell supports scripted
805852
objects as simple method closures like those in Perl and
805852
JavaScript(tm).  You can use BeanShell interactively for Java
805852
experimentation and debugging or as a simple scripting engine for your
805852
applications.  In short: BeanShell is a dynamically interpreted Java,
805852
plus some useful stuff.  Another way to describe it is to say that in
805852
many ways BeanShell is to Java as Tcl/Tk is to C: BeanShell is
805852
embeddable - You can call BeanShell from your Java applications to
805852
execute Java code dynamically at run-time or to provide scripting
805852
extensibility for your applications.  Alternatively, you can call your
805852
Java applications and objects from BeanShell; working with Java
805852
objects and APIs dynamically.  Since BeanShell is written in Java and
805852
runs in the same space as your application, you can freely pass
805852
references to "real live" objects into scripts and return them as
805852
results.
805852
805852
%package manual
805852
Summary:        Manual for %{name}
805852
805852
%description manual
805852
Documentation for %{name}.
805852
805852
%package javadoc
805852
Summary:        API documentation for %{name}
805852
805852
%description javadoc
805852
This package provides %{summary}.
805852
805852
%package demo
805852
Summary:        Demo for %{name}
805852
AutoReqProv:    no
805852
Requires:       %{name} = %{epoch}:%{version}-%{release}
805852
805852
%description demo
805852
Demonstrations and samples for %{name}.
805852
805852
%package utils
805852
Summary:        %{name} utilities
805852
Requires:       %{name} = %{epoch}:%{version}-%{release}
805852
Requires:       jline
805852
805852
%description utils
805852
%{name} utilities.
805852
805852
%prep
805852
%setup -q -n BeanShell
805852
%patch0 -p1
805852
%patch1 -p1
805852
for j in $(find . -name "*.jar"); do
805852
    mv $j $j.no
805852
done
805852
# remove all CVS files
805852
for dir in `find . -type d -name CVS`; do rm -rf $dir; done
805852
for file in `find . -type f -name .cvsignore`; do rm -rf $file; done
805852
# fix rpmlint spurious-executable-perm warnings
805852
for i in backbutton forwardbutton homebutton remoteconsole upbutton; do
805852
    chmod 644 docs/images/$i.gif
805852
done
805852
805852
%build
805852
mkdir -p lib
805852
pushd lib
805852
ln -sf $(build-classpath bsf)
805852
ln -sf $(build-classpath servlet)
805852
popd
805852
ant="ant -Dant.build.javac.source=1.5"
805852
$ant test dist
805852
(cd docs/faq && $ant)
805852
(cd docs/manual && $ant)
805852
805852
%install
805852
# jars
805852
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
805852
for mod in '' bsf classpath commands core reflect util; do
805852
    install -p -m 644 dist/%{name}${mod:+-${mod}}-%{version}.jar \
805852
             $RPM_BUILD_ROOT%{_javadir}/%{name}${mod:+-${mod}}.jar
805852
done
805852
805852
# poms
805852
install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
805852
install -pm 644 %{SOURCE1} \
805852
    $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
805852
install -pm 644 %{SOURCE2} \
805852
    $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}-bsf.pom
805852
805852
%add_maven_depmap JPP-%{name}.pom %{name}.jar -a org.beanshell:%{name}
805852
%add_maven_depmap JPP-%{name}-bsf.pom %{name}-bsf.jar
805852
805852
# manual
805852
find docs -name ".cvswrappers" -exec rm -f {} \;
805852
find docs -name "*.xml" -exec rm -f {} \;
805852
find docs -name "*.xsl" -exec rm -f {} \;
805852
find docs -name "*.log" -exec rm -f {} \;
805852
(cd docs/manual && mv html/* .)
805852
(cd docs/manual && rm -rf html)
805852
(cd docs/manual && rm -rf xsl)
805852
# javadoc
805852
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
805852
cp -pr javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
805852
805852
# demo
805852
for i in `find tests -name \*.bsh`; do
805852
  perl -p -i -e 's,^\n?#!(/(usr/)?bin/java bsh\.Interpreter|/bin/sh),#!/usr/bin/env %{_bindir}/%{name},' $i
805852
  if head -1 $i | grep '#!/usr/bin/env %{_bindir}/%{name}' >/dev/null; then
805852
    chmod 755 $i
805852
  fi
805852
done
805852
chmod 755 tests/Template
805852
cat > one << EOF
805852
#!/bin/sh
805852
805852
EOF
805852
cat tests/Interactive/reload/one >> one
805852
cat one > tests/Interactive/reload/one
805852
rm one
805852
cat > two << EOF
805852
#!/bin/sh
805852
805852
EOF
805852
cat tests/Interactive/reload/two >> two
805852
cat two > tests/Interactive/reload/two
805852
rm two
805852
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name}
805852
cp -pr tests $RPM_BUILD_ROOT%{_datadir}/%{name}
805852
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name}/webapps
805852
install -m 644 dist/bshservlet.war $RPM_BUILD_ROOT%{_datadir}/%{name}/webapps
805852
install -m 644 dist/bshservlet-wbsh.war $RPM_BUILD_ROOT%{_datadir}/%{name}/webapps
805852
805852
# scripts
805852
install -d $RPM_BUILD_ROOT%{_bindir}
805852
805852
%jpackage_script bsh.Interpreter "\${BSH_DEBUG:+-Ddebug=true}" jline.ConsoleRunner %{name}:jline %{name} true
805852
%jpackage_script bsh.Console "\${BSH_DEBUG:+-Ddebug=true}" "" %{name} %{name}-console true
805852
805852
cat > $RPM_BUILD_ROOT%{_bindir}/%{name}doc << EOF
805852
#!/usr/bin/env %{_bindir}/%{name}
805852
EOF
805852
cat scripts/bshdoc.bsh >> $RPM_BUILD_ROOT%{_bindir}/%{name}doc
805852
805852
%post utils
805852
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
805852
805852
%postun utils
805852
if [ $1 -eq 0 ] ; then
805852
    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
805852
    /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
805852
fi
805852
805852
%posttrans utils
805852
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
805852
805852
%files
805852
%doc src/License.txt
805852
%doc src/Changes.html src/README.txt
805852
%{_javadir}/*
805852
%dir %{_datadir}/%{name}
805852
%{_datadir}/%{name}/webapps
805852
%{_mavenpomdir}/*
805852
%{_mavendepmapfragdir}/%{name}
805852
805852
%files manual
805852
%doc src/License.txt
805852
%doc docs/*
805852
805852
%files javadoc
805852
%doc src/License.txt
805852
%{_javadocdir}/%{name}
805852
805852
%files demo
805852
%doc tests/README.txt tests/Interactive/README
805852
%{_datadir}/%{name}/*
805852
805852
%files utils
805852
%attr(0755,root,root) %{_bindir}/%{name}*
805852
805852
%changelog
805852
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 01.3.0-29
805852
- Mass rebuild 2013-12-27
805852
805852
* Thu Oct 24 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.3.0-28
805852
- Remove desktop files
805852
805852
* Fri Jul 12 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.3.0-27
805852
- Use %%add_maven_depmap instead of legacy macros
805852
- Install versionless javadocs
805852
- Remove old Obsoletes
805852
- Update and format descriptions
805852
- Install license file with manual and javadoc packages
805852
- Fix Requires and BuildRequires on java
805852
- Fix calls to %%jpackage_script
805852
805852
* Wed Jul 10 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.3.0-27
805852
- Remove arch-specific conditionals
805852
- Remove group tags
805852
- Remove Requires on jpackage-utils
805852
- Remove Requires on coreutils
805852
- Generate custom scripts with %%jpackage_script
805852
- Install versionless JARs only
805852
- Install POM files to %%{_mavenpomdir}
805852
805852
* Fri Jun 28 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.3.0-26
805852
- Rebuild to regenerate API documentation
805852
- Resolves: CVE-2013-1571
805852
805852
* Thu Jun 06 2013 Michal Srb <msrb@redhat.com> - 0:1.3.0-25
805852
- Enable tests
805852
- Fix BR
805852
805852
* Thu Feb 14 2013 Rahul Sundaram <sundaram@fedoraproject.org> - 0:1.3.0-24
805852
- remove vendor tag from desktop file. https://fedorahosted.org/fpc/ticket/247
805852
- clean up spec to follow current guidelines
805852
805852
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.3.0-23
805852
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
805852
805852
* Tue Nov 20 2012 David Tardon <dtardon@redhat.com> - 0:1.3.0-22
805852
- Resolves: rhbz#850008 bsh - Should not own /usr/share/maven-fragments
805852
  directory
805852
- Resolves: rhbz#878163 bsh - javadoc subpackage doesn't require
805852
  jpackage-utils
805852
- Resolves: rhbz#878166 bsh: Public Domain not listed in license tag
805852
805852
* Thu Nov  1 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.3.0-21
805852
- Add additional maven depmap
805852
805852
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.3.0-20
805852
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
805852
805852
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.3.0-19
805852
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
805852
805852
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.3.0-18
805852
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
805852
805852
* Thu Nov 25 2010 Ville Skyttä <ville.skytta@iki.fi> - 0:1.3.0-17
805852
- Rename -desktop to -utils, move shell scripts and menu entry to it (#417491).
805852
- Bring icon cache scriptlets up to date with current guidelines.
805852
- Use jline in bsh script for command history support.
805852
- Prefer JRE over SDK when finding JVM to invoke in scripts.
805852
- Build with -source 1.5.
805852
805852
* Thu Nov 25 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0:1.3.0-16
805852
- Fix pom filenames (Resolves rhbz#655791)
805852
- Fix xsl errors when building docs
805852
805852
* Sat Jan 9 2010 Alexander Kurtakov <akurtako@redhat.com> 0:1.3.0-15.2
805852
- Drop gcj_support.
805852
- Fix rpmlint warnings.
805852
805852
* Mon Sep 21 2009 Permaine Cheung <pcheung@redhat.com> 0:1.3.0-15.1
805852
- Do not build manual and faq for ppc64 or s390x as the style task is disabled
805852
805852
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.3.0-15
805852
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
805852
805852
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.3.0-14
805852
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
805852
805852
* Wed Jul  9 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0:1.3.0-13
805852
- drop repotag
805852
- fix license tag
805852
805852
* Mon Mar 10 2008 Permaine Cheung <pcheung@redhat.com> 0:1.3.0-12jpp.3
805852
- Fix bugzilla 436675. Separate menu entry into desktop subpackage.
805852
805852
* Thu Mar 06 2008 Permaine Cheung <pcheung@redhat.com> 0:1.3.0-12jpp.2
805852
- Fix bugzilla 417491. Thanks Ville Skytta for the patch.
805852
- Add menu entry and startup script for bsh desktop.
805852
- Ensure scriptlets exit with zero exit status.
805852
805852
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0:1.3.0-12jpp.1
805852
- Autorebuild for GCC 4.3
805852
805852
* Mon Jan 21 2008 Permaine Cheung <pcheung@redhat.com> 0:1.3.0-11jpp.1
805852
- Merge with upstream
805852
805852
* Thu Jul 12 2007 Ralph Apel <r.apel at r-apel.de> 0:1.3.0-11jpp
805852
- Fix aot build
805852
- Add pom and depmap frags
805852
- Restore all jars
805852
- Add webapps
805852
805852
* Fri Mar 16 2007 Permaine Cheung <pcheung@redhat.com> 0:1.3.0-10jpp.1
805852
- Merge with upstream
805852
- Removed unapplied patch and moved buildroot removal from prep to install,
805852
  and other rpmlint cleanup
805852
805852
* Mon Mar 12 2007 Karsten Hopp <karsten@redhat.com> 1.3.0-9jpp.2
805852
- add buildrequirement ant-trax for documentation
805852
805852
* Fri Aug 04 2006 Deepak Bhole <dbhole@redhat.com> 0:1.3.0-9jpp.1
805852
- Added missing requirements
805852
805852
* Sat Jul 22 2006 Jakub Jelinek <jakub@redhat.com> 0:1.3.0-8jpp_3fc
805852
- Rebuilt
805852
805852
* Fri Jul 21 2006 Deepak Bhole <dbhole@redhat.com> 0:1.3.0-8jpp_2fc
805852
- Removing vendor and distribution tags.
805852
805852
* Thu Jul 20 2006 Deepak Bhole <dbhole@redhat.com> 0:1.3.0-8jpp_1fc
805852
- Add conditional native compilation.
805852
805852
* Thu May 04 2006 Ralph Apel <r.apel at r-apel.de> 0:1.3.0-7jpp
805852
- First JPP-1.7 release
805852
805852
* Fri Aug 20 2004 Ralph Apel <r.apel at r-apel.de> 0:1.3.0-6jpp
805852
- Build with ant-1.6.2
805852
805852
* Mon Jan 26 2004 David Walluck <david@anti-microsoft.org> 0:1.3.0-5jpp
805852
- really drop readline patch
805852
805852
* Sun Jan 25 2004 David Walluck <david@anti-microsoft.org> 0:1.3.0-4jpp
805852
- drop readline patch
805852
805852
* Wed Jan 21 2004 David Walluck <david@anti-microsoft.org> 0:1.3.0-3jpp
805852
- port libreadline-java patch to new bsh
805852
805852
* Tue Jan 20 2004 David Walluck <david@anti-microsoft.org> 0:1.3.0-2jpp
805852
- add Distribution tag
805852
805852
* Tue Jan 20 2004 David Walluck <david@anti-microsoft.org> 0:1.3.0-1jpp
805852
- 1.3.0
805852
- remove bsf patch (fixed upstream)
805852
- add epoch to demo package Requires
805852
805852
* Fri Apr 12 2003 David Walluck <david@anti-microsoft.org> 0:1.2-0.b8.4jpp
805852
- fix strange permissions
805852
805852
* Fri Apr 11 2003 David Walluck <david@anti-microsoft.org> 0:1.2-0.b8.3jpp
805852
- rebuild for JPackage 1.5
805852
- add bsf patch
805852
805852
* Sat Feb 01 2003 David Walluck <david@anti-microsoft.org> 1.2-0.b8.2jpp
805852
- remove servlet dependency (if anyone wants to add this as a separate
805852
  package and do the tomcat integration, be my guest)
805852
805852
* Thu Jan 23 2003 David Walluck <david@anti-microsoft.org> 1.2-0.b8.1jpp
805852
- rename to bsh
805852
- add manual
805852
- add Changes.html to %%doc
805852
- add bsh and bshdoc scripts
805852
- add %%dir %%{_datadir}/%%{name} to main package
805852
- correct test interpreter and make bsh files executable
805852
805852
* Mon Jan 21 2002 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.01-3jpp
805852
- really section macro
805852
805852
* Sun Jan 20 2002 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.01-2jpp
805852
- additional sources in individual archives
805852
- versioned dir for javadoc
805852
- no dependencies for javadoc package
805852
- stricter dependency for demo package
805852
- section macro
805852
805852
* Tue Dec 18 2001 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.01-1jpp
805852
- first JPackage release