1
0
xmlgraphics-commons/xmlgraphics-commons.spec

139 lines
4.6 KiB
RPMSpec

# 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 section free
Name: xmlgraphics-commons
Version: 1.4
Release: 1%{?dist}
Summary: XML Graphics Commons
Group: Development/Libraries/Java
License: ASL 2.0
URL: http://xmlgraphics.apache.org/
Source0: http://www.apache.org/dist/xmlgraphics/commons/source/xmlgraphics-commons-%{version}-src.tar.gz
Patch0: xmlgraphics-commons-build_xml.patch
BuildArch: noarch
BuildRequires: jpackage-utils >= 1.7.4
BuildRequires: java-devel >= 1.5.0
BuildRequires: ant >= 1.6.5
BuildRequires: ant-junit
BuildRequires: xmlgraphics-batik
BuildRequires: jakarta-commons-io >= 1.1
BuildRequires: jakarta-commons-logging
BuildRequires: junit
Requires: jakarta-commons-io >= 1.1
Requires: jakarta-commons-logging
Requires(post): jpackage-utils >= 1.7.4
Requires(postun): jpackage-utils >= 1.7.4
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
%description
Apache XML Graphics Commons is a library that consists of
several reusable components used by Apache Batik and
Apache FOP. Many of these components can easily be used
separately outside the domains of SVG and XSL-FO. You will
find components such as a PDF library, an RTF library,
Graphics2D implementations that let you generate PDF &
PostScript files, and much more.
%package javadoc
Summary: Javadoc for %{name}
Group: Documentation/HTML
%description javadoc
%{summary}.
%prep
%setup -q %{name}-%{version}
%patch0 -p0
find . -name "*.jar" | xargs rm
%build
export CLASSPATH=
export OPT_JAR_LIST="ant/ant-junit junit"
pushd lib
ln -sf $(build-classpath commons-io) .
ln -sf $(build-classpath commons-logging) .
popd
ant package javadocs maven-artifacts
%install
install -Dpm 644 build/%{name}-%{version}.jar \
$RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
ln -s %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
#
%add_to_maven_depmap org.apache.xmlgraphics %{name} %{version} JPP %{name}
# pom
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
install -pm 644 build/maven/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}.pom
install -dm 755 $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}
#
install -dm 755 $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
%clean
rm -rf $RPM_BUILD_ROOT
%post
%update_maven_depmap
%postun
%update_maven_depmap
%files
%defattr(0644,root,root,0755)
%doc LICENSE
%{_javadir}/*.jar
%{_datadir}/maven2/*
%{_mavendepmapfragdir}/*
%files javadoc
%defattr(0644,root,root,0755)
%{_javadocdir}/%{name}-%{version}
%{_javadocdir}/%{name}
%changelog
* Mon Dec 08 2008 Will Tatam <will.tatam@red61.com> 1.3.1-2
- Auto rebuild for JPackage 5 in mock
* Thu Jul 31 2008 David Walluck <dwalluck@redhat.com> 0:1.3.1-1
- 1.3.1
* Mon Feb 25 2008 Ralph Apel <r.apel at r-apel.de> - 0:1.2-1jpp
- 1.2
- Add pom and depmap frag
- Add gcj_support option
* Tue May 23 2006 Ralph Apel <r.apel at r-apel.de> - 0:1.0-1jpp
- First JPP-1.7 release