Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37765629
en ru br
Репозитории ALT
S:2.4.0-alt3_46jpp11
5.1: 2.3.0-alt1_13jpp5
4.1: 2.4.0-alt4_1jpp1.7
4.0: 2.4.0-alt4_1jpp1.7
www.altlinux.org/Changes

Группа :: Разработка/Java
Пакет: bsf

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

BuildRequires: /proc
BuildRequires: jpackage-1.4-compat
# Copyright (c) 2000-2007, JPackage Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the
#    distribution.
# 3. Neither the name of the JPackage Project nor the names of its
#    contributors may be used to endorse or promote products derived
#    from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

%define gcj_support 0


Name:           bsf
Version:        2.4.0
Release:        alt4_1jpp1.7
Epoch:          0
Summary:        Bean Scripting Framework
License:        Apache License
Url:            http://jakarta.apache.org/bsf/
Group:          Development/Java
Source0:        %{name}-src-%{version}.tar.gz
Source1:        bsf-2.4.0.pom
# svn export http://svn.apache.org/repos/asf/jakarta/bsf/tags/bsf-2.4.0/ bsf-2.4.0

BuildRequires: jpackage-utils >= 1.7.2
BuildRequires: ant >= 0:1.6.5
BuildRequires: jakarta-commons-collections >= 0:3.1
BuildRequires: jakarta-commons-logging >= 0:1.0.4
BuildRequires: jdom >= 0:1.0
BuildRequires: junit >= 0:3.8.2
BuildRequires: log4j >= 0:1.2.12
BuildRequires: velocity >= 0:1.4
BuildRequires: xalan-j2 >= 0:2.7.0
BuildRequires: xerces-j2 >= 0:2.4.0
#
BuildRequires: bsh
BuildRequires: rhino
BuildRequires: jython
BuildRequires: jruby

Requires: jakarta-commons-collections >= 0:3.1
Requires: jakarta-commons-logging >= 0:1.0.4
Requires: jdom >= 0:1.0
Requires: log4j >= 0:1.2.12
Requires: velocity >= 0:1.4
Requires: xalan-j2 >= 0:2.7.0
Requires: xerces-j2 >= 0:2.4.0

Requires(post): jpackage-utils >= 0:1.7.2
Requires(postun): jpackage-utils >= 0:1.7.2
%if %{gcj_support}
BuildRequires: gnu-crypto
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif

%if ! %{gcj_support}
BuildArch:      noarch
%endif
%add_findreq_skiplist /usr/share/bsf-*
BuildRequires: jakarta-commons-lang
Requires: jakarta-commons-lang


%description
Bean Scripting Framework (BSF) is a set of Java classes which provides
scripting language support within Java applications, and access to Java
objects and methods from scripting languages. BSF allows one to write
JSPs in languages other than Java while providing access to the Java
class library. In addition, BSF permits any Java application to be
implemented in part (or dynamically extended) by a language that is
embedded within it. This is achieved by providing an API that permits
calling scripting language engines from within Java, as well as an
object registry that exposes Java objects to these scripting language
engines.

BSF supports several scripting languages currently:
* Javascript (using Rhino ECMAScript, from the Mozilla project)
* Python (using either Jython or JPython)
* Tcl (using Jacl)
* NetRexx (an extension of the IBM REXX scripting language in Java)
* XSLT Stylesheets (as a component of Apache XML project's Xalan and
Xerces)

In addition, the following languages are supported with their own BSF
engines:
* Java (using BeanShell, from the BeanShell project)
* JRuby
* JudoScript

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

%description javadoc
%{summary}.

%package manual
Summary:        Documents for %{name}
Group:          Development/Documentation

%description manual
%{summary}.

%package demo
Summary:        Samples for %{name}
Group:          Development/Java

%description demo
%{summary}.

%prep
%setup -q
# remove all binary libs
for j in $(find . -name "*.jar"); do
   mv $j $j.no
done

%build
[ -z "$JAVA_HOME" ] && export JAVA_HOME=%{_jvmdir}/java
# CLASSPATH needed to activate optionals ?
export CLASSPATH=$(build-classpath bsh jruby jython rhino)
pushd lib
ln -sf $(build-classpath commons-lang)
#commons-collections-3.1.jar.no
ln -sf $(build-classpath commons-collections)
#commons-logging-1.0.4.jar.no
ln -sf $(build-classpath commons-logging)
#jdom-b9.jar.no
ln -sf $(build-classpath jdom)
#junit-3.8.2.jar.no
ln -sf $(build-classpath junit)
#log4j-1.2.12.jar.no
ln -sf $(build-classpath log4j)
#velocity-1.4.jar.no
ln -sf $(build-classpath velocity)
#xalan-2.7.0.jar.no
ln -sf $(build-classpath xalan-j2)
#xerces-2.4.0.jar.no
ln -sf $(build-classpath xerces-j2)
# Optional Additions

# Rhino       -> http://www.mozilla.org/rhino/

#ln -sf $(build-classpath rhino)
ln -sf $(build-classpath js)
# NetRexx     -> http://www2.hursley.ibm.com/netrexx/
# Jython      -> http://www.jython.org/
ln -sf $(build-classpath jython)
# Jacl        -> http://www.scriptics.com/java/
# Xalan       -> http://xml.apache.org/xalan/
# is there already
# ASF (Win32) -> http://msdn.microsoft.com/scripting/ (currently unsupported)
# PerlScript  -> http://www.activestate.com/ (currently unsupported)
# BeanShell   -> http://www.beanshell.org/ (3rd party BSF engine)
ln -sf $(build-classpath bsh)
# JRuby       -> http://www.jruby.org/ (3rd party BSF engine)
ln -sf $(build-classpath jruby)
# JudoScript  -> http://www.judoscript.com/ (3rd party BSF engine)
popd
ant all

%install
%{__rm} -fr %{buildroot}
# jar
%{__install} -d -m 755 %{buildroot}%{_javadir}
%{__install} -m 644 build/lib/%{name}.jar \
            %{buildroot}%{_javadir}/%{name}-%{version}.jar
(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do \
ln -sf ${jar} ${jar/-%{version}/}; done)

# javadoc

%{__install} -d -m 755 %{buildroot}%{_javadocdir}/%{name}-%{version}
%{__cp} -pr build/javadocs/* %{buildroot}%{_javadocdir}/%{name}-%{version}
(cd %{buildroot}%{_javadocdir} && ln -sf %{name}-%{version} %{name})

%add_to_maven_depmap bsf bsf %{version} JPP %{name}

# poms

install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
install -pm 644 %{SOURCE1} \
   $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}.pom

# manual

%{__install} -d -m 755 %{buildroot}%{_docdir}/%{name}-%{version}
%{__cp} -pr docs/* %{buildroot}%{_docdir}/%{name}-%{version}

# txt and samples

%{__install} -d -m 755 %{buildroot}%{_datadir}/%{name}-%{version}
%{__cp} -pr samples %{buildroot}%{_datadir}/%{name}-%{version}
%{__cp} -p *.txt %{buildroot}%{_datadir}/%{name}-%{version}

%if %{gcj_support}
export CLASSPATH=$(build-classpath gnu-crypto)
%{_bindir}/aot-compile-rpm
%endif

%clean
%{__rm} -rf %{buildroot}

%post javadoc
%{__rm} -f %{_javadocdir}/%{name}
ln -s %{name}-%{version} %{_javadocdir}/%{name}

%postun javadoc
if [ $1 -eq 0 ]; then
 %{__rm} -f %{_javadocdir}/%{name}
fi

%post
%update_maven_depmap
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
 %{_bindir}/rebuild-gcj-db
fi
%endif

%postun
%update_maven_depmap
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
 %{_bindir}/rebuild-gcj-db
fi
%endif

%files
%doc %{_datadir}/%{name}-%{version}/*.txt
%{_javadir}/*
%{_datadir}/maven2/poms/*
%{_mavendepmapfragdir}
%if %{gcj_support}
%dir %attr(-,root,root) %{_libdir}/gcj/%{name}
%{_libdir}/gcj/%{name}/%{name}-%{version}.jar.*
%endif

%files javadoc
%dir %{_javadocdir}/%{name}-%{version}
%{_javadocdir}/%{name}-%{version}/*
%ghost %{_javadocdir}/%{name}

%files manual
%doc %{_docdir}/%{name}-%{version}

%files demo
%{_datadir}/%{name}-%{version}/samples

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin