- Update with newest jpp version

- Clean up spec file for Fedora Review
This commit is contained in:
Matt Wringe 2007-04-20 19:46:16 +00:00
parent b42f71ecb2
commit 3545238b33

View File

@ -31,49 +31,52 @@
#%define _with_gcj_support 1
%define gcj_support %{?_with_gcj_support:1}%{!?_with_gcj_support:%{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support:%{_gcj_support}}%{!?_gcj_support:0}}}
%define bootstrap %{?_with_bootstrap:1}%{!?_with_bootstrap:%{?_without_bootstrap:0}%{!?_without_bootstrap:%{?_bootstrap:%{_bootstrap}}%{!?_bootstrap:0}}}
%define cvs_version 2_7_1
%define section free
%define cvs_version 2_7_1
Name: xerces-j2
Version: 2.7.1
Release: 7jpp.2
Epoch: 0
Summary: Java XML parser
License: Apache Software License
URL: http://xerces.apache.org/
Group: Text Processing/Markup/XML
Source0: http://www.apache.org/dist/xml/xerces-j/Xerces-J-src.%{version}.tar.gz
Name: xerces-j2
Version: 2.7.1
Release: 9jpp.1%{?dist}
Epoch: 0
Summary: Java XML parser
License: Apache Software License
URL: http://xerces.apache.org/
Group: Text Processing/Markup/XML
Source0: http://archive.apache.org/dist/xml/xerces-j/Xerces-J-src.2.7.1.tar.gz
Source1: %{name}-version.sh
Source2: %{name}-constants.sh
Source3: XJavac.java
Source3: XJavac.java
Patch0: %{name}-build.patch
Patch1: %{name}-libgcj.patch
Obsoletes: xerces-j2-dom3
Provides: jaxp_parser_impl
Provides: xerces-j2-dom3
Requires: xml-commons-apis >= 0:1.3
Requires: xml-commons-resolver >= 1.1
BuildRequires: java-devel
BuildRequires: ant >= 0:1.6
BuildRequires: jpackage-utils >= 0:1.6
BuildRequires: jaxp_parser_impl
BuildRequires: xml-commons-resolver >= 0:1.1
BuildRequires: xml-commons-apis >= 0:1.3
# xml-stylbook is not yet in FC
#BuildRequires: xml-stylebook
Obsoletes: xerces-j2-dom3 < %{epoch}:%{version}-%{release}
Provides: jaxp_parser_impl
Provides: xerces-j2-dom3 = %{epoch}:%{version}-%{release}
Requires: xml-commons-apis >= 0:1.3
Requires: xml-commons-resolver >= 1.1
BuildRequires: java-devel
BuildRequires: ant >= 0:1.6
BuildRequires: jpackage-utils >= 0:1.6
BuildRequires: jaxp_parser_impl
BuildRequires: xml-commons-resolver >= 0:1.1
BuildRequires: xml-commons-apis >= 0:1.3
%if ! %{bootstrap}
# xml-stylebook is not in Fedora yet
#BuildRequires: xml-stylebook
BuildRequires: xalan-j2
%endif
Requires(post): /usr/sbin/update-alternatives jaxp_parser_impl
Requires(preun): /usr/sbin/update-alternatives jaxp_parser_impl
%if ! %{gcj_support}
BuildArch: noarch
BuildArch: noarch
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel >= 1.0.31
Requires(post): java-gcj-compat >= 1.0.31
Requires(postun): java-gcj-compat >= 1.0.31
BuildRequires: java-devel-gcj >= 1.5.0
Requires(post): java-gcj >= 1.5.0
Requires(postun): java-gcj >= 1.5.0
%endif
%description
@ -97,49 +100,49 @@ Drafts. For more information, refer to the DOM Level 3 Implementation
page.
%package javadoc-impl
Summary: Javadoc for %{name} implementation
Group: Development/Documentation
Requires(post): /bin/rm /bin/ln
Summary: Javadoc for %{name} implementation
Group: Development/Documentation
%description javadoc-impl
Javadoc for %{name} implementation.
%package javadoc-apis
Summary: Javadoc for %{name} apis
Group: Development/Documentation
Obsoletes: xerces-j2-dom3-javadoc
Requires(post): /bin/rm /bin/ln
Summary: Javadoc for %{name} apis
Group: Development/Documentation
Obsoletes: xerces-j2-dom3-javadoc < %{epoch}:%{release}-%{version}
Provides: xerces-j2-dom3-javadoc = %{epoch}:%{release}-%{version}
%description javadoc-apis
Javadoc for %{name} apis.
%package javadoc-xni
Summary: Javadoc for %{name} xni
Group: Development/Documentation
Requires(post): /bin/rm /bin/ln
Summary: Javadoc for %{name} xni
Group: Development/Documentation
%description javadoc-xni
Javadoc for %{name} xni.
%package javadoc-other
Summary: Javadoc for other %{name} components
Group: Development/Documentation
Requires(post): /bin/rm /bin/ln
Summary: Javadoc for other %{name} components
Group: Development/Documentation
%description javadoc-other
Javadoc for other %{name} components.
%package demo
Summary: Demo for %{name}
Group: Development/Testing
Requires: %{name} = %{epoch}:%{version}-%{release}
%if ! %{gcj_support}
%package manual
Summary: Documents for %{name}
Group: Development/Documentation
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel >= 1.0.31
Requires(post): java-gcj-compat >= 1.0.31
Requires(postun): java-gcj-compat >= 1.0.31
%description manual
%{summary}.
%endif
%package demo
Summary: Demo for %{name}
Group: Development/Testing
Requires: %{name} = %{epoch}:%{version}-%{release}
%description demo
Demonstrations and samples for %{name}.
@ -147,7 +150,7 @@ Demonstrations and samples for %{name}.
Summary: Additional utility scripts for %{name}
Group: Text Processing/Markup/XML
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: jpackage-utils >= 0:1.6
Requires: jpackage-utils >= 0:1.6
%description scripts
Additional utility scripts for %{name}.
@ -160,6 +163,7 @@ mkdir -p tools/org/apache/xerces/util
cp -a %{SOURCE3} tools/org/apache/xerces/util
%patch1 -p0 -b .libgcj
%{__sed} -i 's/\r//' NOTICE
%build
pushd tools
@ -167,19 +171,42 @@ javac -classpath $(build-classpath ant) org/apache/xerces/util/XJavac.java
mkdir bin && jar cf bin/xjavac.jar org/apache/xerces/util/XJavac.class
ln -sf $(build-classpath xml-commons-apis) .
ln -sf $(build-classpath xml-commons-resolver) .
%if ! %{bootstrap}
# Fedora does not have xml-stylebook yet
#ln -sf $(build-classpath xml-stylebook) .
ln -sf $(build-classpath xalan-j2) xalan.jar
%endif
popd
%if ! %{gcj_support}
export CLASSPATH=$(build-classpath xml-stylebook):tools/bin/xjavac.jar
#%if ! %{gcj_support}
# Fedora does not have xml-stylebook yet
#export CLASSPATH=$(build-classpath xml-stylebook):tools/bin/xjavac.jar:build/xercesImpl.jar
export CLASSPATH=tools/bin/xjavac.jar:build/xercesImpl.jar
export ANT_OPTS="-Xmx256m -Djava.endorsed.dirs=$(pwd)/tools -Djava.awt.headless=true -Dbuild.sysclasspath=first -Ddisconnected=true"
%endif
#%endif
%if %{bootstrap}
ant \
-Dbuild.compiler=modern \
-Dtools.dir=%{_javadir} \
-Djar.apis=xml-commons-apis.jar \
-Djar.resolver=xml-commons-resolver.jar \
clean jars javadocs sampjar
#docs cannot be built due missing xml-stylebook in FC
-Dbuild.compiler=modern \
-Dtools.dir=%{_javadir} \
-Djar.apis=xml-commons-apis.jar \
-Djar.resolver=xml-commons-resolver.jar \
clean jars javadocs
%else
%if ! %{gcj_support}
ant \
-Dbuild.compiler=modern \
-Djar.apis=xml-commons-apis.jar \
-Djar.resolver=xml-commons-resolver.jar \
# -Ddoc.generator.package=./tools/xml-stylebook.jar \
clean jars javadocs docs sampjar
%else
ant \
-Dbuild.compiler=modern \
-Djar.apis=xml-commons-apis.jar \
-Djar.resolver=xml-commons-resolver.jar \
clean jars javadocs
%endif
%endif
%install
rm -rf $RPM_BUILD_ROOT
@ -213,6 +240,19 @@ ln -s %{name}-other-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}-other
rm -rf build/docs/javadocs
# manual
%if ! %{gcj_support} && ! %{bootstrap}
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
cp -pr build/docs/* $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
cp -p ISSUES $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
cp -p LICENSE* $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
cp -p NOTICE $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
cp -p README $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
cp -p STATUS $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
cp -p TODO $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
%endif
# scripts
mkdir -p $RPM_BUILD_ROOT%{_bindir}
cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/%{name}-version
@ -228,7 +268,6 @@ cp -pr data $RPM_BUILD_ROOT%{_datadir}/%{name}
ln -s %{_sysconfdir}/alternatives \
$RPM_BUILD_ROOT%{_javadir}/jaxp_parser_impl.jar
%if %{gcj_support}
%{_bindir}/aot-compile-rpm
%endif
@ -236,23 +275,6 @@ ln -s %{_sysconfdir}/alternatives \
%clean
rm -rf $RPM_BUILD_ROOT
%post javadoc-apis
rm -f %{_javadocdir}/%{name}-apis
ln -s %{name}-apis-%{version} %{_javadocdir}/%{name}-apis
%post javadoc-impl
rm -f %{_javadocdir}/%{name}-impl
ln -s %{name}-impl-%{version} %{_javadocdir}/%{name}-impl
%post javadoc-other
rm -f %{_javadocdir}/%{name}-other
ln -s %{name}-other-%{version} %{_javadocdir}/%{name}-other
%post javadoc-xni
rm -f %{_javadocdir}/%{name}-xni
ln -s %{name}-xni-%{version} %{_javadocdir}/%{name}-xni
%post
update-alternatives --install %{_javadir}/jaxp_parser_impl.jar \
jaxp_parser_impl %{_javadir}/%{name}.jar 40
@ -270,24 +292,24 @@ fi
update-alternatives --remove jaxp_parser_impl %{_javadir}/%{name}.jar
} >/dev/null 2>&1 || :
%if %{gcj_support}
%postun
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
%{_bindir}/rebuild-gcj-db
fi
%endif
%if %{gcj_support}
%post demo
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
%{_bindir}/rebuild-gcj-db
fi
%endif
%postun demo
%if %{gcj_support}
%postun demo
if [ -x %{_bindir}/rebuild-gcj-db ]
then
%{_bindir}/rebuild-gcj-db
@ -296,7 +318,7 @@ fi
%files
%defattr(0644,root,root,0755)
%doc LICENSE README ISSUES STATUS TODO
%doc [A-Z]*
%{_javadir}/%{name}*.jar
%{_javadir}/dom3-%{name}*.jar
%ghost %{_javadir}/jaxp_parser_impl.jar
@ -308,22 +330,28 @@ fi
%files javadoc-impl
%defattr(0644,root,root,0755)
%doc %{_javadocdir}/%{name}-impl-%{version}
%ghost %doc %{_javadocdir}/%{name}-impl
%doc %{_javadocdir}/%{name}-impl
%files javadoc-apis
%defattr(0644,root,root,0755)
%doc %{_javadocdir}/%{name}-apis-%{version}
%ghost %doc %{_javadocdir}/%{name}-apis
%doc %{_javadocdir}/%{name}-apis
%files javadoc-other
%defattr(0644,root,root,0755)
%doc %{_javadocdir}/%{name}-other-%{version}
%ghost %doc %{_javadocdir}/%{name}-other
%doc %{_javadocdir}/%{name}-other
%files javadoc-xni
%defattr(0644,root,root,0755)
%doc %{_javadocdir}/%{name}-xni-%{version}
%ghost %doc %{_javadocdir}/%{name}-xni
%doc %{_javadocdir}/%{name}-xni
%if ! %{gcj_support}
%files manual
%defattr(0644,root,root,0755)
%doc %{_docdir}/%{name}-%{version}/[a-z]*
%endif
%files demo
%defattr(0644,root,root,0755)
@ -339,6 +367,10 @@ fi
%changelog
* Wed Mar 28 2007 Matt Wringe <mwringe@redhat.com> 0:2.7.1-9jpp.1
- Update with newest jpp version
- Clean up spec file for Fedora Review
* Sun Aug 13 2006 Warren Togami <wtogami@redhat.com> 0:2.7.1-7jpp.2
- fix typo in preun req
@ -422,7 +454,7 @@ fi
- Use absolute paths for rebuild-gcj-db.
* Thu May 5 2005 Gary Benson <gbenson@redhat.com> 0:2.6.2-4jpp_5fc
- Add dependencies for %post and %postun scriptlets (#156901).
- Add dependencies for %%post and %%postun scriptlets (#156901).
* Fri Apr 29 2005 Gary Benson <gbenson@redhat.com> 0:2.6.2-4jpp_4fc
- BC-compile.
@ -462,7 +494,7 @@ fi
from <mwringe@redhat.com> and <vivekl@redhat.com>.
* Mon Jun 21 2004 Vivek Lakshmanan <vivekl@redhat.com> 0:2.6.2-2jpp_2rh
- Added new Source1 URL and added new %setup to expand it under the
- Added new Source1 URL and added new %%setup to expand it under the
expanded result of Source0.
- Updated Patch0 to fix version discrepancies.
- Added build requirement for xml-commons-apis
@ -564,7 +596,7 @@ fi
- vendor, distribution, group tags
- provides jaxp_parser_impl
- dropped api jar
- renamed lone jar to %{name}.jar
- renamed lone jar to %%{name}.jar
- priority bumped to 40
- fixed stylebook build (add xerces-j1 in classpath)