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