From 42ee3c5aa22b47db07523717a2c41dc5a91fd22b Mon Sep 17 00:00:00 2001 From: mbooth Date: Tue, 5 Jan 2010 18:41:32 +0000 Subject: [PATCH] - Update to 2.9.0: This is the version Eclipse expects, previously the OSGi manifest was lying about its version :-o - Enable manual sub-package now xml-stylebook is in Fedora. - Drop GCJ support. - Minor changes to spec to make it more conforming to the guidelines. - Drop the libgcj patch, we don't seem to need it anymore. - Add the OSGi manifest as part of the build instead of the install. - Fix packaging bug RHBZ #472646. --- .cvsignore | 2 +- XJavac.java | 101 ++++++----- sources | 2 +- xerces-j2-MANIFEST.MF | 4 +- xerces-j2-build.patch | 83 +++------ xerces-j2-libgcj.patch | 17 -- xerces-j2.spec | 394 ++++++++++++++++------------------------- 7 files changed, 239 insertions(+), 364 deletions(-) delete mode 100644 xerces-j2-libgcj.patch diff --git a/.cvsignore b/.cvsignore index 070ea4e..f4f1373 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -Xerces-J-src.2.7.1.tar.gz +Xerces-J-src.2.9.0.tar.gz diff --git a/XJavac.java b/XJavac.java index a8eaa0b..d52f6a0 100644 --- a/XJavac.java +++ b/XJavac.java @@ -1,9 +1,10 @@ /* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -27,17 +28,16 @@ import java.util.Properties; import java.util.Locale; /** - * The implementation of the javac compiler for IBM JDK 1.4 + * The implementation of the javac compiler for JDK 1.4 and above * * The purpose of this task is to diagnose whether we're - * running on an IBM 1.4 JVM; if we are, to + * running on a 1.4 or above JVM; if we are, to * set up the bootclasspath such that the build will * succeed; if we aren't, then invoke the Javac12 * task. * * @author Neil Graham, IBM */ - public class XJavac extends Javac { /** @@ -57,48 +57,19 @@ public class XJavac extends Javac { } // this is supposed to be provided by all JVM's from time immemorial String vendor = ((String)props.get("java.vendor")).toUpperCase(Locale.ENGLISH); - if(vendor.indexOf("IBM") >= 0){ - // we're on an IBM 1.4; fiddle with the bootclasspath. - Path bcp = createBootclasspath(); - String javaHome = System.getProperty("java.home"); - StringBuffer bcpMember = new StringBuffer(); - bcpMember.append(javaHome).append("/lib/charsets.jar:"); - bcp.createPathElement().setPath(bcpMember.toString()); - bcpMember.replace(javaHome.length(), bcpMember.length(), "/lib/core.jar:"); - bcp.createPathElement().setPath(bcpMember.toString()); - bcpMember.replace(javaHome.length(), bcpMember.length(), "/lib/graphics.jar:"); - bcp.createPathElement().setPath(bcpMember.toString()); - bcpMember.replace(javaHome.length(), bcpMember.length(), "/lib/javaws.jar:"); - bcp.createPathElement().setPath(bcpMember.toString()); - bcpMember.replace(javaHome.length(), bcpMember.length(), "/lib/jaws.jar:"); - bcp.createPathElement().setPath(bcpMember.toString()); - bcpMember.replace(javaHome.length(), bcpMember.length(), "/lib/security.jar:"); - bcp.createPathElement().setPath(bcpMember.toString()); - bcpMember.replace(javaHome.length(), bcpMember.length(), "/lib/server.jar:"); - bcp.createPathElement().setPath(bcpMember.toString()); - bcpMember.replace(javaHome.length(), bcpMember.length(), "/lib/ext/JawBridge.jar:"); - bcp.createPathElement().setPath(bcpMember.toString()); - bcpMember.replace(javaHome.length(), bcpMember.length(), "/lib/ext/gskikm.jar:"); - bcp.createPathElement().setPath(bcpMember.toString()); - bcpMember.replace(javaHome.length(), bcpMember.length(), "/lib/ext/ibmjceprovider.jar:"); - bcp.createPathElement().setPath(bcpMember.toString()); - bcpMember.replace(javaHome.length(), bcpMember.length(), "/lib/ext/indicim.jar:"); - bcp.createPathElement().setPath(bcpMember.toString()); - bcpMember.replace(javaHome.length(), bcpMember.length(), "/lib/ext/jaccess.jar:"); - bcp.createPathElement().setPath(bcpMember.toString()); - bcpMember.replace(javaHome.length(), bcpMember.length(), "/lib/ext/ldapsec.jar:"); - bcp.createPathElement().setPath(bcpMember.toString()); - bcpMember.replace(javaHome.length(), bcpMember.length(), "/lib/ext/oldcertpath.jar"); - bcp.createPathElement().setPath(bcpMember.toString()); - setBootclasspath(bcp); + if (vendor.indexOf("IBM") >= 0) { + // we're on an IBM 1.4 or higher; fiddle with the bootclasspath. + setBootclasspath(createIBMJDKBootclasspath()); } // need to do special things for Sun too and also - // for Apple, HP and Blackdown: a Linux port of Sun Java + // for Apple, HP, SableVM, Kaffe and Blackdown: a Linux port of Sun Java else if( (vendor.indexOf("SUN") >= 0) || (vendor.indexOf("BLACKDOWN") >= 0) || (vendor.indexOf("APPLE") >= 0) || - (vendor.indexOf("HEWLETT-PACKARD") >= 0)) { - // we're on an SUN 1.4; fiddle with the bootclasspath. + (vendor.indexOf("HEWLETT-PACKARD") >= 0) || + (vendor.indexOf("KAFFE") >= 0) || + (vendor.indexOf("SABLE") >= 0)) { + // we're on an SUN 1.4 or higher; fiddle with the bootclasspath. // since we can't eviscerate XML-related info here, // we must use the classpath Path bcp = createBootclasspath(); @@ -115,6 +86,46 @@ public class XJavac extends Javac { super.execute(); } + /** + * Creates bootclasspath for IBM JDK 1.4 and above. + */ + private Path createIBMJDKBootclasspath() { + Path bcp = createBootclasspath(); + String javaHome = System.getProperty("java.home"); + StringBuffer bcpMember = new StringBuffer(); + bcpMember.append(javaHome).append("/lib/charsets.jar:"); + bcp.createPathElement().setPath(bcpMember.toString()); + bcpMember.replace(javaHome.length(), bcpMember.length(), "/lib/core.jar:"); + bcp.createPathElement().setPath(bcpMember.toString()); + bcpMember.replace(javaHome.length(), bcpMember.length(), "/lib/vm.jar:"); + bcp.createPathElement().setPath(bcpMember.toString()); + bcpMember.replace(javaHome.length(), bcpMember.length(), "/lib/graphics.jar:"); + bcp.createPathElement().setPath(bcpMember.toString()); + bcpMember.replace(javaHome.length(), bcpMember.length(), "/lib/javaws.jar:"); + bcp.createPathElement().setPath(bcpMember.toString()); + bcpMember.replace(javaHome.length(), bcpMember.length(), "/lib/jaws.jar:"); + bcp.createPathElement().setPath(bcpMember.toString()); + bcpMember.replace(javaHome.length(), bcpMember.length(), "/lib/security.jar:"); + bcp.createPathElement().setPath(bcpMember.toString()); + bcpMember.replace(javaHome.length(), bcpMember.length(), "/lib/server.jar:"); + bcp.createPathElement().setPath(bcpMember.toString()); + bcpMember.replace(javaHome.length(), bcpMember.length(), "/lib/ext/JawBridge.jar:"); + bcp.createPathElement().setPath(bcpMember.toString()); + bcpMember.replace(javaHome.length(), bcpMember.length(), "/lib/ext/gskikm.jar:"); + bcp.createPathElement().setPath(bcpMember.toString()); + bcpMember.replace(javaHome.length(), bcpMember.length(), "/lib/ext/ibmjceprovider.jar:"); + bcp.createPathElement().setPath(bcpMember.toString()); + bcpMember.replace(javaHome.length(), bcpMember.length(), "/lib/ext/indicim.jar:"); + bcp.createPathElement().setPath(bcpMember.toString()); + bcpMember.replace(javaHome.length(), bcpMember.length(), "/lib/ext/jaccess.jar:"); + bcp.createPathElement().setPath(bcpMember.toString()); + bcpMember.replace(javaHome.length(), bcpMember.length(), "/lib/ext/ldapsec.jar:"); + bcp.createPathElement().setPath(bcpMember.toString()); + bcpMember.replace(javaHome.length(), bcpMember.length(), "/lib/ext/oldcertpath.jar"); + bcp.createPathElement().setPath(bcpMember.toString()); + return bcp; + } + /** * Checks whether the JDK version is 1.4 or higher. If it's not * JDK 1.4 we check whether we're on a future JDK by checking diff --git a/sources b/sources index 92e8f2f..e41e160 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -487701cad13bcf87cec21ed2d782ca45 Xerces-J-src.2.7.1.tar.gz +bd43e57ec7105acc9f13072e0208d445 Xerces-J-src.2.9.0.tar.gz diff --git a/xerces-j2-MANIFEST.MF b/xerces-j2-MANIFEST.MF index 905f287..dda5d50 100644 --- a/xerces-j2-MANIFEST.MF +++ b/xerces-j2-MANIFEST.MF @@ -2,10 +2,10 @@ Manifest-Version: 1.0 Bundle-RequiredExecutionEnvironment: J2SE-1.2 Bundle-SymbolicName: org.apache.xerces Bundle-ManifestVersion: 2 -Bundle-Name: %Bundle-Name.0 +Bundle-Name: Apache Xerces-J Bundle-Localization: plugin Bundle-Version: 2.9.0.v200909240008 -Bundle-Vendor: %Bundle-Vendor.0 +Bundle-Vendor: Apache Software Foundation Require-Bundle: system.bundle,javax.xml;bundle-version="[1.3.4,2.0.0)" ;visibility:=reexport,org.apache.xml.resolver;bundle-version="[1.2.0, 2.0.0)";visibility:=reexport,org.apache.xml.serializer;bundle-version diff --git a/xerces-j2-build.patch b/xerces-j2-build.patch index 681359e..ae4f2de 100644 --- a/xerces-j2-build.patch +++ b/xerces-j2-build.patch @@ -1,25 +1,6 @@ ---- build.xml.orig 2005-07-26 16:09:07.000000000 -0400 -+++ build.xml 2006-08-11 17:57:09.000000000 -0400 -@@ -19,7 +19,8 @@ - - - -- -+ - - - - - - - +- - -@@ -354,9 +333,10 @@ - - - -+ - - - -@@ -997,20 +977,6 @@ + token="@@VERSION@@" value="${parser.Name} ${parser.Version}"/> +@@ -1181,28 +1158,6 @@ @@ -84,16 +45,24 @@ - - - - -- + diff --git a/xerces-j2-libgcj.patch b/xerces-j2-libgcj.patch deleted file mode 100644 index c159df0..0000000 --- a/xerces-j2-libgcj.patch +++ /dev/null @@ -1,17 +0,0 @@ -Also apply the xjavac classpath hack when running under libgcj. - - http://issues.apache.org/bugzilla/show_bug.cgi?id=34551 - http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=152255 - ---- tools/org/apache/xerces/util/XJavac.java~ 2005-06-10 10:18:47 +0100 -+++ tools/org/apache/xerces/util/XJavac.java 2005-06-10 11:14:35 +0100 -@@ -97,7 +97,8 @@ - else if( (vendor.indexOf("SUN") >= 0) || - (vendor.indexOf("BLACKDOWN") >= 0) || - (vendor.indexOf("APPLE") >= 0) || -- (vendor.indexOf("HEWLETT-PACKARD") >= 0)) { -+ (vendor.indexOf("HEWLETT-PACKARD") >= 0) || -+ (vendor.indexOf("FREE SOFTWARE FOUNDATION") >= 0)) { - // we're on an SUN 1.4; fiddle with the bootclasspath. - // since we can't eviscerate XML-related info here, - // we must use the classpath diff --git a/xerces-j2.spec b/xerces-j2.spec index 111a888..9d378ec 100644 --- a/xerces-j2.spec +++ b/xerces-j2.spec @@ -1,108 +1,78 @@ -# Copyright (c) 2000-2005, 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. -# +%global cvs_version 2_9_0 -#%define _with_gcj_support 1 +Name: xerces-j2 +Version: 2.9.0 +Release: 1%{?dist} +Summary: Java XML parser +Group: Development/Libraries/Java +License: ASL 2.0 +URL: http://xerces.apache.org/xerces2-j/ -%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}}} +Source0: http://archive.apache.org/dist/xml/xerces-j/source/Xerces-J-src.%{version}.tar.gz +Source1: %{name}-version.sh +Source2: %{name}-constants.sh -%define cvs_version 2_7_1 +# Custom javac ant task used by the build +Source3: https://svn.apache.org/repos/asf/xerces/java/tags/Xerces-J_%{cvs_version}/tools/src/XJavac.java -Name: xerces-j2 -Version: 2.7.1 -Release: 12.3%{?dist} -Epoch: 0 -Summary: Java XML parser -License: ASL 2.0 -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 -Source4: %{name}-MANIFEST.MF -Patch0: %{name}-build.patch -Patch1: %{name}-libgcj.patch -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): chkconfig jaxp_parser_impl +# Upstream's build doesn't generate an OSGi manifest +Source4: %{name}-MANIFEST.MF + +# Patch the build so that it doesn't try to use bundled xml-commons source +Patch0: %{name}-build.patch + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildArch: noarch + +BuildRequires: java-devel +BuildRequires: jpackage-utils +BuildRequires: xml-commons-apis >= 1.3 +BuildRequires: xml-commons-resolver >= 1.1 +BuildRequires: ant +BuildRequires: xalan-j2 +BuildRequires: xml-stylebook +BuildRequires: jaxp_parser_impl +Requires: java +Requires: jpackage-utils +Requires: xml-commons-apis >= 1.3 +Requires: xml-commons-resolver >= 1.1 + +Provides: jaxp_parser_impl +Requires(post): chkconfig jaxp_parser_impl Requires(preun): chkconfig jaxp_parser_impl -%if ! %{gcj_support} -BuildArch: noarch -%endif -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -%if %{gcj_support} -BuildRequires: java-devel-gcj >= 1.5.0 -Requires(post): java-gcj >= 1.5.0 -Requires(postun): java-gcj >= 1.5.0 -%endif - %description -Welcome to the future! Xerces2 is the next generation of high -performance, fully compliant XML parsers in the Apache Xerces family. -This new version of Xerces introduces the Xerces Native Interface (XNI), -a complete framework for building parser components and configurations -that is extremely modular and easy to program. +Welcome to the future! Xerces2 is the next generation of high performance, +fully compliant XML parsers in the Apache Xerces family. This new version of +Xerces introduces the Xerces Native Interface (XNI), a complete framework for +building parser components and configurations that is extremely modular and +easy to program. -The Apache Xerces2 parser is the reference implementation of XNI but -other parser components, configurations, and parsers can be written -using the Xerces Native Interface. For complete design and -implementation documents, refer to the XNI Manual. +The Apache Xerces2 parser is the reference implementation of XNI but other +parser components, configurations, and parsers can be written using the Xerces +Native Interface. For complete design and implementation documents, refer to +the XNI Manual. -Xerces 2 is a fully conforming XML Schema processor. For more -information, refer to the XML Schema page. +Xerces2 is a fully conforming XML Schema processor. For more information, +refer to the XML Schema page. -Xerces 2 also provides a partial implementation of Document Object Model -Level 3 Core, Load and Save and Abstract Schemas [deprecated] Working -Drafts. For more information, refer to the DOM Level 3 Implementation -page. +Xerces2 also provides a complete implementation of the Document Object Model +Level 3 Core and Load/Save W3C Recommendations and provides a complete +implementation of the XML Inclusions (XInclude) W3C Recommendation. It also +provides support for OASIS XML Catalogs v1.1. + +Xerces2 is able to parse documents written according to the XML 1.1 +Recommendation, except that it does not yet provide an option to enable +normalization checking as described in section 2.13 of this specification. It +also handles namespaces according to the XML Namespaces 1.1 Recommendation, +and will correctly serialize XML 1.1 documents if the DOM level 3 load/save +APIs are in use. %package javadoc-impl Summary: Javadoc for %{name} implementation Group: Development/Documentation +Requires: %{name} = %{version}-%{release} %description javadoc-impl Javadoc for %{name} implementation. @@ -110,8 +80,7 @@ Javadoc for %{name} implementation. %package javadoc-apis Summary: Javadoc for %{name} apis Group: Development/Documentation -Obsoletes: xerces-j2-dom3-javadoc < %{epoch}:%{release}-%{version} -Provides: xerces-j2-dom3-javadoc = %{epoch}:%{release}-%{version} +Requires: %{name} = %{version}-%{release} %description javadoc-apis Javadoc for %{name} apis. @@ -119,6 +88,7 @@ Javadoc for %{name} apis. %package javadoc-xni Summary: Javadoc for %{name} xni Group: Development/Documentation +Requires: %{name} = %{version}-%{release} %description javadoc-xni Javadoc for %{name} xni. @@ -126,23 +96,23 @@ Javadoc for %{name} xni. %package javadoc-other Summary: Javadoc for other %{name} components Group: Development/Documentation +Requires: %{name} = %{version}-%{release} %description javadoc-other Javadoc for other %{name} components. -%if ! %{gcj_support} %package manual -Summary: Documents for %{name} +Summary: Manual for %{name} Group: Development/Documentation +Requires: %{name} = %{version}-%{release} %description manual -%{summary}. -%endif +Manual for %{name}. %package demo Summary: Demo for %{name} Group: Development/Testing -Requires: %{name} = %{epoch}:%{version}-%{release} +Requires: %{name} = %{version}-%{release} %description demo Demonstrations and samples for %{name}. @@ -150,230 +120,172 @@ Demonstrations and samples for %{name}. %package scripts Summary: Additional utility scripts for %{name} Group: Text Processing/Markup/XML -Requires: %{name} = %{epoch}:%{version}-%{release} -Requires: jpackage-utils >= 0:1.6 +Requires: %{name} = %{version}-%{release} %description scripts Additional utility scripts for %{name}. %prep %setup -q -n xerces-%{cvs_version} -%patch0 -b .build +%patch0 +# Copy the custom ant tasks into place mkdir -p tools/org/apache/xerces/util cp -a %{SOURCE3} tools/org/apache/xerces/util -%patch1 -p0 -b .libgcj -%{__sed} -i 's/\r//' NOTICE +# Make sure upstream hasn't sneaked in any jars we don't know about +JARS="" +for j in `find -name "*.jar"`; do + if [ ! -L $j ]; then + JARS="$JARS $j" + fi +done +if [ ! -z "$JARS" ]; then + echo "These jars should be deleted and symlinked to system jars: $JARS" + exit 1 +fi %build +# Build custom ant tasks and jar repository needed for main build pushd tools 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 +ln -sf $(build-classpath xml-stylebook) . +ln -sf $(build-classpath xalan-j2) . popd -#%if ! %{gcj_support} -# Fedora does not have xml-stylebook yet -#export CLASSPATH=$(build-classpath xml-stylebook):tools/bin/xjavac.jar:build/xercesImpl.jar +# Build everything 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 -%if %{bootstrap} -ant \ - -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 + -Djar.serializer=xalan-j2.jar \ + -Ddoc.generator.package=tools/xml-stylebook.jar \ + clean jars javadocs docs -%install -rm -rf $RPM_BUILD_ROOT - -# inject OSGi manifests +# Inject OSGi manifest mkdir -p META-INF cp -p %{SOURCE4} META-INF/MANIFEST.MF touch META-INF/MANIFEST.MF zip -u build/xercesImpl.jar META-INF/MANIFEST.MF +%install +rm -rf %{buildroot} + # jars -mkdir -p $RPM_BUILD_ROOT%{_javadir} -cp -p build/xercesImpl.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar -(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *.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) +install -pD -T build/xercesImpl.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar +(cd %{buildroot}%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done) # javadoc -mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-impl-%{version} -cp -pr build/docs/javadocs/xerces2/* \ - $RPM_BUILD_ROOT%{_javadocdir}/%{name}-impl-%{version} -ln -s %{name}-impl-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}-impl +mkdir -p %{buildroot}%{_javadocdir}/%{name}-impl-%{version} +cp -pr build/docs/javadocs/xerces2/* %{buildroot}%{_javadocdir}/%{name}-impl-%{version} +(cd %{buildroot}%{_javadocdir} && ln -sf %{name}-impl-%{version} %{name}-impl) -mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-apis-%{version} -cp -pr build/docs/javadocs/api/* \ - $RPM_BUILD_ROOT%{_javadocdir}/%{name}-apis-%{version} -ln -s %{name}-apis-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}-apis +mkdir -p %{buildroot}%{_javadocdir}/%{name}-apis-%{version} +cp -pr build/docs/javadocs/api/* %{buildroot}%{_javadocdir}/%{name}-apis-%{version} +(cd %{buildroot}%{_javadocdir} && ln -sf %{name}-apis-%{version} %{name}-apis) -mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-xni-%{version} -cp -pr build/docs/javadocs/xni/* \ - $RPM_BUILD_ROOT%{_javadocdir}/%{name}-xni-%{version} -ln -s %{name}-xni-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}-xni +mkdir -p %{buildroot}%{_javadocdir}/%{name}-xni-%{version} +cp -pr build/docs/javadocs/xni/* %{buildroot}%{_javadocdir}/%{name}-xni-%{version} +(cd %{buildroot}%{_javadocdir} && ln -sf %{name}-xni-%{version} %{name}-xni) -mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-other-%{version} -cp -pr build/docs/javadocs/other/* \ - $RPM_BUILD_ROOT%{_javadocdir}/%{name}-other-%{version} -ln -s %{name}-other-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}-other +mkdir -p %{buildroot}%{_javadocdir}/%{name}-other-%{version} +cp -pr build/docs/javadocs/other/* %{buildroot}%{_javadocdir}/%{name}-other-%{version} +(cd %{buildroot}%{_javadocdir} && ln -sf %{name}-other-%{version} %{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} +mkdir -p %{buildroot}%{_docdir}/%{name}-%{version}/manual +cp -pr build/docs/* %{buildroot}%{_docdir}/%{name}-%{version}/manual -%endif +# other docs +cp -p LICENSE README NOTICE %{buildroot}%{_docdir}/%{name}-%{version} # scripts -mkdir -p $RPM_BUILD_ROOT%{_bindir} -cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/%{name}-version -cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/%{name}-constants +mkdir -p %{buildroot}%{_bindir} +cp -p %{SOURCE1} %{buildroot}%{_bindir}/%{name}-version +cp -p %{SOURCE2} %{buildroot}%{_bindir}/%{name}-constants +chmod 755 %{buildroot}%{_bindir}/* # demo -mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name} -cp -p build/xercesSamples.jar \ - $RPM_BUILD_ROOT%{_datadir}/%{name}/%{name}-samples.jar -cp -pr data $RPM_BUILD_ROOT%{_datadir}/%{name} +install -pD -T build/xercesSamples.jar %{buildroot}%{_datadir}/%{name}/%{name}-samples.jar +cp -pr data %{buildroot}%{_datadir}/%{name} # jaxp_parser_impl ghost symlink ln -s %{_sysconfdir}/alternatives \ - $RPM_BUILD_ROOT%{_javadir}/jaxp_parser_impl.jar - -%if %{gcj_support} -%{_bindir}/aot-compile-rpm -%endif + %{buildroot}%{_javadir}/jaxp_parser_impl.jar %clean -rm -rf $RPM_BUILD_ROOT +rm -rf %{buildroot} %post update-alternatives --install %{_javadir}/jaxp_parser_impl.jar \ jaxp_parser_impl %{_javadir}/%{name}.jar 40 -%if %{gcj_support} -if [ -x %{_bindir}/rebuild-gcj-db ] -then - %{_bindir}/rebuild-gcj-db -fi -%endif - %preun { [ $1 = 0 ] || exit 0 update-alternatives --remove jaxp_parser_impl %{_javadir}/%{name}.jar } >/dev/null 2>&1 || : -%if %{gcj_support} -%postun -if [ -x %{_bindir}/rebuild-gcj-db ] -then - %{_bindir}/rebuild-gcj-db -fi -%endif - -%if %{gcj_support} -%post demo -if [ -x %{_bindir}/rebuild-gcj-db ] -then - %{_bindir}/rebuild-gcj-db -fi -%endif - -%if %{gcj_support} -%postun demo -if [ -x %{_bindir}/rebuild-gcj-db ] -then - %{_bindir}/rebuild-gcj-db -fi -%endif - %files -%defattr(0644,root,root,0755) -%doc [A-Z]* -%{_javadir}/%{name}*.jar -%{_javadir}/dom3-%{name}*.jar +%defattr(-,root,root,-) +%dir %{_docdir}/%{name}-%{version} +%doc %{_docdir}/%{name}-%{version}/LICENSE +%doc %{_docdir}/%{name}-%{version}/NOTICE +%doc %{_docdir}/%{name}-%{version}/README +%{_javadir}/%{name}* %ghost %{_javadir}/jaxp_parser_impl.jar -%if %{gcj_support} -%attr(-,root,root) %{_libdir}/gcj/%{name}/%{name}-%{version}.jar.* -%endif - %files javadoc-impl -%defattr(0644,root,root,0755) -%doc %{_javadocdir}/%{name}-impl-%{version} -%doc %{_javadocdir}/%{name}-impl +%defattr(-,root,root,-) +%{_javadocdir}/%{name}-impl-%{version} +%{_javadocdir}/%{name}-impl %files javadoc-apis -%defattr(0644,root,root,0755) -%doc %{_javadocdir}/%{name}-apis-%{version} -%doc %{_javadocdir}/%{name}-apis +%defattr(-,root,root,-) +%{_javadocdir}/%{name}-apis-%{version} +%{_javadocdir}/%{name}-apis %files javadoc-other -%defattr(0644,root,root,0755) -%doc %{_javadocdir}/%{name}-other-%{version} -%doc %{_javadocdir}/%{name}-other +%defattr(-,root,root,-) +%{_javadocdir}/%{name}-other-%{version} +%{_javadocdir}/%{name}-other %files javadoc-xni -%defattr(0644,root,root,0755) -%doc %{_javadocdir}/%{name}-xni-%{version} -%doc %{_javadocdir}/%{name}-xni +%defattr(-,root,root,-) +%{_javadocdir}/%{name}-xni-%{version} +%{_javadocdir}/%{name}-xni -%if ! %{gcj_support} %files manual -%defattr(0644,root,root,0755) -%doc %{_docdir}/%{name}-%{version}/[a-z]* -%endif +%defattr(-,root,root,-) +%dir %{_docdir}/%{name}-%{version} +%{_docdir}/%{name}-%{version}/manual %files demo -%defattr(0644,root,root,0755) +%defattr(-,root,root,-) %{_datadir}/%{name} -%if %{gcj_support} -%attr(-,root,root) %{_libdir}/gcj/%{name}/%{name}-samples.jar.* -%endif - %files scripts -%defattr(0755,root,root,0755) +%defattr(-,root,root,-) %{_bindir}/* - %changelog +* Tue Jan 5 2010 Mat Booth - 2.9.0-1 +- Update to 2.9.0: This is the version Eclipse expects, previously the OSGi + manifest was lying about its version :-o +- Enable manual sub-package now xml-stylebook is in Fedora. +- Drop GCJ support. +- Minor changes to spec to make it more conforming to the guidelines. +- Drop the libgcj patch, we don't seem to need it anymore. +- Add the OSGi manifest as part of the build instead of the install. +- Fix packaging bug RHBZ #472646. + * Mon Jul 27 2009 Fedora Release Engineering - 0:2.7.1-12.3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild @@ -383,7 +295,7 @@ fi * Fri Jan 30 2009 Alexander Kurtakov 0:2.7.1-10.3 - Add osgi manifest. -* Thu Jul 10 2008 Tom "spot" Callaway - 0:2.7.1-10.2 +* Thu Jul 10 2008 Tom "spot" Callaway - 0:2.7.1-10.212.3 - drop repotag - fix license tag