Fix FTBFS and rpmlint warnings. Don't package javadoc in manual package.

This commit is contained in:
mbooth 2010-12-12 15:43:20 +00:00
parent a05695329a
commit 9d9fc5db01

View File

@ -1,57 +1,34 @@
# 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.
#
Name: xml-commons-apis
Version: 1.4.01
Release: 2%{?dist}
Summary: APIs for DOM, SAX, and JAXP
Group: Development/Libraries
License: ASL 2.0 and W3C and Public Domain
URL: http://xml.apache.org/commons/
Name: xml-commons-apis
Summary: APIs for DOM, SAX, and JAXP
Version: 1.4.01
Release: 1%{?dist}
Epoch: 0
License: ASL 2.0 and W3C and Public Domain
URL: http://xml.apache.org/commons/
Source0: xml-commons-external-%{version}-src.tar.gz
# svn export http://svn.apache.org/repos/asf/xml/commons/tags/xml-commons-external-1_4_01/java/external/
# tar czf xml-commons-external-1.4.01-src.tar.gz external
Source1: %{name}-MANIFEST.MF
Source2: %{name}-ext-MANIFEST.MF
Requires: jpackage-utils >= 0:1.5
BuildRequires: jpackage-utils >= 0:1.5
BuildRequires: ant
Group: Text Processing/Markup/XML
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
# From source control because the published tarball doesn't include some docs:
# svn export http://svn.apache.org/repos/asf/xml/commons/tags/xml-commons-external-1_4_01/java/external/
# tar czf xml-commons-external-1.4.01-src.tar.gz external
Source0: xml-commons-external-%{version}-src.tar.gz
Source1: %{name}-MANIFEST.MF
Source2: %{name}-ext-MANIFEST.MF
Obsoletes: xml-commons <= 0:1.3.02
Provides: xml-commons = %{epoch}:%{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Provides: jaxp = 1.3
Provides: xml-commons-jaxp-1.3-apis = %{epoch}:%{version}-%{release}
BuildArch: noarch
BuildRequires: java-devel >= 1:1.6.0
BuildRequires: jpackage-utils
BuildRequires: ant
BuildRequires: zip
Requires: java
Requires: jpackage-utils
Obsoletes: xml-commons < %{version}-%{release}
Provides: xml-commons = %{version}-%{release}
# TODO: Ugh, this next line should be dropped since it actually provides JAXP 1.4 now...
Provides: xml-commons-jaxp-1.3-apis = %{version}-%{release}
%description
xml-commons-apis is designed to organize and have common packaging for
@ -59,38 +36,37 @@ the various externally-defined standard interfaces for XML. This
includes the DOM, SAX, and JAXP.
%package manual
Summary: Manual for %{name}
Group: Text Processing/Markup/XML
Summary: Manual for %{name}
Group: Documentation
%description manual
Manual for %{name}.
%{summary}.
%package javadoc
Summary: Javadoc for %{name}
Group: Development/Documentation
Summary: Javadoc for %{name}
Group: Documentation
%description javadoc
Javadoc for %{name}.
# -----------------------------------------------------------------------------
%{summary}.
%prep
%setup -q -n external
# remove all binary libs and prebuilt javadocs
rm -rf `find . -name "*.jar" -o -name "*.gz"`
rm -rf build
# Make sure upstream hasn't sneaked in any jars we don't know about
find -name '*.class' -exec rm -f '{}' \;
find -name '*.jar' -exec rm -f '{}' \;
# -----------------------------------------------------------------------------
# Fix file encodings
iconv -f iso8859-1 -t utf-8 LICENSE.dom-documentation.txt > \
LICENSE.dom-doc.temp && mv -f LICENSE.dom-doc.temp LICENSE.dom-documentation.txt
iconv -f iso8859-1 -t utf-8 LICENSE.dom-software.txt > \
LICENSE.dom-sof.temp && mv -f LICENSE.dom-sof.temp LICENSE.dom-software.txt
%build
export OPT_JAR_LIST="./external/build/xml-apis.jar"
ant jar javadoc
# -----------------------------------------------------------------------------
ant -Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5 jar javadoc
%install
rm -rf $RPM_BUILD_ROOT
rm -rf %{buildroot}
# inject OSGi manifests
mkdir -p META-INF
@ -102,42 +78,34 @@ touch META-INF/MANIFEST.MF
zip -u build/xml-apis-ext.jar META-INF/MANIFEST.MF
# Jars
mkdir -p $RPM_BUILD_ROOT%{_javadir}
cp -p build/xml-apis.jar \
$RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
cp -p build/xml-apis-ext.jar \
$RPM_BUILD_ROOT%{_javadir}/%{name}-ext-%{version}.jar
install -pD -T build/xml-apis.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
install -pD -T build/xml-apis-ext.jar %{buildroot}%{_javadir}/%{name}-ext-%{version}.jar
# Jar versioning
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in %{name}-%{version}.jar; do ln -sf ${jar} dom3-${jar}; done)
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
(cd %{buildroot}%{_javadir} && for jar in %{name}-%{version}.jar; do ln -sf ${jar} dom3-${jar}; done)
(cd %{buildroot}%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
# for better interoperability with the jpp apis packages
ln -sf %{name}.jar ${RPM_BUILD_ROOT}%{_javadir}/jaxp13.jar
ln -sf %{name}.jar ${RPM_BUILD_ROOT}%{_javadir}/jaxp.jar
ln -sf %{name}.jar ${RPM_BUILD_ROOT}%{_javadir}/xml-commons-jaxp-1.3-apis.jar
ln -sf %{name}.jar %{buildroot}%{_javadir}/jaxp13.jar
ln -sf %{name}.jar %{buildroot}%{_javadir}/jaxp.jar
ln -sf %{name}.jar %{buildroot}%{_javadir}/xml-commons-jaxp-1.3-apis.jar
# Javadocs
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
mkdir -p %{buildroot}%{_javadocdir}/%{name}-%{version}
cp -pr build/docs/javadoc/* \
$RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
%{buildroot}%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}
# prevent apis javadoc from being included in doc
rm -rf docs/javadoc
# -----------------------------------------------------------------------------
rm -rf build/docs/javadoc
%clean
rm -rf $RPM_BUILD_ROOT
# -----------------------------------------------------------------------------
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc LICENSE NOTICE
%doc LICENSE.dom-documentation.txt README.dom.txt
%doc LICENSE.dom-software.txt
%doc LICENSE.dom-software.txt LICENSE.sac.html
%doc LICENSE.sax.txt README-sax README.sax.txt
%{_javadir}/*
@ -149,9 +117,11 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root,-)
%{_javadocdir}/*
# -----------------------------------------------------------------------------
%changelog
* Sun Dec 12 2010 Mat Booth <fedora@matbooth.co.uk> 1.4.01-2
- Fix FTBFS and rpmlint warnings.
- Don't package javadoc in manual package.
* Sat Jan 9 2010 Alexander Kurtakov <akurtako@redhat.com> 0:1.4.01-1
- Update to 1.4.01.
@ -266,34 +236,3 @@ rm -rf $RPM_BUILD_ROOT
* Tue Mar 2 2004 Frank Ch. Eigler <fche@redhat.com> - 0:1.0-0.b2.6jpp_1rh
- RH vacuuming
* Thu Aug 26 2003 Ralph Apel <r.apel at r-apel.de> - 0:1.0-0.b2.7jpp
- Build with ant-1.6.2
* Mon May 5 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:1.0-0.b2.6jpp
- Fix non-versioned javadoc symlinking.
* Mon Apr 21 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:1.0-0.b2.5jpp
- Fix xml-which script.
- Include non-versioned javadoc symlinks.
- Add Epoch: 0.
- Fix jpackage-utils dependency versions.
* Thu Mar 13 2003 Nicolas Mailhot <Nicolas.Mailhot at jpackage.org> - 1.0-0.b2.4jpp
- For jpackage-utils 1.5
* Wed Nov 13 2002 Ville Skyttä <ville.skytta at iki.fi> - 1.0-0.b2.3jpp
- Following upstream changes, resolver is now built from its own package.
* Sun Nov 3 2002 Ville Skyttä <ville.skytta at iki.fi> 1.0-0.b2.2jpp
- Split resolver into its own subpackage.
- Fix Group, Vendor and Distribution tags.
- Use sed instead of bash 2 extension when symlinking jars.
- Add resolver and which shell scripts.
* Thu Jul 11 2002 Henri Gomez <hgomez@users.sourceforge.net> 1.0-0.b2.1jpp
- 1.0.b2
- get tarball from xml.apache.org
- add macro section
* Fri Jan 18 2002 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.0-0.b1.1jpp
- first jpp release