Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37515226
en ru br
Репозитории ALT
5.1: 1.4-alt2_8jpp5
4.1: 1.4-alt1_6jpp1.7
4.0: 1.4-alt1_6jpp1.7
www.altlinux.org/Changes

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

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

Provides: velocity = 1.4
%define oldname velocity
BuildRequires: /proc
BuildRequires: jpackage-1.4-compat
# Copyright (c) 2000-2005, 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:           velocity14
Version:        1.4
Release:        alt1_6jpp1.7
Epoch:          0
Summary:        Java-based template engine
License:        Apache Software License
Source:         http://jakarta.apache.org/builds/jakarta-velocity/release/v1.4/velocity-1.4.tar.gz
Patch0: velocity-AnakiaJDOMFactory-jdom-DefaultJDOMFactory.patch
Patch1: velocity-AnakiaTask-jdom-XMLOutputter.patch
Patch2: velocity-servletapi5.patch
URL:            http://jakarta.apache.org/velocity/
Group:          Development/Java
Requires: jakarta-commons-collections
# Use servletapi5 instead of servletapi3
Requires: servletapi5
Requires: oro
Requires: werken.xpath
Requires: jdom >= 0:1.0-1
Requires: bcel
Requires: log4j >= 0:1.1
Requires: excalibur-avalon-logkit
BuildRequires: werken.xpath
BuildRequires: ant
BuildRequires: antlr
BuildRequires: junit
BuildRequires: jakarta-commons-collections
# Use servletapi5 instead of servletapi3
BuildRequires: servletapi5
BuildRequires: oro
BuildRequires: jdom >= 0:1.0-1
BuildRequires: bcel
BuildRequires: log4j >= 0:1.1
BuildRequires: excalibur-avalon-logkit
BuildRequires: jpackage-utils >= 0:1.6
%if ! %{gcj_support}
BuildArch:      noarch
%endif

%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif

%description
Velocity is a Java-based template engine. It permits anyone to use the
simple yet powerful template language to reference objects defined in
Java code.
When Velocity is used for web development, Web designers can work in
parallel with Java programmers to develop web sites according to the
Model-View-Controller (MVC) model, meaning that web page designers can
focus solely on creating a site that looks good, and programmers can
focus solely on writing top-notch code. Velocity separates Java code
from the web pages, making the web site more maintainable over the long
run and providing a viable alternative to Java Server Pages (JSPs) or
PHP.
Velocity's capabilities reach well beyond the realm of web sites; for
example, it can generate SQL and PostScript and XML (see Anakia for more
information on XML transformations) from templates. It can be used
either as a standalone utility for generating source code and reports,
or as an integrated component of other systems. Velocity also provides
template services for the Turbine web application framework.
Velocity+Turbine provides a template service that will allow web
applications to be developed according to a true MVC model.

%package        manual
Summary:        Manual for %{oldname}
Group:          Development/Java

%description    manual
Documentation for %{oldname}.

%package        javadoc
Summary:        Javadoc for %{oldname}
Group:          Development/Documentation
Requires(post): %{__rm}
Requires(postun): %{__rm}

%description    javadoc
Javadoc for %{oldname}.

%package        demo
Summary:        Demo for %{oldname}
Group:          Development/Java
Requires: %{name} = %{epoch}:%{version}-%{release}

%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif

%description    demo
Demonstrations and samples for %{oldname}.

# -----------------------------------------------------------------------------


%prep
%setup -q -n %{oldname}-%{version}
# Remove all binary libs used in compiling the package.
# Note that velocity has some jar files containing macros under
# examples and test that should not be removed.
find build -name '*.jar' -exec rm -f \{\} \;

%patch0 -b .sav
%patch1 -b .sav
#Apply patch to remove explicit dependency on servletapi3
%patch2 -p1
# -----------------------------------------------------------------------------

%build
# Use servletapi5 instead of servletapi3 in CLASSPATH
export CLASSPATH=$(build-classpath \
antlr \
jakarta-commons-collections \
servletapi5 \
excalibur/avalon-logkit \
junit \
oro \
log4j \
jdom \
bcel \
werken.xpath)
ant \
 -buildfile build/build.xml \
 -Djunit.jar=%{_javadir}/junit.jar \
 -Dbuild.sysclasspath=first \
 jar javadocs test

# -----------------------------------------------------------------------------


%install

# jars

install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
install -p -m 644 bin/%{oldname}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{oldname}-%{version}.jar
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)

# javadoc

install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{oldname}-%{version}
cp -pr docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{oldname}-%{version}
rm -rf docs/api

# data

install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{oldname}
cp -pr convert examples test $RPM_BUILD_ROOT%{_datadir}/%{oldname}

# -----------------------------------------------------------------------------


%if %{gcj_support}
%{_bindir}/aot-compile-rpm
%endif
rm %buildroot%_javadir/velocity.jar

%post javadoc
rm -f %{_javadocdir}/%{oldname}
ln -s %{oldname}-%{version} %{_javadocdir}/%{oldname}

%postun javadoc
if [ "$1" = "0" ]; then
   rm -f %{_javadocdir}/%{oldname}
fi

# -----------------------------------------------------------------------------


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

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

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

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

%files
%doc LICENSE NOTICE README.txt
%{_javadir}/*.jar

%if %{gcj_support}
%{_libdir}/gcj/%{oldname}/velocity-1.4.jar.*
%{_libdir}/gcj/%{oldname}/classloader.*
%endif

%files manual
%doc docs/*

%files javadoc
%{_javadocdir}/%{oldname}-%{version}

%files demo
%{_datadir}/%{oldname}

# -----------------------------------------------------------------------------


#FIXME: Generated by spec-convert-gcj-* script. These cant be natively compiled

#since they only contain *.vm files. Check if these are ignored in subsequent versions
#of spec-convert-gcj-* script.
#%if %{gcj_support}
#%attr(-,root,root) %{_libdir}/gcj/%{oldname}/template.jar.*
#%attr(-,root,root) %{_libdir}/gcj/%{oldname}/test1.jar.*
#%attr(-,root,root) %{_libdir}/gcj/%{oldname}/test2.jar.*
#%attr(-,root,root) %{_libdir}/gcj/%{oldname}/test1.jar.*
#%attr(-,root,root) %{_libdir}/gcj/%{oldname}/test2.jar.*
#%attr(-,root,root) %{_libdir}/gcj/%{oldname}/test.jar.*
#%endif

%changelog

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

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