130 lines
3.6 KiB
RPMSpec
130 lines
3.6 KiB
RPMSpec
%define name xml-commons-resolver
|
||
%define version 1.1
|
||
%define release 1jpp_5fc.1
|
||
%define section free
|
||
|
||
Name: %{name}
|
||
Version: %{version}
|
||
Release: %{release}.1
|
||
Epoch: 0
|
||
Summary: Resolver subproject of xml-commons.
|
||
License: Apache Software License
|
||
URL: http://xml.apache.org/commons/
|
||
Source0: xml-commons-resolver-1.1-RHCLEAN.tar.bz2
|
||
Source1: xml-commons-resolver-resolver.sh
|
||
Source2: xml-commons-resolver-xread.sh
|
||
Source3: xml-commons-resolver-xparse.sh
|
||
Requires: jaxp_parser_impl
|
||
Requires: xml-commons-apis
|
||
BuildRequires: ant
|
||
BuildRequires: jpackage-utils >= 0:1.5
|
||
#BuildRequires: %{_bindir}/xsltproc
|
||
#BuildRequires: docbook-style-xsl
|
||
Group: Text Processing/Markup/XML
|
||
BuildArch: noarch
|
||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
||
|
||
%description
|
||
Resolver subproject of xml-commons.
|
||
|
||
%package javadoc
|
||
Summary: Javadoc for %{name}
|
||
Group: Development/Documentation
|
||
|
||
%description javadoc
|
||
Javadoc for %{name}.
|
||
|
||
%prep
|
||
%setup -q
|
||
# remove all binary libs and prebuilt javadocs
|
||
find . -name "*.jar" -exec rm -f {} \;
|
||
rm -rf docs
|
||
|
||
%build
|
||
perl -p -i -e 's|call Resolver|call resolver|g' resolver.xml
|
||
perl -p -i -e 's|classname="org.apache.xml.resolver.Catalog"|fork="yes" classname="org.apache.xml.resolver.apps.resolver"|g' resolver.xml
|
||
perl -p -i -e 's|org.apache.xml.resolver.Catalog|org.apache.xml.resolver.apps.resolver|g' src/manifest.resolver
|
||
#DOCBOOK_XSL=`rpm -ql docbook-style-xsl | grep /html/docbook.xsl \
|
||
#| sed 's#html/docbook.xsl##'`
|
||
#
|
||
#if [ -z $DOCBOOK_XSL ]; then
|
||
# echo "Unable to find docbook xsl directory"
|
||
# exit 1
|
||
#fi
|
||
|
||
#ant -Ddocbook.dir=$DOCBOOK_XSL -f resolver.xml main
|
||
ant -f resolver.xml jar javadocs
|
||
|
||
%install
|
||
rm -rf $RPM_BUILD_ROOT
|
||
|
||
# Jars
|
||
mkdir -p $RPM_BUILD_ROOT%{_javadir}
|
||
cp build/resolver.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
|
||
|
||
# Jar versioning
|
||
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
|
||
|
||
# Javadocs
|
||
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
||
cp -pr build/apidocs/resolver/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
||
|
||
# Scripts
|
||
mkdir -p $RPM_BUILD_ROOT%{_bindir}
|
||
cp %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/xml-resolver
|
||
cp %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/xml-xread
|
||
cp %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}/xml-xparse
|
||
|
||
%clean
|
||
rm -rf $RPM_BUILD_ROOT
|
||
|
||
%post javadoc
|
||
rm -f %{_javadocdir}/%{name}
|
||
ln -s %{name}-%{version} %{_javadocdir}/%{name}
|
||
|
||
%postun javadoc
|
||
if [ "$1" = "0" ]; then
|
||
rm -f %{_javadocdir}/%{name}
|
||
fi
|
||
|
||
%files
|
||
%defattr(0644,root,root,0755)
|
||
%doc KEYS LICENSE.resolver.txt
|
||
%{_javadir}/*
|
||
%attr(0755,root,root) %{_bindir}/*
|
||
|
||
%files javadoc
|
||
%defattr(0644,root,root,0755)
|
||
%{_javadocdir}/%{name}-%{version}
|
||
|
||
%changelog
|
||
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
|
||
- rebuilt
|
||
|
||
* Tue Jun 28 2005 Gary Benson <gbenson@redhat.com> 0:1.1-1jpp_5fc
|
||
- Remove jarfile from the tarball.
|
||
|
||
* Thu Nov 4 2004 Gary Benson <gbenson@redhat.com> 0:1.1-1jpp_4fc
|
||
- Build into Fedora.
|
||
|
||
* Thu Oct 28 2004 Gary Benson <gbenson@redhat.com> 0:1.1-1jpp_3fc
|
||
- Bootstrap into Fedora.
|
||
|
||
* Thu Mar 4 2004 Frank Ch. Eigler <fche@redhat.com> 0:1.1-1jpp_2rh
|
||
- RH vacuuming part II
|
||
|
||
* Wed Mar 3 2004 Frank Ch. Eigler <fche@redhat.com> 0:1.1-1jpp_1rh
|
||
- RH vacuuming
|
||
|
||
* Wed Jan 21 2004 David Walluck <david@anti-microsoft.org> 0:1.1-1jpp
|
||
- 1.1
|
||
- use perl instead of patch
|
||
- don't build docs (build fails)
|
||
|
||
* Tue May 06 2003 David Walluck <david@anti-microsoft.org> 0:1.0-2jpp
|
||
- update for JPackage 1.5
|
||
|
||
* Wed Nov 13 2002 Ville Skytt<74> <ville.skytta at iki.fi> - 1.0-1jpp
|
||
- Follow upstream changes, split out of xml-commons.
|
||
|