Blame SPECS/bsh.spec

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