Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37762645
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 

Packager: Igor Vlasenko <viy at altlinux.ru>
BuildRequires: /proc
BuildRequires: jpackage-compat
# Copyright (c) 2000-2008, 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

# If you want repolib package to be built,

# issue the following: 'rpmbuild --with repolib'

%define _with_repolib 1

%define with_repolib %{?_with_repolib:1}%{!?_with_repolib:0}
%define without_repolib %{!?_with_repolib:1}%{?_with_repolib:0}

%define repodir %{_javadir}/repository.jboss.com/apache-bsf/2.3.0-brew
%define repodirlib %{repodir}/lib
%define repodirsrc %{repodir}/src


Name: bsf
Version: 2.3.0
Release: alt1_13jpp5
Epoch: 1
Summary:        Bean Scripting Framework
License:        Apache License
Url:            http://jakarta.apache.org/bsf/
Group:          Development/Java

#http://jakarta.apache.org/builds/jakarta-%{name}/dev/v%{version}/src/%{name}-src-%{version}.tar.gz

Source0:        %{name}-src-%{version}.tar.gz
Source1:        bsf-component-info.xml
Source2:        bsf-2.3.0.pom
BuildRequires: jpackage-utils >= 1.7.5
BuildRequires: ant
BuildRequires: servlet
BuildRequires: tomcat5-jsp-2.0-api
BuildRequires: xalan-j2
Requires: servletapi5
Requires: xalan-j2
Requires: tomcat5-jsp-2.0-api
%if ! %{gcj_support}
BuildArch:      noarch
%endif

Requires(post): jpackage-utils >= 0:1.7.5
Requires(postun): jpackage-utils >= 0:1.7.5

%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif
%add_findreq_skiplist /usr/share/bsf-*

%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

%if %{with_repolib}
%package repolib
Summary: Artifacts to be uploaded to a repository library
Group: Development/Java

%description repolib
Artifacts to be uploaded to a repository library.
This package is not meant to be installed but so its contents
can be extracted through rpm2cpio
%endif

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

%description javadoc
Javadoc for %{name}.

%prep
%{__rm} -fr %{buildroot}
%setup -q
# remove all binary libs
find . -name "*.jar" -exec %{__rm} -f {} \;
%{__rm} -fr bsf

tag=`echo %{name}-%{version}-%{release} | sed 's|\.|_|g'`
sed -i "s/ at TAG at /$tag/g" %{SOURCE1}

%build
[ -z "$JAVA_HOME" ] && export JAVA_HOME=%{_jvmdir}/java
export CLASSPATH=$(build-classpath xalan-j2 servlet jspapi)
cd src
ant realclean
ant compile
%{__rm} -rf bsf/src/org/apache/bsf/engines/java
ant javadocs

%install
# jar
%{__install} -d -m 755 %{buildroot}%{_javadir}
%{__install} -m 644 src/build/lib/%{name}.jar \
%{buildroot}%{_javadir}/%{name}-%{version}.jar
(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do \
ln -sf ${jar} ${jar/-%{version}/}; done)
# pom and depmap frag
%{__install} -d -m 755 %{buildroot}%{_datadir}/maven2/poms
%{__install} -m 644 %{SOURCE2} %{buildroot}%{_datadir}/maven2/poms/JPP-bsf.pom
%add_to_maven_depmap %{name} %{name} %{version} JPP %{name}
# javadoc
%{__install} -d -m 755 %{buildroot}%{_javadocdir}/%{name}-%{version}
%{__cp} -pr src/build/javadocs/* %{buildroot}%{_javadocdir}/%{name}-%{version}
(cd %{buildroot}%{_javadocdir} && ln -sf %{name}-%{version} %{name})

%if %{with_repolib}
install -d -m 755 $RPM_BUILD_ROOT%{repodir}
install -d -m 755 $RPM_BUILD_ROOT%{repodirlib}
install -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{repodir}/component-info.xml
install -d -m 755 $RPM_BUILD_ROOT%{repodirsrc}
install -m 755 %{SOURCE0} $RPM_BUILD_ROOT%{repodirsrc}
cp $RPM_BUILD_ROOT%{_javadir}/bsf.jar $RPM_BUILD_ROOT%{repodirlib}
%endif

%if %{gcj_support}
%{_bindir}/aot-compile-rpm
%endif

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

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

%files
%doc license.txt src/AUTHORS src/BUILDING src/CHANGES src/CHANGES.old src/INSTALL src/README src/TODO
%{_javadir}/*
%{_datadir}/maven2/poms
%{_mavendepmapfragdir}
%if %{gcj_support}
%{_libdir}/gcj/%{name}
%endif

%exclude %{_javadir}/repository.jboss.com/*

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


%if %{with_repolib}
%files repolib
%{repodir}
%endif

%changelog

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

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