packages java-jsr223-scripting-engines.spec
      Pages: < 1 >  DOWNLOAD      
%define with_beanshell_engine   1
%define with_jruby_engine       1
%define with_judo_engine        0
Name:          java-jsr223-scripting-engines
Version:       1.0
Release:       2mamba
Summary:       Scripting Engines Implementations
Group:         Development/Libraries/Java
Vendor:        openmamba
Distribution:  openmamba
Packager:      gil <puntogil@...>
URL:           https://scripting.dev.java.net/
# cvs -d :pserver:GUEST@...:/cvs login
# cvs -d :pserver:GUEST@...:/cvs export -r HEAD scripting/engines
Source:        jsr223-scripting-engines-%{version}-src-cvs.tar.gz
Patch0:        java-jsr223-scripting-engines-beanshell-build.patch
Patch1:        java-jsr223-scripting-engines-judo-build.patch
Patch2:        java-jsr223-scripting-engines-jruby-build.patch
License:       BSD
BuildRequires: apache-ant
BuildRequires: apache-velocity
BuildRequires: aqute-bnd
BuildRequires: jakarta-commons-beanutils
BuildRequires: jakarta-commons-cli
BuildRequires: jakarta-commons-collections
BuildRequires: jakarta-commons-discovery
BuildRequires: jakarta-commons-jelly
BuildRequires: jakarta-commons-jelly-tags-bean
BuildRequires: jakarta-commons-jelly-tags-define
BuildRequires: jakarta-commons-jelly-tags-dynabean
BuildRequires: jakarta-commons-jelly-tags-fmt
BuildRequires: jakarta-commons-jelly-tags-interaction
BuildRequires: jakarta-commons-jelly-tags-junit
BuildRequires: jakarta-commons-jelly-tags-log
BuildRequires: jakarta-commons-jelly-tags-swing
BuildRequires: jakarta-commons-jelly-tags-util
BuildRequires: jakarta-commons-jelly-tags-xml
BuildRequires: jakarta-commons-jexl
BuildRequires: jakarta-commons-lang
BuildRequires: jakarta-commons-logging
BuildRequires: jakarta-taglibs-standard
BuildRequires: java-dom4j
BuildRequires: java-forehead
BuildRequires: java-freemarker
BuildRequires: java-groovy
BuildRequires: java-jacl
BuildRequires: java-jaskell
BuildRequires: java-jfunutil
BuildRequires: java-jparsec
BuildRequires: java-rhino
BuildRequires: java-jawk
BuildRequires: java-jama
BuildRequires: java-jaxen
BuildRequires: java-jep
BuildRequires: java-livetribe-jsr223
BuildRequires: java-ognl
BuildRequires: java-pnuts
BuildRequires: java-servletapi4
BuildRequires: java-sisc
BuildRequires: java-juel
BuildRequires: java-junit3
BuildRequires: jpackage-utils
BuildRequires: jython
BuildRequires: sun-java-runtime
BuildRequires: xerces-j2
BuildRequires: xml-commons-apis
Requires:      aqute-bnd
BuildRoot:     %{_tmppath}/%{name}-%{version}-root

%description
The Scripting Framework also supports third-party Script
Engines that implement the JSR 223 Scripting APIs. The
primary purpose of this project is to provide ScriptEngine
implementations that developers can use in their Java
Applications. Developers can also use the Script Engines
as examples of how to implement the Scripting APIs using
their own Java-based Scripting implementations.

%if %with_beanshell_engine
%package bsh
Summary:       Beanshell Engine for %{name}
Group:         Development/Libraries/Java
BuildRequires: java-bsh2b5
Requires:      %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires:      java-bsh2b5
Requires:      java-livetribe-jsr223

%description bsh
Scripting Engines Implementations.
%endif

%package browserjs
Summary:       Browser Javascript Engine for %{name}
Group:         Development/Libraries/Java
Requires:      %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires:      java-livetribe-jsr223
Requires:      sun-java-runtime

%description browserjs
Scripting Engines Implementations.

%package freemarker
Summary:       Freemarker Engine for %{name}
Group:         Development/Libraries/Java
Requires:      %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires:      java-freemarker
Requires:      java-livetribe-jsr223

%description freemarker
Scripting Engines Implementations.

%package groovy
Group:         Development/Libraries/Java
Summary:       Groovy Engine for %{name}
Requires:      %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires:      java-groovy
Requires:      java-livetribe-jsr223

%description groovy
Scripting Engines Implementations.

%package jacl
Group:         Development/Libraries/Java
Summary:       Jacl Engine for %{name}
Requires:      %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires:      java-jacl
Requires:      java-livetribe-jsr223

%description jacl
Scripting Engines Implementations.

%package jaskell
Group:         Development/Libraries/Java
Summary:       Jaskell Engine for %{name}
Requires:      %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires:      java-jaskell
Requires:      java-livetribe-jsr223

%description jaskell
Scripting Engines Implementations.

%package java
Group:         Development/Libraries/Java
Summary:       Java Engine for %{name}
Requires:      %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires:      java-livetribe-jsr223

%description java
Scripting Engines Implementations.

%package js
Group:         Development/Libraries/Java
Summary:       Javascript Engine for %{name}
Requires:      %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires:      java-rhino16
Requires:      java-livetribe-jsr223

%description js
Scripting Engines Implementations.

%package jawk
Group:         Development/Libraries/Java
Summary:       Jawk Engine for %{name}
Requires:      %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires:      java-jawk
Requires:      java-livetribe-jsr223

%description jawk
Scripting Engines Implementations.

%package jelly
Group:         Development/Libraries/Java
Summary:       Jelly Engine for %{name}
Requires:      %{name} = %{?epoch:%epoch:}%{version}-%{release}
# 1.6
Requires:      jakarta-commons-beanutils
Requires:      jakarta-commons-cli
Requires:      jakarta-commons-collections
Requires:      jakarta-commons-discovery
Requires:      jakarta-commons-jelly
Requires:      jakarta-commons-jelly-tags-bean
Requires:      jakarta-commons-jelly-tags-define
Requires:      jakarta-commons-jelly-tags-dynabean
Requires:      jakarta-commons-jelly-tags-fmt
Requires:      jakarta-commons-jelly-tags-interaction
Requires:      jakarta-commons-jelly-tags-junit
Requires:      jakarta-commons-jelly-tags-log
Requires:      jakarta-commons-jelly-tags-swing
Requires:      jakarta-commons-jelly-tags-util
Requires:      jakarta-commons-jelly-tags-xml
Requires:      jakarta-commons-jexl
Requires:      jakarta-commons-lang
Requires:      jakarta-commons-logging
Requires:      jakarta-taglibs-standard
Requires:      java-dom4j
Requires:      java-forehead
Requires:      java-jaxen
Requires:      java-livetribe-jsr223
Requires:      java-servletapi4
Requires:      xerces-j2
Requires:      xml-commons-apis

%description jelly
Scripting Engines Implementations.

%package jep
Group:         Development/Libraries/Java
Summary:       JEP Engine for %{name}
Requires:      %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires:      java-jep
Requires:      java-livetribe-jsr223

%description jep
Scripting Engines Implementations.

%package jexl
Group:         Development/Libraries/Java
Summary:       Jexl Engine for %{name}
Requires:      %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires:      jakarta-commons-jexl
Requires:      jakarta-commons-logging
Requires:      java-livetribe-jsr223

%description jexl
Scripting Engines Implementations.

%if %with_jruby_engine
%package jruby
Group:         Development/Libraries/Java
Summary:       JRuby Engine for %{name}
BuildRequires: java-backport-util-concurrent
BuildRequires: java-bytelist
BuildRequires: java-ruby
BuildRequires: objectweb-asm2
Requires:      %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires:      java-backport-util-concurrent
Requires:      java-bytelist
Requires:      java-livetribe-jsr223
Requires:      java-ruby
Requires:      objectweb-asm2

%description jruby
Scripting Engines Implementations.
%endif

%if %with_judo_engine
%package judo
Group:         Development/Libraries/Java
Summary:       Judoscript Engine for %{name}
BuildRequires: judoscript
Requires:      %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires:      java-livetribe-jsr223
Requires:      judoscript

%description judo
Scripting Engines Implementations.
%endif

%package juel
Group:         Development/Libraries/Java
Summary:       Juel Engine for %{name}
Requires:      %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires:      java-juel
Requires:      java-livetribe-jsr223

%description juel
Scripting Engines Implementations.

%package jython
Group:         Development/Libraries/Java
Summary:       Jython Engine for %{name}
Requires:      %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires:      java-livetribe-jsr223
Requires:      jython

%description jython
Scripting Engines Implementations.

%package ognl
Group:         Development/Libraries/Java
Summary:       OGNL Engine for %{name}
Requires:      %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires:      java-ognl
Requires:      java-livetribe-jsr223

%description ognl
Scripting Engines Implementations.

%package pnuts
Group:         Development/Libraries/Java
Summary:       Pnuts Engine for %{name}
Requires:      %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires:      java-livetribe-jsr223
Requires:      java-pnuts

%description pnuts
Scripting Engines Implementations.

%package scheme
Group:         Development/Libraries/Java
Summary:       Scheme Engine for %{name}
Requires:      %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires:      java-livetribe-jsr223
Requires:      java-sisc

%description scheme
Scripting Engines Implementations.

%package velocity
Group:         Development/Libraries/Java
Summary:       Velocity Engine for %{name}
Requires:      %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires:      apache-velocity
Requires:      java-livetribe-jsr223


%description velocity
Scripting Engines Implementations.

%package xpath
Group:         Development/Libraries/Java
Summary:       XPath Engine for %{name}
Requires:      %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires:      java-livetribe-jsr223

%description xpath
Scripting Engines Implementations.

%package xslt
Group:         Development/Libraries/Java
Summary:       XSLT Engine for %{name}
Requires:      %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires:      java-livetribe-jsr223

%description xslt
Scripting Engines Implementations.

%package javadoc
Group:          Documentation
Summary:        Javadoc for %{name}

%description javadoc
Scripting Engines Implementations.


%prep
%setup -q -n scripting

for j in $(find . -name "*.jar"); do
  mv $j $j.no
done

pushd engines
#        mv ./engines/bnd-0.0.249.jar ./engines/bnd-0.0.249.jar.no
  ln -sf $(build-classpath aqute_bnd) bnd-0.0.249.jar
  pushd scheme/lib
#        mv ./engines/scheme/lib/sisc.jar ./engines/scheme/lib/sisc.jar
    ln -sf $(build-classpath sisc) sisc.jar
#        mv ./engines/scheme/lib/sisc-lib.jar ./engines/scheme/lib/sisc-lib.jar
    ln -sf $(build-classpath sisc-lib) sisc-lib.jar
#        mv ./engines/scheme/lib/sisc-opt.jar ./engines/scheme/lib/sisc-opt.jar
    ln -sf $(build-classpath sisc-opt) sisc-opt.jar
  popd
  pushd groovy/lib
#        mv ./engines/groovy/lib/groovy-all-1.5.6.jar ./engines/groovy/lib/groovy-all-1.5.6.jar.no
    ln -sf $(build-classpath groovy-all) groovy-all-1.5.6.jar
  popd
  pushd javascript/lib
#        mv ./engines/javascript/lib/js.jar ./engines/javascript/lib/js.jar.no
    ln -sf $(build-classpath rhino16) js.jar
  popd
%if %with_beanshell_engine
  pushd beanshell/lib
#        mv ./engines/beanshell/lib/bsh-2.0b5.jar ./engines/beanshell/lib/bsh-2.0b5.jar.no
    ln -sf $(build-classpath bsh2b5/bsh) bsh-2.0b5.jar
  popd
%else
%patch0
%endif
  pushd jexl/lib
#        mv ./engines/jexl/lib/commons-jexl-1.0.jar ./engines/jexl/lib/commons-jexl-1.0.jar.no
    ln -sf $(build-classpath commons-jexl) commons-jexl-1.0.jar
#        mv ./engines/jexl/lib/commons-logging-1.0.3.jar ./engines/jexl/lib/commons-logging-1.0.3.jar.no
    ln -sf $(build-classpath commons-logging) commons-logging-1.0.3.jar
  popd
  pushd jep/lib
#        mv ./engines/jep/lib/Jama-1.0.2.jar ./engines/jep/lib/Jama-1.0.2.jar.no
    ln -sf $(build-classpath jama) Jama-1.0.2.jar
#        mv ./engines/jep/lib/ext-1.1.0.jar ./engines/jep/lib/ext-1.1.0.jar.no
    ln -sf $(build-classpath jep-ext) ext-1.1.0.jar
#        mv ./engines/jep/lib/jep-2.4.0.jar ./engines/jep/lib/jep-2.4.0.jar.no
    ln -sf $(build-classpath jep) jep-2.4.0.jar
  popd
  pushd jython/lib
#        mv ./engines/jython/lib/jython.jar ./engines/jython/lib/jython.jar.no
    ln -sf $(build-classpath jython) jython.jar
  popd
  pushd jacl/lib
#        mv ./engines/jacl/lib/tcljava.jar ./engines/jacl/lib/tcljava.jar.no
    ln -sf $(build-classpath jacl/tcljava) tcljava.jar
#        mv ./engines/jacl/lib/jacl.jar ./engines/jacl/lib/jacl.jar.no
    ln -sf $(build-classpath jacl/jacl) jacl.jar
  popd
  pushd jawk/lib
#        mv ./engines/jawk/lib/jawk.0_14.jar ./engines/jawk/lib/jawk.0_14.jar.no
    ln -sf $(build-classpath jawk) jawk.0_14.jar
#        mv ./engines/jawk/lib/jawk_ex.0_14.jar ./engines/jawk/lib/jawk_ex.0_14.jar.no
    ln -sf $(build-classpath jawk-jrt) jawk_ex.0_14.jar
  popd
  pushd freemarker/lib
#        mv ./engines/freemarker/lib/freemarker.jar ./engines/freemarker/lib/freemarker.jar.no
    ln -sf $(build-classpath freemarker) freemarker.jar
  popd
  pushd ognl/lib
#        mv ./engines/ognl/lib/ognl-2.6.9.jar ./engines/ognl/lib/ognl-2.6.9.jar.no
    ln -sf $(build-classpath ognl) ognl-2.6.9.jar
  popd
  pushd velocity/lib
#        mv ./engines/velocity/lib/velocity-dep-1.5.jar ./engines/velocity/lib/velocity-dep-1.5.jar.no
    ln -sf $(build-classpath apache-velocity-dep) velocity-dep-1.5.jar
  popd
  pushd juel/lib
#        mv ./engines/juel/lib/juel-2.1.0-rc2.jar ./engines/juel/lib/juel-2.1.0-rc2.jar.no
    ln -sf $(build-classpath juel) juel-2.1.0-rc2.jar
  popd
  pushd pnuts/lib
#        mv ./engines/pnuts/lib/pnuts.jar ./engines/pnuts/lib/pnuts.jar.no
    ln -sf $(build-classpath pnuts) pnuts.jar
#        mv ./engines/pnuts/lib/pnuts-modules.jar ./engines/pnuts/lib/pnuts-modules.jar.no
    ln -sf $(build-classpath pnuts-modules) pnuts-modules.jar
  popd
  pushd jelly/lib
#        mv ./engines/jelly/lib/dom4j-1.5.2.jar ./engines/jelly/lib/dom4j-1.5.2.jar.no
    ln -sf $(build-classpath dom4j) dom4j-1.5.2.jar
#        mv ./engines/jelly/lib/commons-cli-1.0.jar ./engines/jelly/lib/commons-cli-1.0.jar.no
    ln -sf $(build-classpath commons-cli) commons-cli-1.0.jar
#        mv ./engines/jelly/lib/xml-apis-1.0.b2.jar ./engines/jelly/lib/xml-apis-1.0.b2.jar.no
#    ln -sf $(build-classpath xml-commons-jaxp-1.1-apis) xml-apis-1.0.b2.jar
    ln -sf $(build-classpath xml-commons-apis) xml-apis-1.0.b2.jar
#        mv ./engines/jelly/lib/servletapi-2.3.jar ./engines/jelly/lib/servletapi-2.3.jar.no
    ln -sf $(build-classpath servletapi4) servletapi-2.3.jar
#        mv ./engines/jelly/lib/commons-jexl-1.0.jar ./engines/jelly/lib/commons-jexl-1.0.jar.no
    ln -sf $(build-classpath commons-jexl) commons-jexl-1.0.jar
#        mv ./engines/jelly/lib/jaxen-1.1-beta-4.jar ./engines/jelly/lib/jaxen-1.1-beta-4.jar.no
    ln -sf $(build-classpath jaxen) jaxen-1.1-beta-4.jar
#        mv ./engines/jelly/lib/commons-lang-2.0.jar ./engines/jelly/lib/commons-lang-2.0.jar.no
    ln -sf $(build-classpath commons-lang) commons-lang-2.0.jar
#        mv ./engines/jelly/lib/commons-discovery-20030211.213356.jar ./engines/jelly/lib/commons-discovery-20030211.213356.jar.no
    ln -sf $(build-classpath commons-discovery) commons-discovery-20030211.213356.jar
#        mv ./engines/jelly/lib/commons-logging-1.0.3.jar ./engines/jelly/lib/commons-logging-1.0.3.jar.no
    ln -sf $(build-classpath commons-logging) commons-logging-1.0.3.jar
#        mv ./engines/jelly/lib/junit-3.8.1.jar ./engines/jelly/lib/junit-3.8.1.jar.no
    ln -sf $(build-classpath junit-3.8.2) junit-3.8.1.jar
#        mv ./engines/jelly/lib/commons-collections-2.1.jar ./engines/jelly/lib/commons-collections-2.1.jar.no
    ln -sf $(build-classpath commons-collections) commons-collections-2.1.jar
#        mv ./engines/jelly/lib/commons-beanutils-1.6.jar ./engines/jelly/lib/commons-beanutils-1.6.jar.no
    ln -sf $(build-classpath commons-beanutils) commons-beanutils-1.6.jar
#        mv ./engines/jelly/lib/forehead-1.0-beta-5.jar ./engines/jelly/lib/forehead-1.0-beta-5.jar.no
    ln -sf $(build-classpath forehead) forehead-1.0-beta-5.jar
#        mv ./engines/jelly/lib/xerces-2.2.1.jar ./engines/jelly/lib/xerces-2.2.1.jar.no
    ln -sf $(build-classpath xerces-j2) xerces-2.2.1.jar
#        mv ./engines/jelly/lib/jstl-1.0.6.jar ./engines/jelly/lib/jstl-1.0.6.jar.no
    ln -sf $(build-classpath taglibs-core) jstl-1.0.6.jar
#        mv ./engines/jelly/lib/commons-jelly-1.0.jar ./engines/jelly/lib/commons-jelly-1.0.jar.no
    ln -sf $(build-classpath commons-jelly) commons-jelly-1.0.jar
#        mv ./engines/jelly/lib/commons-jelly-tags-dynabean-1.0.jar ./engines/jelly/lib/commons-jelly-tags-dynabean-1.0.jar.no
    ln -sf $(build-classpath jelly-tags/commons-jelly-tags-dynabean) commons-jelly-tags-dynabean-1.0.jar
#        mv ./engines/jelly/lib/commons-jelly-tags-xml-1.1.jar ./engines/jelly/lib/commons-jelly-tags-xml-1.1.jar.no
    ln -sf $(build-classpath jelly-tags/commons-jelly-tags-xml) commons-jelly-tags-xml-1.1.jar
#        mv ./engines/jelly/lib/commons-jelly-tags-define-1.0.jar ./engines/jelly/lib/commons-jelly-tags-define-1.0.jar.no
    ln -sf $(build-classpath jelly-tags/commons-jelly-tags-define) commons-jelly-tags-define-1.0.jar
#        mv ./engines/jelly/lib/commons-jelly-tags-util-1.1.1.jar ./engines/jelly/lib/commons-jelly-tags-util-1.1.1.jar.no
    ln -sf $(build-classpath jelly-tags/commons-jelly-tags-util) commons-jelly-tags-util-1.1.1.jar
#        mv ./engines/jelly/lib/commons-jelly-tags-interaction-1.0.jar ./engines/jelly/lib/commons-jelly-tags-interaction-1.0.jar.no
    ln -sf $(build-classpath jelly-tags/commons-jelly-tags-interaction) commons-jelly-tags-interaction-1.0.jar
#        mv ./engines/jelly/lib/commons-jelly-tags-junit-1.0.jar ./engines/jelly/lib/commons-jelly-tags-junit-1.0.jar.no
    ln -sf $(build-classpath jelly-tags/commons-jelly-tags-junit) commons-jelly-tags-junit-1.0.jar
#        mv ./engines/jelly/lib/commons-jelly-tags-bean-1.0.jar ./engines/jelly/lib/commons-jelly-tags-bean-1.0.jar.no
    ln -sf $(build-classpath jelly-tags/commons-jelly-tags-bean) commons-jelly-tags-bean-1.0.jar
#        mv ./engines/jelly/lib/commons-jelly-tags-log-1.0.jar ./engines/jelly/lib/commons-jelly-tags-log-1.0.jar.no
    ln -sf $(build-classpath jelly-tags/commons-jelly-tags-log) commons-jelly-tags-log-1.0.jar
#        mv ./engines/jelly/lib/commons-jelly-tags-fmt-1.0.jar ./engines/jelly/lib/commons-jelly-tags-fmt-1.0.jar.no
    ln -sf $(build-classpath jelly-tags/commons-jelly-tags-fmt) commons-jelly-tags-fmt-1.0.jar
#        mv ./engines/jelly/lib/commons-jelly-tags-swing-1.0.jar ./engines/jelly/lib/commons-jelly-tags-swing-1.0.jar.no
    ln -sf $(build-classpath jelly-tags/commons-jelly-tags-swing) commons-jelly-tags-swing-1.0.jar
  popd
  pushd jaskell/lib
#        mv ./engines/jaskell/lib/jaskell-1.0.jar ./engines/jaskell/lib/jaskell-1.0.jar.no
    ln -sf $(build-classpath jaskell) jaskell-1.0.jar
#        mv ./engines/jaskell/lib/jparsec.jar ./engines/jaskell/lib/jparsec.jar.no
    ln -sf $(build-classpath jparsec) jparsec.jar
#        mv ./engines/jaskell/lib/jfunutil.jar ./engines/jaskell/lib/jfunutil.jar.no
    ln -sf $(build-classpath jfunutil) jfunutil.jar
  popd
%if %with_judo_engine
  pushd judo/lib
# TODO
#        mv ./engines/judo/lib/judo.jar ./engines/judo/lib/judo.jar.no
  popd
%else
%patch1
%endif
%if %with_jruby_engine
  pushd jruby/lib
#        mv ./engines/jruby/lib/backport-util-concurrent.jar ./engines/jruby/lib/backport-util-concurrent.jar.no
    ln -sf $(build-classpath backport-util-concurrent) backport-util-concurrent.jar
#        mv ./engines/jruby/lib/asm-2.2.3.jar ./engines/jruby/lib/asm-2.2.3.jar.no
    ln -sf $(build-classpath asm2/asm2) asm-2.2.3.jar
#        mv ./engines/jruby/lib/jruby.jar ./engines/jruby/lib/jruby.jar.no
    ln -sf $(build-classpath jruby) jruby.jar
    ln -sf $(build-classpath jruby) bytelist.jar
  popd

%else
%patch3
%endif
popd

%build

cd engines
ant -Djsr223.jar=$(build-classpath livetribe-jsr223 bytelist)

%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
cd engines

mkdir -p %{buildroot}%{_javadir}/scripting-engines
%if %with_beanshell_engine
install -m 644 beanshell/build/bsh-engine.jar \
 %{buildroot}%{_javadir}/scripting-engines/bsh-engine-%{version}.jar
%add_to_maven_depmap javax.script bsh-engine %{version} JPP/scripting-engines bsh-engine
%endif
install -m 644 browserjs/build/browserjs-engine.jar \
 %{buildroot}%{_javadir}/scripting-engines/browserjs-engine-%{version}.jar
%add_to_maven_depmap javax.script browserjs-engine %{version} JPP/scripting-engines browserjs-engine
install -m 644 freemarker/build/freemarker-engine.jar \
 %{buildroot}%{_javadir}/scripting-engines/freemarker-engine-%{version}.jar
%add_to_maven_depmap javax.script freemarker-engine %{version} JPP/scripting-engines freemarker-engine
install -m 644 groovy/build/groovy-engine.jar \
 %{buildroot}%{_javadir}/scripting-engines/groovy-engine-%{version}.jar
%add_to_maven_depmap javax.script groovy-engine %{version} JPP/scripting-engines groovy-engine
install -m 644 jacl/build/jacl-engine.jar \
 %{buildroot}%{_javadir}/scripting-engines/jacl-engine-%{version}.jar
%add_to_maven_depmap javax.script jacl-engine %{version} JPP/scripting-engines jacl-engine
install -m 644 jaskell/build/jaskell-engine.jar \
 %{buildroot}%{_javadir}/scripting-engines/jaskell-engine-%{version}.jar
%add_to_maven_depmap javax.script jaskell-engine %{version} JPP/scripting-engines jaskell-engine
install -m 644 java/build/java-engine.jar \
 %{buildroot}%{_javadir}/scripting-engines/java-engine-%{version}.jar
%add_to_maven_depmap javax.script java-engine %{version} JPP/scripting-engines java-engine
install -m 644 javascript/build/js-engine.jar \
 %{buildroot}%{_javadir}/scripting-engines/js-engine-%{version}.jar
%add_to_maven_depmap javax.script js-engine %{version} JPP/scripting-engines js-engine
install -m 644 jawk/build/jawk-engine.jar \
 %{buildroot}%{_javadir}/scripting-engines/jawk-engine-%{version}.jar
%add_to_maven_depmap javax.script jawk-engine %{version} JPP/scripting-engines jawk-engine
install -m 644 jelly/build/jelly-engine.jar \
 %{buildroot}%{_javadir}/scripting-engines/jelly-engine-%{version}.jar
%add_to_maven_depmap javax.script jelly-engine %{version} JPP/scripting-engines jelly-engine
install -m 644 jep/build/jep-engine.jar \
 %{buildroot}%{_javadir}/scripting-engines/jep-engine-%{version}.jar
%add_to_maven_depmap javax.script jep-engine %{version} JPP/scripting-engines jep-engine
install -m 644 jexl/build/jexl-engine.jar \
 %{buildroot}%{_javadir}/scripting-engines/jexl-engine-%{version}.jar
%add_to_maven_depmap javax.script jexl-engine %{version} JPP/scripting-engines jexl-engine
%if %with_jruby_engine
install -m 644 jruby/build/jruby-engine.jar \
 %{buildroot}%{_javadir}/scripting-engines/jruby-engine-%{version}.jar
%add_to_maven_depmap javax.script jruby-engine %{version} JPP/scripting-engines jruby-engine
%endif
%if %with_judo_engine
install -m 644 judo/build/judo-engine.jar \
 %{buildroot}%{_javadir}/scripting-engines/judo-engine-%{version}.jar
%add_to_maven_depmap javax.script judo-engine %{version} JPP/scripting-engines judo-engine
%endif
install -m 644 juel/build/juel-engine.jar \
 %{buildroot}%{_javadir}/scripting-engines/juel-engine-%{version}.jar
%add_to_maven_depmap javax.script juel-engine %{version} JPP/scripting-engines juel-engine
install -m 644 jython/build/jython-engine.jar \
 %{buildroot}%{_javadir}/scripting-engines/jython-engine-%{version}.jar
%add_to_maven_depmap javax.script jython-engine %{version} JPP/scripting-engines jython-engine
install -m 644 ognl/build/ognl-engine.jar \
 %{buildroot}%{_javadir}/scripting-engines/ognl-engine-%{version}.jar
%add_to_maven_depmap javax.script ognl-engine %{version} JPP/scripting-engines ognl-engine
install -m 644 pnuts/build/pnuts-jsr223.jar \
 %{buildroot}%{_javadir}/scripting-engines/pnuts-jsr223-%{version}.jar
%add_to_maven_depmap javax.script pnuts-jsr223 %{version} JPP/scripting-engines pnuts-jsr223
install -m 644 scheme/build/scheme-engine.jar \
 %{buildroot}%{_javadir}/scripting-engines/scheme-engine-%{version}.jar
%add_to_maven_depmap javax.script scheme-engine %{version} JPP/scripting-engines scheme-engine
install -m 644 velocity/build/velocity-engine.jar \
 %{buildroot}%{_javadir}/scripting-engines/velocity-engine-%{version}.jar
%add_to_maven_depmap javax.script velocity-engine %{version} JPP/scripting-engines velocity-engine
install -m 644 xpath/build/xpath-engine.jar \
 %{buildroot}%{_javadir}/scripting-engines/xpath-engine-%{version}.jar
%add_to_maven_depmap javax.script xpath-engine %{version} JPP/scripting-engines xpath-engine
install -m 644 xslt/build/xslt-engine.jar \
 %{buildroot}%{_javadir}/scripting-engines/xslt-engine-%{version}.jar
%add_to_maven_depmap javax.script xslt-engine %{version} JPP/scripting-engines xslt-engine

(
	cd %{buildroot}%{_javadir}/scripting-engines
	for jar in *-%{version}*; do
		ln -sf ${jar} `echo $jar| sed  "s|-%{version}||g"`
	done
)

%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

%files
%defattr(-,root,root)
%{_mavendepmapfragdir}/*
%dir %{_javadir}/scripting-engines

%if %with_beanshell_engine
%files bsh
%defattr(-,root,root)
%{_javadir}/scripting-engines/bsh-engine*.jar
%endif

%files browserjs
%defattr(-,root,root)
%{_javadir}/scripting-engines/browserjs-engine*.jar

%files freemarker
%defattr(-,root,root)
%{_javadir}/scripting-engines/freemarker-engine*.jar

%files groovy
%defattr(-,root,root)
%{_javadir}/scripting-engines/groovy-engine*.jar

%files jacl
%defattr(-,root,root)
%{_javadir}/scripting-engines/jacl-engine*.jar

%files jaskell
%defattr(-,root,root)
%{_javadir}/scripting-engines/jaskell-engine*.jar

%files java
%defattr(-,root,root)
%{_javadir}/scripting-engines/java-engine*.jar

%files js
%defattr(-,root,root)
%{_javadir}/scripting-engines/js-engine*.jar

%files jawk
%defattr(-,root,root)
%{_javadir}/scripting-engines/jawk-engine*.jar

%files jelly
%defattr(-,root,root)
%{_javadir}/scripting-engines/jelly-engine*.jar

%files jep
%defattr(-,root,root)
%{_javadir}/scripting-engines/jep-engine*.jar

%files jexl
%defattr(-,root,root)
%{_javadir}/scripting-engines/jexl-engine*.jar

%if %with_jruby_engine
%files jruby
%defattr(-,root,root)
%{_javadir}/scripting-engines/jruby-engine*.jar
%endif

%if %with_judo_engine
%files judo
%defattr(-,root,root)
%{_javadir}/scripting-engines/judo-engine*.jar
%endif

%files juel
%defattr(-,root,root)
%{_javadir}/scripting-engines/juel-engine*.jar

%files jython
%defattr(-,root,root)
%{_javadir}/scripting-engines/jython-engine*.jar

%files ognl
%defattr(-,root,root)
%{_javadir}/scripting-engines/ognl-engine*.jar

%files pnuts
%defattr(-,root,root)
%{_javadir}/scripting-engines/pnuts-jsr223*.jar

%files scheme
%defattr(-,root,root)
%{_javadir}/scripting-engines/scheme-engine*.jar

%files velocity
%defattr(-,root,root)
%{_javadir}/scripting-engines/velocity-engine*.jar

%files xpath
%defattr(-,root,root)
%{_javadir}/scripting-engines/xpath-engine*.jar

%files xslt
%defattr(-,root,root)
%{_javadir}/scripting-engines/xslt-engine*.jar

%changelog
* Fri Dec 31 2010 gil <puntogil@...> 1.0-2mamba
- add java-jsr223-scripting-engines-bsh sub package

* Fri Dec 10 2010 gil <puntogil@...> 1.0-1mamba
- package created by autospec