From c017791ca22dc2628705fd10eb0f2d2feb7d0f9f Mon Sep 17 00:00:00 2001 From: CentOS Buildsys Date: Jun 28 2013 14:50:44 +0000 Subject: import ws-jaxme-0.5.2-9.el7.src.rpm --- diff --git a/.ws-jaxme.metadata b/.ws-jaxme.metadata new file mode 100644 index 0000000..201ceb0 --- /dev/null +++ b/.ws-jaxme.metadata @@ -0,0 +1 @@ +11c1986fac5dfc2849e9f3ceca1315f26a8f7e71 SOURCES/ws-jaxme-0.5.2-src.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/ws-jaxme-0.5.2-class-version15.patch b/SOURCES/ws-jaxme-0.5.2-class-version15.patch new file mode 100644 index 0000000..59954e6 --- /dev/null +++ b/SOURCES/ws-jaxme-0.5.2-class-version15.patch @@ -0,0 +1,75 @@ +diff -up ws-jaxme-0.5.2/ant/jm.xml~ ws-jaxme-0.5.2/ant/jm.xml +--- ws-jaxme-0.5.2/ant/jm.xml~ 2012-07-27 12:18:59.000000000 +0200 ++++ ws-jaxme-0.5.2/ant/jm.xml 2012-07-27 16:07:58.924849227 +0200 +@@ -128,7 +128,7 @@ + + + + +@@ -185,7 +185,7 @@ + + + + +diff -up ws-jaxme-0.5.2/ant/js.xml~ ws-jaxme-0.5.2/ant/js.xml +--- ws-jaxme-0.5.2/ant/js.xml~ 2012-07-27 12:18:59.000000000 +0200 ++++ ws-jaxme-0.5.2/ant/js.xml 2012-07-27 16:08:26.538504008 +0200 +@@ -71,7 +71,7 @@ + + + + + +@@ -160,7 +160,7 @@ + + + +diff -up ws-jaxme-0.5.2/ant/macros.xml~ ws-jaxme-0.5.2/ant/macros.xml +--- ws-jaxme-0.5.2/ant/macros.xml~ 2005-07-14 20:32:17.000000000 +0200 ++++ ws-jaxme-0.5.2/ant/macros.xml 2012-07-27 16:08:37.033372804 +0200 +@@ -54,7 +54,7 @@ + + ++ excludes="@{excludes}" source="1.5" target="1.5"> + + + +diff -up ws-jaxme-0.5.2/ant/pm.xml~ ws-jaxme-0.5.2/ant/pm.xml +--- ws-jaxme-0.5.2/ant/pm.xml~ 2012-07-27 12:18:59.000000000 +0200 ++++ ws-jaxme-0.5.2/ant/pm.xml 2012-07-27 16:08:42.912299308 +0200 +@@ -70,7 +70,7 @@ + + + + +@@ -112,7 +112,7 @@ + + + + + diff --git a/SOURCES/ws-jaxme-ant-scripts.patch b/SOURCES/ws-jaxme-ant-scripts.patch new file mode 100644 index 0000000..9d82a71 --- /dev/null +++ b/SOURCES/ws-jaxme-ant-scripts.patch @@ -0,0 +1,93 @@ +--- ./ant/js.xml.sav 2005-08-12 03:39:29.000000000 -0400 ++++ ./ant/js.xml 2007-02-12 12:31:25.000000000 -0500 +@@ -35,16 +35,16 @@ + + + +- +- ++ ++ + + + + + + + +- ++ + + + +@@ -132,6 +132,7 @@ + + + ++ + + + +- ++ + +- +- +- ++ ++ ++ + + + +--- ./ant/jm.xml.sav 2005-08-12 03:39:29.000000000 -0400 ++++ ./ant/jm.xml 2007-02-12 12:31:41.000000000 -0500 +@@ -34,9 +34,10 @@ + + + +- ++ + + ++ + + + +--- ./ant/xs.xml.sav 2005-08-12 03:39:29.000000000 -0400 ++++ ./ant/xs.xml 2007-02-12 12:31:25.000000000 -0500 +@@ -23,7 +23,7 @@ + + + +- ++ + + + +@@ -48,7 +48,7 @@ + + + +- ++ + + + +--- ./ant/api.xml.sav 2005-08-12 03:39:29.000000000 -0400 ++++ ./ant/api.xml 2007-02-12 12:31:25.000000000 -0500 +@@ -25,7 +25,7 @@ + + + +- ++ + + + diff --git a/SOURCES/ws-jaxme-bind-MANIFEST.MF b/SOURCES/ws-jaxme-bind-MANIFEST.MF new file mode 100644 index 0000000..b1157da --- /dev/null +++ b/SOURCES/ws-jaxme-bind-MANIFEST.MF @@ -0,0 +1,11 @@ +Manifest-Version: 1.0 +Bundle-SymbolicName: javax.xml.bind +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-Localization: plugin +Bundle-Version: 2.0.0.v20080604-1500 +Bundle-Vendor: %providerName +Export-Package: javax.xml.bind;version="2.0.0",javax.xml.bind.annotati + on;version="2.0.0",javax.xml.bind.annotation.adapters;version="2.0.0" + ,javax.xml.bind.attachment;version="2.0.0",javax.xml.bind.helpers;ver + sion="2.0.0",javax.xml.bind.util;version="2.0.0" diff --git a/SOURCES/ws-jaxme-catalog.patch b/SOURCES/ws-jaxme-catalog.patch new file mode 100644 index 0000000..24aae41 --- /dev/null +++ b/SOURCES/ws-jaxme-catalog.patch @@ -0,0 +1,29 @@ +--- ./ant/docs.xml.sav 2006-05-19 20:00:29.000000000 -0400 ++++ ./ant/docs.xml 2006-05-19 20:01:01.000000000 -0400 +@@ -165,7 +165,9 @@ + force="${force}" + style="${docbookxsl.home}/html/chunk.xsl"> + +- ++ ++ ++ + + + +@@ -180,10 +182,12 @@ + force="${force}" + style="${docbookxsl.home}/html/chunk.xsl"> + +- ++ ++ ++ + + + + + +- +\ No newline at end of file ++ diff --git a/SOURCES/ws-jaxme-docs_xml.patch b/SOURCES/ws-jaxme-docs_xml.patch new file mode 100644 index 0000000..2d869dc --- /dev/null +++ b/SOURCES/ws-jaxme-docs_xml.patch @@ -0,0 +1,11 @@ +--- ./ant/docs.xml.sav 2006-05-19 19:59:02.000000000 -0400 ++++ ./ant/docs.xml 2006-05-19 19:59:07.000000000 -0400 +@@ -69,7 +69,7 @@ + Missing DocBook, terminating. + + +- + + + + +- + + + +diff -rauN ws-jaxme-0.5.2.old/src/pm/org/apache/ws/jaxme/pm/xmldb/package.html ws-jaxme-0.5.2/src/pm/org/apache/ws/jaxme/pm/xmldb/package.html +--- ws-jaxme-0.5.2.old/src/pm/org/apache/ws/jaxme/pm/xmldb/package.html 2004-07-23 03:18:09.000000000 -0400 ++++ ws-jaxme-0.5.2/src/pm/org/apache/ws/jaxme/pm/xmldb/package.html 1969-12-31 19:00:00.000000000 -0500 +@@ -1,31 +0,0 @@ +- +- +- +- +-Package Documentation for org.apache.ws.jaxme.pm.xmldb Package +- +- +- +-

+-Contains an implementation of +-the JaxMe persistence management framework +-targeting the XML::DB API. +-

+- +- +diff -rauN ws-jaxme-0.5.2.old/src/pm/org/apache/ws/jaxme/pm/xmldb/XmlDbPM.java ws-jaxme-0.5.2/src/pm/org/apache/ws/jaxme/pm/xmldb/XmlDbPM.java +--- ws-jaxme-0.5.2.old/src/pm/org/apache/ws/jaxme/pm/xmldb/XmlDbPM.java 2005-03-04 05:41:53.000000000 -0500 ++++ ws-jaxme-0.5.2/src/pm/org/apache/ws/jaxme/pm/xmldb/XmlDbPM.java 1969-12-31 19:00:00.000000000 -0500 +@@ -1,338 +0,0 @@ +-/* +- * Copyright 2003, 2004 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 +- * +- * http://www.apache.org/licenses/LICENSE-2.0 +- * +- * Unless required by applicable law or agreed to in writing, software +- * distributed under the License is distributed on an "AS IS" BASIS, +- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +- * See the License for the specific language governing permissions and +- * limitations under the License. +- +- */ +-package org.apache.ws.jaxme.pm.xmldb; +- +-import java.lang.reflect.InvocationTargetException; +-import java.util.HashMap; +-import java.util.Iterator; +-import java.util.Map; +- +-import javax.xml.bind.Element; +-import javax.xml.bind.JAXBException; +-import javax.xml.bind.Marshaller; +- +-import org.apache.ws.jaxme.JMManager; +-import org.apache.ws.jaxme.JMUnmarshallerHandler; +-import org.apache.ws.jaxme.Observer; +-import org.apache.ws.jaxme.PMException; +-import org.apache.ws.jaxme.PMParams; +-import org.apache.ws.jaxme.pm.impl.PMIdImpl; +-import org.xml.sax.ContentHandler; +-import org.xmldb.api.DatabaseManager; +-import org.xmldb.api.base.Collection; +-import org.xmldb.api.base.Database; +-import org.xmldb.api.base.ResourceIterator; +-import org.xmldb.api.base.ResourceSet; +-import org.xmldb.api.base.XMLDBException; +-import org.xmldb.api.modules.XMLResource; +-import org.xmldb.api.modules.XPathQueryService; +- +- +-/** This is a persistence manager for the XML::DB interface. In other +- * words, using this persistence manager you may read documents from a +- * database via the XML::DB API or write them into the database using the +- * same API.
+- * This persistence manager is generic: The same manager works fine for +- * any JAXB element. +- */ +-public class XmlDbPM extends PMIdImpl { +- private Class driverClass; +- private String collection; +- private String user; +- private String password; +- private Map databaseProperties; +- private String xPathQueryService = "XPathQueryService"; +- private String xPathQueryServiceVersion = "1.0"; +- +- /** Creates a new instance of XmlDbPM. +- */ +- public XmlDbPM() { +- } +- +- public void init(JMManager pManager) throws JAXBException { +- super.init(pManager); +- +- String driverClassName = pManager.getProperty("xmldb.driver"); +- if (driverClassName == null || driverClassName.length() == 0) { +- throw new JAXBException("Missing property: 'xmldb.driver' (driver class name)"); +- } +- +- String coll = pManager.getProperty("xmldb.collection"); +- if (coll == null || coll.length() == 0) { +- throw new JAXBException("Missing property: 'xmldb.collection' (collection name)"); +- } +- setCollection(coll); +- setUser(pManager.getProperty("xmldb.user")); +- setPassword(pManager.getProperty("xmldb.password")); +- +- for (int i = 0; ; i++) { +- String p = "xmldb.property." + i; +- String v = pManager.getProperty(p); +- if (v == null) { +- break; +- } +- int offset = v.indexOf('='); +- if (offset == -1) { +- throw new JAXBException("Invalid database property value " + p + ": Expected name=value, got " + v); +- } +- String name = v.substring(0, offset); +- String value = v.substring(offset+1); +- if (databaseProperties != null) { +- databaseProperties = new HashMap(); +- } +- databaseProperties.put(name, value); +- } +- +- Class c; +- try { +- c = Class.forName(driverClassName); +- } catch (ClassNotFoundException e) { +- try { +- ClassLoader cl = Thread.currentThread().getContextClassLoader(); +- if (cl == null) { +- cl = getClass().getClassLoader(); +- } +- c = cl.loadClass(driverClassName); +- } catch (ClassNotFoundException f) { +- throw new JAXBException("Failed to load driver class " + driverClassName, e); +- } +- } +- setDriverClass(c); +- } +- +- /** Returns the collection name. +- */ +- public String getCollection() { +- return collection; +- } +- +- /** Sets the collection name. +- */ +- public void setCollection(String pCollection) { +- collection = pCollection; +- } +- +- /** Returns the driver class. +- */ +- public Class getDriverClass() { +- return driverClass; +- } +- +- /** Sets the driver class. +- */ +- public void setDriverClass(Class pDriverClass) { +- driverClass = pDriverClass; +- } +- +- /** Returns the password. +- */ +- public String getPassword() { +- return password; +- } +- +- /** Sets the password. +- */ +- public void setPassword(String pPassword) { +- password = pPassword; +- } +- +- /** Returns the users name. +- */ +- public String getUser() { +- return user; +- } +- +- /** Sets the users name. +- */ +- public void setUser(String pUser) { +- user = pUser; +- } +- +- /** Returns the name of the XPathQueryService. Defaults to +- * "XPathQueryService". +- */ +- public String getXPathQueryService() { +- return xPathQueryService; +- } +- +- /** Sets the name of the XPathQueryService. Defaults to +- * "XPathQueryService". +- */ +- public void setXPathQueryService(String pXpathQueryService) { +- xPathQueryService = pXpathQueryService; +- } +- +- /** Returns the version of the XPathQueryService. Defaults to +- * "1.0". +- */ +- public String getXPathQueryServiceVersion() { +- return xPathQueryServiceVersion; +- } +- +- /** Sets the version of the XPathQueryService. Defaults to +- * "1.0". +- */ +- public void setXPathQueryServiceVersion(String pXpathQueryServiceVersion) { +- xPathQueryServiceVersion = pXpathQueryServiceVersion; +- } +- +- /** Returns the database collection by invoking +- * {@link DatabaseManager#getCollection(String)}. +- */ +- protected Collection getXmlDbCollection() +- throws XMLDBException, IllegalAccessException, InstantiationException { +- Database database = (Database) getDriverClass().newInstance(); +- if (databaseProperties != null) { +- for (Iterator iter = databaseProperties.entrySet().iterator(); iter.hasNext(); ) { +- Map.Entry entry = (Map.Entry) iter.next(); +- database.setProperty((String) entry.getKey(), (String) entry.getValue()); +- } +- } +- DatabaseManager.registerDatabase(database); +- return DatabaseManager.getCollection(getCollection()); +- } +- +- +- /* (non-Javadoc) +- * @see org.apache.ws.jaxme.PM#select(org.apache.ws.jaxme.Observer, java.lang.String, org.apache.ws.jaxme.PMParams) +- */ +- public void select(Observer pObserver, String pQuery, PMParams pPlaceHolderArgs) throws JAXBException { +- if (pPlaceHolderArgs != null) { +- pQuery = super.parseQuery(pQuery, pPlaceHolderArgs); +- } +- +- if (pQuery == null) { +- throw new IllegalArgumentException("A query must be specified"); +- } +- +- Collection col; +- try { +- col = getXmlDbCollection(); +- XPathQueryService service = (XPathQueryService) col.getService(getXPathQueryService(), +- getXPathQueryServiceVersion()); +- ResourceSet result = service.query(pQuery); +- if (result != null) { +- ResourceIterator i = result.getIterator(); +- if (i.hasMoreResources()) { +- JMUnmarshallerHandler handler = (JMUnmarshallerHandler) getManager().getFactory().createUnmarshaller().getUnmarshallerHandler(); +- handler.setObserver(pObserver); +- while(i.hasMoreResources()) { +- XMLResource r = (XMLResource) i.nextResource(); +- r.getContentAsSAX(handler); +- } +- } +- } +- } catch (XMLDBException e) { +- throw new PMException(e); +- } catch (IllegalAccessException e) { +- throw new PMException(e); +- } catch (InstantiationException e) { +- throw new PMException(e); +- } +- } +- +- /* (non-Javadoc) +- * @see org.apache.ws.jaxme.PM#insert(javax.xml.bind.Element) +- */ +- public void insert(Element pElement) throws PMException { +- try { +- Collection col = getXmlDbCollection(); +- String id = getId(pElement); +- XMLResource resource = (XMLResource) col.createResource(id, XMLResource.RESOURCE_TYPE); +- ContentHandler ch = resource.setContentAsSAX(); +- Marshaller marshaller = getManager().getFactory().createMarshaller(); +- marshaller.marshal(pElement, ch); +- col.storeResource(resource); +- } catch (XMLDBException e) { +- throw new PMException(e); +- } catch (IllegalAccessException e) { +- throw new PMException(e); +- } catch (InstantiationException e) { +- throw new PMException(e); +- } catch (NoSuchMethodException e) { +- throw new PMException(e); +- } catch (InvocationTargetException e) { +- throw new PMException(e.getTargetException()); +- } catch (JAXBException e) { +- if (e instanceof PMException) { +- throw (PMException) e; +- } else { +- throw new PMException(e); +- } +- } +- } +- +- /* (non-Javadoc) +- * @see org.apache.ws.jaxme.PM#update(javax.xml.bind.Element) +- */ +- public void update(Element pElement) throws PMException { +- try { +- Collection col = getXmlDbCollection(); +- String id = getId(pElement); +- XMLResource resource = (XMLResource) col.getResource(id); +- ContentHandler ch = resource.setContentAsSAX(); +- Marshaller marshaller = getManager().getFactory().createMarshaller(); +- marshaller.marshal(pElement, ch); +- col.storeResource(resource); +- } catch (XMLDBException e) { +- throw new PMException(e); +- } catch (IllegalAccessException e) { +- throw new PMException(e); +- } catch (InstantiationException e) { +- throw new PMException(e); +- } catch (NoSuchMethodException e) { +- throw new PMException(e); +- } catch (InvocationTargetException e) { +- throw new PMException(e.getTargetException()); +- } catch (JAXBException e) { +- if (e instanceof PMException) { +- throw (PMException) e; +- } else { +- throw new PMException(e); +- } +- } +- } +- +- /* (non-Javadoc) +- * @see org.apache.ws.jaxme.PM#delete(javax.xml.bind.Element) +- */ +- public void delete(Element pElement) throws PMException { +- try { +- Collection col = getXmlDbCollection(); +- String id = getId(pElement); +- XMLResource resource = (XMLResource) col.createResource(id, XMLResource.RESOURCE_TYPE); +- col.removeResource(resource); +- } catch (XMLDBException e) { +- throw new PMException(e); +- } catch (IllegalAccessException e) { +- throw new PMException(e); +- } catch (InstantiationException e) { +- throw new PMException(e); +- } catch (InvocationTargetException e) { +- throw new PMException(e.getTargetException()); +- } catch (NoSuchMethodException e) { +- throw new PMException(e); +- } catch (JAXBException e) { +- if (e instanceof PMException) { +- throw (PMException) e; +- } else { +- throw new PMException(e); +- } +- } +- } +- +-} diff --git a/SOURCES/ws-jaxme-system-dtd.patch b/SOURCES/ws-jaxme-system-dtd.patch new file mode 100644 index 0000000..17c920a --- /dev/null +++ b/SOURCES/ws-jaxme-system-dtd.patch @@ -0,0 +1,11 @@ +--- ws-jaxme/src/documentation/manual/jaxme2.xml.orig 2008-08-15 13:21:21.882649810 -0400 ++++ ws-jaxme/src/documentation/manual/jaxme2.xml 2008-08-15 13:21:44.684648635 -0400 +@@ -17,7 +17,7 @@ + + --> + + + diff --git a/SOURCES/ws-jaxme-use-commons-codec.patch b/SOURCES/ws-jaxme-use-commons-codec.patch new file mode 100644 index 0000000..2a0e913 --- /dev/null +++ b/SOURCES/ws-jaxme-use-commons-codec.patch @@ -0,0 +1,28 @@ +--- ./src/jaxme/org/apache/ws/jaxme/util/Base64Binary.java.sav 2007-02-12 12:33:45.000000000 -0500 ++++ ./src/jaxme/org/apache/ws/jaxme/util/Base64Binary.java 2007-02-12 12:35:20.000000000 -0500 +@@ -18,8 +18,7 @@ + + import java.io.IOException; + +-import sun.misc.BASE64Decoder; +-import sun.misc.BASE64Encoder; ++import org.apache.commons.codec.binary.Base64; + + + /** A utility class for working with base64 encoding. +@@ -37,13 +36,13 @@ + * base64 encoded byte array. + */ + public static byte[] decode(String pValue) throws IOException { +- return (new BASE64Decoder()).decodeBuffer(pValue); ++ return (new Base64()).decode(pValue.getBytes()); + } + + /** Converts the base64 encoded byte array pValue + * into a string. + */ + public static String encode(byte[] pValue) { +- return (new BASE64Encoder()).encode(pValue); ++ return new String((new Base64()).encodeBase64(pValue)); + } + } diff --git a/SPECS/ws-jaxme.spec b/SPECS/ws-jaxme.spec new file mode 100644 index 0000000..5a3ad23 --- /dev/null +++ b/SPECS/ws-jaxme.spec @@ -0,0 +1,263 @@ +# 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 base_name jaxme + +Name: ws-jaxme +Version: 0.5.2 +Release: 9%{?dist} +Epoch: 0 +Summary: Open source implementation of JAXB + +Group: Development/Libraries/Java +License: ASL 2.0 +URL: http://ws.apache.org/jaxme/ +# svn export http://svn.apache.org/repos/asf/webservices/archive/jaxme/tags/R0_5_2/ ws-jaxme-0.5.2 +# tar czf ws-jaxme-0.5.2-src.tar.gz ws-jaxme-0.5.2 +Source0: ws-jaxme-0.5.2-src.tar.gz +Source1: ws-jaxme-bind-MANIFEST.MF +# generated docs with forrest-0.5.1 +Patch0: ws-jaxme-docs_xml.patch +Patch1: ws-jaxme-catalog.patch +Patch2: ws-jaxme-system-dtd.patch +Patch3: ws-jaxme-jdk16.patch +Patch4: ws-jaxme-ant-scripts.patch +Patch5: ws-jaxme-use-commons-codec.patch +# Remove xmldb-api, deprecated since f17 +Patch6: ws-jaxme-remove-xmldb.patch +Patch7: ws-jaxme-0.5.2-class-version15.patch +BuildArch: noarch +BuildRequires: jpackage-utils >= 0:1.6 +BuildRequires: java-devel >= 1.6.0 +BuildRequires: ant >= 0:1.6 +BuildRequires: ant-apache-resolver +BuildRequires: antlr +BuildRequires: apache-commons-codec +BuildRequires: junit +BuildRequires: hsqldb +BuildRequires: log4j +BuildRequires: xalan-j2 +BuildRequires: xerces-j2 +BuildRequires: docbook-style-xsl +BuildRequires: docbook-dtds +BuildRequires: zip +Requires: antlr +Requires: apache-commons-codec +Requires: junit +Requires: hsqldb +Requires: log4j +Requires: xalan-j2 +Requires: xerces-j2 +Requires: jpackage-utils + +%description +A Java/XML binding compiler takes as input a schema +description (in most cases an XML schema, but it may +be a DTD, a RelaxNG schema, a Java class inspected +via reflection, or a database schema). The output is +a set of Java classes: +* A Java bean class matching the schema description. + (If the schema was obtained via Java reflection, + the original Java bean class.) +* Read a conforming XML document and convert it into + the equivalent Java bean. +* Vice versa, marshal the Java bean back into the + original XML document. + +%package javadoc +Summary: Javadoc for %{name} +Group: Documentation +Requires: jpackage-utils +Requires(postun): jpackage-utils + +%description javadoc +%{summary}. + +%package manual +Summary: Documents for %{name} +Group: Documentation + +%description manual +%{summary}. + +%prep +%setup -q +for j in $(find . -name "*.jar"); do + mv $j $j.no +done + +%patch0 -p0 +%patch1 -p0 +%patch2 -p1 +DOCBOOKX_DTD=`%{_bindir}/xmlcatalog %{_datadir}/sgml/docbook/xmlcatalog "-//OASIS//DTD DocBook XML V4.5//EN" 2>/dev/null` +%{__perl} -pi -e 's|@DOCBOOKX_DTD@|$DOCBOOKX_DTD|' src/documentation/manual/jaxme2.xml +%patch3 -p1 +%patch4 -b .sav +%patch5 -b .sav +%patch6 -p1 +%patch7 -p1 + +%build +export CLASSPATH=$(build-classpath antlr hsqldb commons-codec junit log4j xerces-j2 xalan-j2 xalan-j2-serializer) +ant all Docs.all \ +-Dbuild.sysclasspath=first \ +-Ddocbook.home=%{_datadir}/sgml/docbook \ +-Ddocbookxsl.home=%{_datadir}/sgml/docbook/xsl-stylesheets + +mkdir -p META-INF +cp -p %{SOURCE1} META-INF/MANIFEST.MF +touch META-INF/MANIFEST.MF +zip -u dist/jaxmeapi-%{version}.jar META-INF/MANIFEST.MF + +%install +install -dm 755 $RPM_BUILD_ROOT%{_javadir}/%{base_name} +for jar in dist/*.jar; do + install -m 644 ${jar} $RPM_BUILD_ROOT%{_javadir}/%{base_name}/ +done +(cd $RPM_BUILD_ROOT%{_javadir}/%{base_name} && + for jar in *-%{version}*; + do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; + done +) + +(cd $RPM_BUILD_ROOT%{_javadir}/%{base_name} && + for jar in *.jar; + do ln -sf ${jar} ws-${jar}; + done +) + +#javadoc +install -dm 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name} +cp -pr build/docs/src/documentation/content/apidocs \ + $RPM_BUILD_ROOT%{_javadocdir}/%{name} +rm -rf build/docs/src/documentation/content/apidocs + +#manual +install -dm 755 $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} +cp -pr build/docs/src/documentation/content/* $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} +install -pm 644 LICENSE $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} + +%files +%doc LICENSE NOTICE +%{_javadir}/%{base_name} + +%files javadoc +%doc LICENSE NOTICE +%doc %{_javadocdir}/%{name} + +%files manual +%doc LICENSE NOTICE +%doc %{_docdir}/%{name}-%{version} + +%changelog +* Fri Jun 28 2013 Mikolaj Izdebski - 0:0.5.2-9 +- Rebuild to regenerate API documentation +- Resolves: CVE-2013-1571 + +* Tue Mar 5 2013 Hans de Goede - 0:0.5.2-8 +- Fix FTBFS (add xalan-j2-serializer to classpath) (rhbz#914580) + +* Fri Feb 15 2013 Fedora Release Engineering - 0:0.5.2-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Thu Aug 23 2012 Stanislav Ochotnicky - 0:0.5.2-6 +- Add LICENSE and NOTICE files too all (sub)packages + +* Fri Jul 27 2012 Hans de Goede - 0:0.5.2-5 +- Build all class files in 1.5 format (rhbz#842624) + +* Sun Jul 22 2012 Fedora Release Engineering - 0:0.5.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Apr 6 2012 Alexander Kurtakov 0:0.5.2-3 +- Fix the dependencies. + +* Fri Apr 6 2012 Alexander Kurtakov 0:0.5.2-2 +- Guideline fixes. + +* Wed Feb 8 2012 Roland Grunberg 0:0.5.2-1 +- Update to 0.5.2. +- Remove xmldb-api due to deprecation. +- Fix ws-jaxme-ant-scripts.patch to apply cleanly. + +* Sat Jan 14 2012 Fedora Release Engineering - 0:0.5.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Feb 07 2011 Fedora Release Engineering - 0:0.5.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Tue Dec 21 2010 Alexander Kurtakov 0:0.5.1-6 +- Fix ant-nodeps in the classpath. + +* Tue Dec 21 2010 Alexander Kurtakov 0:0.5.1-5 +- Fix FTBFS. + +* Mon Jul 27 2009 Fedora Release Engineering - 0:0.5.1-4.4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Feb 25 2009 Fedora Release Engineering - 0:0.5.1-3.4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Wed Oct 22 2008 Alexander Kurtakov - 0:0.5.1-2.3 +- BR docbook-style-xsl. +- BR ant-apache-resolver. + +* Wed Oct 22 2008 Alexander Kurtakov - 0:0.5.1-2.3 +- Partial sync with jpackage to get build fixes. +- Add osgi manifest to jaxmeapi.jar. + +* Thu Jul 10 2008 Tom "spot" Callaway - 0:0.5.1-2.2 +- drop repotag +- fix license tag + +* Mon Feb 12 2007 Deepak Bhole - 0:0.5.1-2jpp.1 +- Update as per Fedora guidelines. + +* Wed May 04 2006 Ralph Apel - 0:0.5.1-1jpp +- First JPP-1.7 release + +* Tue Dec 20 2005 Ralph Apel - 0:0.5-1jpp +- Upgrade to 0.5 + +* Thu Sep 09 2004 Ralph Apel - 0:0.3.1-1jpp +- Fix version in changelog +- Upgrade to 0.3.1 + +* Fri Aug 30 2004 Ralph Apel - 0:2.0-0.b1.4jpp +- Build with ant-1.6.2 + +* Fri Aug 06 2004 Ralph Apel - 0:2.0-0.b1.3jpp +- Void change + +* Tue Jun 01 2004 Randy Watler - 0:2.0-0.b1.2jpp +- Upgrade to Ant 1.6.X + +* Fri Mar 04 2004 Ralph Apel - 0:2.0-0.b1.1jpp +- First JPackage release