Репозиторий Sisyphus
Последнее обновление: 6 декабря 2019 | Пакетов: 17494 | Посещений: 15988299
en ru br
Репозитории ALT
S:2.2-alt1_4jpp8
4.1: 0.20.5-alt1_12jpp1.7
4.0: 0.20.5-alt1_12jpp1.7
www.altlinux.org/Changes

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

 Главная   Изменения   Спек   Патчи   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


Summary:        XSL-driven print formatter
Name:           fop
Version:        0.20.5
Release:        alt1_12jpp1.7
Epoch:          0
License:        Apache Software License
Group:          Development/Java
Source0:        http://www.apache.org/dist/xml/fop/fop-0.20.5-src.tar.gz
Source1:        %{name}.script
Patch0:         %{name}-javadoc-crosslink.patch
Patch1:         %{name}-build-manifest.patch
Patch2:         %{name}-PDFTextPainter.patch
URL:            http://xmlgraphics.apache.org/fop/
Requires: jpackage-utils >= 0:1.6
Requires: batik >= 0:1.6
Requires: excalibur-avalon-logkit
Requires: excalibur-avalon-framework-api
Requires: excalibur-avalon-framework-impl
Requires: jaxp_parser_impl
Requires: jaxp_transform_impl
Requires: xml-commons-apis
BuildRequires: ant >= 0:1.6
BuildRequires: ant-trax >= 0:1.6
BuildRequires: jpackage-utils >= 0:1.6
BuildRequires: batik >= 0:1.6
BuildRequires: excalibur-avalon-logkit
BuildRequires: excalibur-avalon-framework-api
BuildRequires: excalibur-avalon-framework-impl
BuildRequires: batik-javadoc
BuildRequires: jce
#BuildRequires:  jimi
#BuildRequires:  jai
BuildRequires: xalan-j2 >= 0:2.7.0
%if ! %{gcj_support}
BuildArch:      noarch
%endif
%if %{gcj_support}
BuildRequires: gnu-crypto
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif
Patch33: fop-0.20.5-fix-javadoc.patch

%description
FOP is the world's first print formatter driven by XSL formatting
objects. It is a Java application that reads a formatting object tree
and then turns it into a PDF document. The formatting object tree, can
be in the form of an XML document (output by an XSLT engine like XT or
Xalan) or can be passed in memory as a DOM Document or (in the case of
XT) SAX events.

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

%description    javadoc
Javadoc for %{name}.

%prep
%setup -q
%patch0 -p0
%patch1 -p1
%patch2 -b .sav

# replace all binary libs

find lib -name "*.jar" -exec rm {} \;

# link libs for javadoc

ln -s $(build-classpath ant) lib/ant.jar
ln -s $(build-classpath excalibur/avalon-framework-api) lib/avalon-framework-api.jar
ln -s $(build-classpath excalibur/avalon-framework-impl) lib/avalon-framework-impl.jar
ln -s $(build-classpath batik/awt-util) lib/batik-awt-util.jar
ln -s $(build-classpath batik/bridge) lib/batik-bridge.jar
ln -s $(build-classpath batik/dom) lib/batik-dom.jar
ln -s $(build-classpath batik/ext) lib/batik-ext.jar
ln -s $(build-classpath batik/gvt) lib/batik-gvt.jar
ln -s $(build-classpath batik/svg-dom) lib/batik-svg-dom.jar
ln -s $(build-classpath batik/transcoder) lib/batik-transcoder.jar
ln -s $(build-classpath batik/util) lib/batik-util.jar
#ln -s $(build-classpath jai/jai_codec) lib/jai-codec.jar
#ln -s $(build-classpath jai/jai_core) lib/jai-core.jar
#ln -s $(build-classpath jimi) lib/jimi.jar
%patch33 -p1

%build
export OPT_JAR_LIST="ant/ant-trax jaxp_transform_impl"
export CLASSPATH=$(build-classpath \
xml-commons-apis \
xalan-j2 \
excalibur/avalon-framework-api \
excalibur/avalon-framework-impl \
excalibur/avalon-logkit \
batik/awt-util \
batik/bridge \
batik/css \
batik/dom \
batik/ext \
batik/gvt \
batik/parser \
batik/transcoder \
batik/util \
batik/svg-dom \
batik/swing \
jce \
)
#jimi \
#jai )

ant \
 -Dbuild.compiler=modern \
 -Dj2se.javadoc=%{_javadocdir}/java \
 -Dbatik.javadoc=%{_javadocdir}/batik \
 package javadocs


%install

# jars

mkdir -p $RPM_BUILD_ROOT%{_javadir}
cp -p build/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)

# script

mkdir -p $RPM_BUILD_ROOT%{_bindir}
cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/fop

# data

mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
cp -pr src/hyph $RPM_BUILD_ROOT%{_datadir}/%{name}
cp -pr conf $RPM_BUILD_ROOT%{_datadir}/%{name}

# javadoc

mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr build/javadocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}

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

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

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

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

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

%files
%doc CHANGES LICENSE README ReleaseNotes.html STATUS
%attr(0755,root,root) %{_bindir}/fop
%{_javadir}/%{name}*.jar
%{_datadir}/%{name}
%if %{gcj_support}
%dir %attr(-,root,root) %{_libdir}/gcj/%{name}
%{_libdir}/gcj/%{name}/%{name}-%{version}.jar.*
%endif

%files javadoc
%doc %{_javadocdir}/%{name}-%{version}
%ghost %doc %{_javadocdir}/%{name}


%changelog

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

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