2010-11-05 08:40:17 +01:00
|
|
|
#
|
2011-05-02 13:16:44 +02:00
|
|
|
# spec file for package xmlgraphics-fop
|
2010-11-16 16:11:57 +01:00
|
|
|
#
|
2017-03-02 13:52:52 +01:00
|
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
2010-11-19 15:23:52 +01:00
|
|
|
# Copyright (c) 2000-2008, JPackage Project
|
2010-11-16 16:11:57 +01:00
|
|
|
#
|
2010-11-19 15:23:52 +01:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
2010-11-05 08:40:17 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%define bname fop
|
|
|
|
Name: xmlgraphics-fop
|
2016-03-08 13:32:37 +01:00
|
|
|
Version: 2.1
|
2012-10-24 16:09:34 +02:00
|
|
|
Release: 0
|
2010-11-05 08:40:17 +01:00
|
|
|
Summary: Formatter for Printing XSLT Processed XML Files
|
2012-10-24 16:09:34 +02:00
|
|
|
License: Apache-2.0
|
2010-11-05 08:40:17 +01:00
|
|
|
Group: Productivity/Publishing/XML
|
2014-12-08 14:29:50 +01:00
|
|
|
Url: http://xmlgraphics.apache.org/fop/
|
2016-03-08 13:32:37 +01:00
|
|
|
Source0: http://ftp.halifax.rwth-aachen.de/apache/xmlgraphics/fop/source/fop-2.1-src.tar.gz
|
2010-11-05 09:31:26 +01:00
|
|
|
#FIX-OPENSUSE: add xmlgraphics-commons to classpath
|
2010-11-05 08:40:17 +01:00
|
|
|
Source1: %{name}.script
|
2016-03-08 13:32:37 +01:00
|
|
|
Source2: http://svn.apache.org/repos/asf/xmlgraphics/fop/tags/fop-2_1/xmlgraphics-fop-pom-template.pom
|
2011-05-17 13:45:07 +02:00
|
|
|
Source3: %{name}-fontmetrics.script
|
|
|
|
Source4: %{name}-fontlist.script
|
2016-03-08 13:32:37 +01:00
|
|
|
Source5: http://heanet.dl.sourceforge.net/project/offo/offo-hyphenation/2.2/offo-hyphenation.zip
|
2011-05-17 13:45:07 +02:00
|
|
|
# Manpage(s)
|
|
|
|
Source10: %{name}.xml
|
|
|
|
Source11: %{name}-fontmetrics.xml
|
|
|
|
Source12: %{name}-fontlist.xml
|
2010-11-05 08:40:17 +01:00
|
|
|
Patch1: xmlgraphics-fop-cli.patch
|
2016-03-08 13:32:37 +01:00
|
|
|
Patch2: hyphenation-more-stack.patch
|
2017-03-02 13:52:52 +01:00
|
|
|
Patch3: fix-javadoc-java8.patch
|
2010-11-05 08:40:17 +01:00
|
|
|
BuildRequires: ant >= 1.6.5
|
2013-09-06 10:20:45 +02:00
|
|
|
BuildRequires: apache-commons-io >= 2.4
|
|
|
|
BuildRequires: apache-commons-logging
|
2016-03-08 13:32:37 +01:00
|
|
|
BuildRequires: apache-pdfbox
|
2012-12-17 11:22:28 +01:00
|
|
|
BuildRequires: avalon-framework
|
2012-10-24 16:09:34 +02:00
|
|
|
BuildRequires: docbook-xsl-stylesheets
|
|
|
|
BuildRequires: gpg2
|
2012-10-26 10:39:07 +02:00
|
|
|
BuildRequires: java-devel >= 1.6.0
|
2013-09-09 14:02:26 +02:00
|
|
|
BuildRequires: javapackages-tools
|
2012-10-24 16:09:34 +02:00
|
|
|
BuildRequires: libxslt
|
|
|
|
BuildRequires: qdox >= 1.12
|
2010-11-05 08:40:17 +01:00
|
|
|
BuildRequires: servlet_api
|
2012-10-24 16:09:34 +02:00
|
|
|
BuildRequires: unzip
|
2013-01-28 15:45:53 +01:00
|
|
|
BuildRequires: xml-commons-jaxp-1.3-apis
|
2016-03-08 13:32:37 +01:00
|
|
|
BuildRequires: xmlgraphics-batik >= 1.8
|
|
|
|
BuildRequires: xmlgraphics-commons >= 2.1
|
2014-12-08 14:29:50 +01:00
|
|
|
Requires: apache-commons-io >= 2.4
|
|
|
|
Requires: apache-commons-logging
|
2016-03-08 13:32:37 +01:00
|
|
|
Requires: apache-pdfbox
|
2014-12-08 14:29:50 +01:00
|
|
|
Requires: avalon-framework
|
|
|
|
Requires: java >= 1.6.0
|
|
|
|
Requires: javapackages-tools
|
|
|
|
Requires: xml-commons-jaxp-1.3-apis
|
2016-03-08 13:32:37 +01:00
|
|
|
Requires: xmlgraphics-batik >= 1.8
|
|
|
|
Requires: xmlgraphics-commons >= 2.1
|
2014-12-08 14:29:50 +01:00
|
|
|
Requires(post): javapackages-tools
|
|
|
|
Requires(postun): javapackages-tools
|
2010-11-05 08:40:17 +01:00
|
|
|
#!BuildIgnore: saxon
|
2010-11-16 16:11:57 +01:00
|
|
|
Provides: %{bname} = %{version}-%{release}
|
2010-11-18 14:28:08 +01:00
|
|
|
Obsoletes: %{bname} < %{version}-%{release}
|
2012-11-20 13:53:37 +01:00
|
|
|
Provides: fo-formatter = %{version}-%{release}
|
2014-12-08 14:29:50 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
BuildArch: noarch
|
2010-11-05 08:40:17 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
FOP (Formatting Objects Processor) is driven by XSL formatting objects
|
|
|
|
(XSL-FO). It is a Java application that reads a formatting object (FO)
|
|
|
|
tree and renders the resulting pages to one of the following output
|
|
|
|
formats: PDF (primary output target), PCL, PS, SVG, XML (area tree
|
|
|
|
representation), Print, AWT, MIF, and TXT.
|
|
|
|
|
|
|
|
%prep
|
2014-07-08 12:31:22 +02:00
|
|
|
%setup -q -n %{bname}-%{version} -a5
|
2011-09-22 11:20:43 +02:00
|
|
|
ln -thyph offo-hyphenation/hyph/*.xml
|
2010-11-05 08:40:17 +01:00
|
|
|
find -name "*.jar" | xargs -t rm
|
|
|
|
%patch1 -p1 -b .cli
|
2016-03-08 13:32:37 +01:00
|
|
|
%patch2 -p1
|
2017-03-02 13:52:52 +01:00
|
|
|
%patch3 -p1
|
2010-11-05 08:40:17 +01:00
|
|
|
|
2012-10-24 16:09:34 +02:00
|
|
|
cp %{SOURCE2} %{SOURCE3} %{SOURCE4} .
|
|
|
|
# Replace keyword "VERSION" in XML files with the real one:
|
|
|
|
for x in %{SOURCE10} %{SOURCE11} %{SOURCE12}; do
|
|
|
|
sed -i "s=@VERSION@=%{version}=" $x
|
|
|
|
done
|
|
|
|
|
|
|
|
%build
|
2010-11-05 08:40:17 +01:00
|
|
|
pushd lib
|
2012-12-17 11:22:28 +01:00
|
|
|
ln -s $(build-classpath avalon-framework)
|
2010-11-05 08:40:17 +01:00
|
|
|
ln -s $(build-classpath commons-io)
|
|
|
|
ln -s $(build-classpath commons-logging)
|
2016-03-08 13:32:37 +01:00
|
|
|
ln -s $(build-classpath fontbox)
|
2010-11-05 08:40:17 +01:00
|
|
|
ln -s $(build-classpath servlet_api)
|
|
|
|
ln -s $(build-classpath xml-commons-jaxp-1.3-apis)
|
|
|
|
ln -s $(build-classpath xml-commons-jaxp-1.3-apis-ext)
|
|
|
|
ln -s $(build-classpath xmlgraphics-batik/anim)
|
|
|
|
ln -s $(build-classpath xmlgraphics-batik/awt-util)
|
|
|
|
ln -s $(build-classpath xmlgraphics-batik/bridge)
|
|
|
|
ln -s $(build-classpath xmlgraphics-batik/css)
|
|
|
|
ln -s $(build-classpath xmlgraphics-batik/dom)
|
|
|
|
ln -s $(build-classpath xmlgraphics-batik/ext)
|
|
|
|
ln -s $(build-classpath xmlgraphics-batik/extension)
|
|
|
|
ln -s $(build-classpath xmlgraphics-batik/gvt)
|
|
|
|
ln -s $(build-classpath xmlgraphics-batik/parser)
|
|
|
|
ln -s $(build-classpath xmlgraphics-batik/svg-dom)
|
|
|
|
ln -s $(build-classpath xmlgraphics-batik/svggen)
|
|
|
|
ln -s $(build-classpath xmlgraphics-batik/script)
|
|
|
|
ln -s $(build-classpath xmlgraphics-batik/transcoder)
|
|
|
|
ln -s $(build-classpath xmlgraphics-batik/util)
|
|
|
|
ln -s $(build-classpath xmlgraphics-batik/xml)
|
|
|
|
ln -s $(build-classpath xmlgraphics-commons)
|
|
|
|
ln -s $(build-classpath qdox)
|
|
|
|
popd
|
2011-09-22 11:20:43 +02:00
|
|
|
export CLASSPATH= LANG=en_US.UTF-8
|
2016-03-08 13:32:37 +01:00
|
|
|
ant package maven-artifacts
|
2010-11-05 08:40:17 +01:00
|
|
|
|
2011-05-17 13:45:07 +02:00
|
|
|
# Build the manpage(s) and HTML
|
2014-12-08 14:29:50 +01:00
|
|
|
DB=%{_datadir}/xml/docbook/stylesheet/nwalsh/current
|
2011-05-17 13:45:07 +02:00
|
|
|
for m in %{SOURCE10} %{SOURCE11} %{SOURCE12}; do
|
|
|
|
xsltproc $DB/manpages/docbook.xsl $m
|
|
|
|
# Only filename for HTML is needed, remove anything before /
|
|
|
|
xml=${m##*/}
|
|
|
|
xsltproc --output ${xml%%.xml}.html $DB/html/docbook.xsl $m
|
|
|
|
done
|
|
|
|
|
2010-11-05 08:40:17 +01:00
|
|
|
%install
|
|
|
|
# jars
|
2012-10-26 10:39:07 +02:00
|
|
|
mkdir -p %{buildroot}%{_javadir}
|
|
|
|
install -m 644 build/%{bname}.jar %{buildroot}%{_javadir}/%{name}.jar
|
2010-11-05 08:40:17 +01:00
|
|
|
|
|
|
|
# pom
|
2013-09-06 10:20:45 +02:00
|
|
|
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
|
|
|
install -pm 644 build/maven/pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
|
|
|
|
%add_maven_depmap
|
2010-11-05 08:40:17 +01:00
|
|
|
|
|
|
|
# script
|
2012-10-26 10:39:07 +02:00
|
|
|
mkdir -p %{buildroot}%{_bindir}
|
|
|
|
cp -p %{SOURCE1} %{buildroot}%{_bindir}/%{name}
|
|
|
|
cp -p %{SOURCE3} %{buildroot}%{_bindir}/%{name}-fontmetrics
|
|
|
|
cp -p %{SOURCE4} %{buildroot}%{_bindir}/%{name}-fontlist
|
2010-11-05 13:15:34 +01:00
|
|
|
# compat symlink
|
2011-05-17 13:45:07 +02:00
|
|
|
ln -s %{name} %{buildroot}%{_bindir}/%{bname}
|
|
|
|
ln -s %{name}-fontmetrics %{buildroot}%{_bindir}/%{bname}-fontmetrics
|
|
|
|
ln -s %{name}-fontlist %{buildroot}%{_bindir}/%{bname}-fontlist
|
2010-11-05 08:40:17 +01:00
|
|
|
|
|
|
|
# data
|
2012-10-26 10:39:07 +02:00
|
|
|
mkdir -p %{buildroot}%{_datadir}/%{name}
|
|
|
|
cp -pr hyph %{buildroot}%{_datadir}/%{name}
|
|
|
|
cp -pr conf %{buildroot}%{_datadir}/%{name}
|
2014-12-08 14:29:50 +01:00
|
|
|
install -D -m 644 conf/fop.xconf %{buildroot}%{_sysconfdir}/fop.xconf
|
2010-11-05 08:40:17 +01:00
|
|
|
|
2011-05-17 13:45:07 +02:00
|
|
|
# Manpages
|
2014-12-08 14:29:50 +01:00
|
|
|
mkdir -p %{buildroot}%{_mandir}/man1
|
2011-05-17 13:45:07 +02:00
|
|
|
for m in *.1; do
|
|
|
|
gzip $m
|
|
|
|
done
|
2014-12-08 14:29:50 +01:00
|
|
|
cp -vi *.1.gz %{buildroot}%{_mandir}/man1
|
2011-05-17 13:45:07 +02:00
|
|
|
|
|
|
|
# Remove prefix xmlgraphics to make also the linked manpage version available
|
2014-12-08 14:29:50 +01:00
|
|
|
pushd %{buildroot}%{_mandir}/man1
|
2011-05-17 13:45:07 +02:00
|
|
|
for m in *.1.gz; do
|
|
|
|
ln -s $m ${m#*-}
|
|
|
|
done
|
2014-07-08 12:31:22 +02:00
|
|
|
popd
|
2011-05-17 13:45:07 +02:00
|
|
|
|
2010-11-05 08:40:17 +01:00
|
|
|
%files
|
|
|
|
%defattr(0644,root,root,0755)
|
2016-03-08 13:32:37 +01:00
|
|
|
%doc NOTICE LICENSE README known-issues.xml
|
2011-05-17 13:45:07 +02:00
|
|
|
%doc *.html
|
2010-11-05 08:40:17 +01:00
|
|
|
|
2010-11-05 13:15:34 +01:00
|
|
|
%attr(0755,root,root) %{_bindir}/%{name}
|
2016-03-08 13:32:37 +01:00
|
|
|
%{_bindir}/%{bname}
|
2011-05-17 13:45:07 +02:00
|
|
|
%attr(0755,root,root) %{_bindir}/%{name}-fontmetrics
|
2016-03-08 13:32:37 +01:00
|
|
|
%{_bindir}/%{bname}-fontmetrics
|
2011-05-17 13:45:07 +02:00
|
|
|
%attr(0755,root,root) %{_bindir}/%{name}-fontlist
|
2016-03-08 13:32:37 +01:00
|
|
|
%{_bindir}/%{bname}-fontlist
|
2012-10-26 10:39:07 +02:00
|
|
|
%{_javadir}/%{name}.jar
|
2010-11-05 08:40:17 +01:00
|
|
|
%{_datadir}/%{name}
|
2013-09-06 10:20:45 +02:00
|
|
|
%{_mavenpomdir}/*
|
2017-03-02 13:52:52 +01:00
|
|
|
%if 0%{is_opensuse}
|
2015-03-18 11:08:41 +01:00
|
|
|
%{_datadir}/maven-metadata/%{name}.xml*
|
2017-03-02 13:52:52 +01:00
|
|
|
%else
|
|
|
|
%{_mavendepmapfragdir}/%{name}
|
|
|
|
%endif
|
2011-05-17 13:45:07 +02:00
|
|
|
%{_mandir}/man1/*
|
2014-12-08 14:29:50 +01:00
|
|
|
%config(noreplace) %{_sysconfdir}/fop.xconf
|
2010-11-05 08:40:17 +01:00
|
|
|
|
|
|
|
%changelog
|