diff --git a/xml-apis-2.0.2.pom b/xml-apis-2.0.2.pom
new file mode 100644
index 0000000..664f0df
--- /dev/null
+++ b/xml-apis-2.0.2.pom
@@ -0,0 +1,13 @@
+
+ 4.0.0
+ xml-apis
+ xml-apis
+ 2.0.2
+
+
+ xml-apis
+ xml-apis
+ 1.0.b2
+
+
+
\ No newline at end of file
diff --git a/xml-apis-ext-1.3.04.pom b/xml-apis-ext-1.3.04.pom
new file mode 100644
index 0000000..2e558ff
--- /dev/null
+++ b/xml-apis-ext-1.3.04.pom
@@ -0,0 +1,42 @@
+
+
+
+ apache
+ org.apache
+ 3
+
+ 4.0.0
+ xml-apis
+ xml-apis-ext
+ XML Commons External Components XML APIs Extensions
+ 1.3.04
+ xml-commons provides an Apache-hosted set of DOM, SAX, and
+ JAXP interfaces for use in other xml-based projects. Our hope is that we
+ can standardize on both a common version and packaging scheme for these
+ critical XML standards interfaces to make the lives of both our developers
+ and users easier. The External Components portion of xml-commons contains
+ interfaces that are defined by external standards organizations. For DOM,
+ that's the W3C; for SAX it's David Megginson and sax.sourceforge.net; for
+ JAXP it's Sun.
+ http://xml.apache.org/commons/components/external/
+
+ bugzilla
+ http://issues.apache.org/bugzilla/
+
+
+
+ XML Commons Developer's List
+ commons-dev-subscribe@xml.apache.org
+ commons-dev-unsubscribe@xml.apache.org
+ commons-dev@xml.apache.org
+ http://mail-archives.apache.org/mod_mbox/xml-commons-dev/
+
+
+
+ scm:svn:http://svn.apache.org/repos/asf/xml/commons/tags/xml-commons-external-1_3_04/
+ http://svn.apache.org/viewvc/xml/commons/tags/xml-commons-external-1_3_04/
+
+
+ deployed
+
+
\ No newline at end of file
diff --git a/xml-commons-apis.spec b/xml-commons-apis.spec
index 7c459e9..48468af 100644
--- a/xml-commons-apis.spec
+++ b/xml-commons-apis.spec
@@ -1,6 +1,6 @@
Name: xml-commons-apis
Version: 1.4.01
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: APIs for DOM, SAX, and JAXP
Group: Development/Libraries
License: ASL 2.0 and W3C and Public Domain
@@ -12,8 +12,8 @@ URL: http://xml.apache.org/commons/
Source0: xml-commons-external-%{version}-src.tar.gz
Source1: %{name}-MANIFEST.MF
Source2: %{name}-ext-MANIFEST.MF
-
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Source3: http://repo1.maven.org/maven2/xml-apis/xml-apis/2.0.2/xml-apis-2.0.2.pom
+Source4: http://repo1.maven.org/maven2/xml-apis/xml-apis-ext/1.3.04/xml-apis-ext-1.3.04.pom
BuildArch: noarch
@@ -23,6 +23,8 @@ BuildRequires: ant
BuildRequires: zip
Requires: java
Requires: jpackage-utils
+Requires(post): jpackage-utils
+Requires(postun): jpackage-utils
Obsoletes: xml-commons < %{version}-%{release}
Provides: xml-commons = %{version}-%{release}
@@ -33,7 +35,7 @@ Provides: xml-commons-jaxp-1.3-apis = %{version}-%{release}
%description
xml-commons-apis is designed to organize and have common packaging for
the various externally-defined standard interfaces for XML. This
-includes the DOM, SAX, and JAXP.
+includes the DOM, SAX, and JAXP.
%package manual
Summary: Manual for %{name}
@@ -51,7 +53,6 @@ Group: Documentation
%prep
%setup -q -n external
-
# 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 '{}' \;
@@ -62,12 +63,14 @@ iconv -f iso8859-1 -t utf-8 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
+# remove bogus section from poms
+cp %{SOURCE3} %{SOURCE4} .
+sed -i '/distributionManagement/,/\/distributionManagement/ {d}' *.pom
+
%build
ant -Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5 jar javadoc
%install
-rm -rf %{buildroot}
-
# inject OSGi manifests
mkdir -p META-INF
cp -p %{SOURCE1} META-INF/MANIFEST.MF
@@ -78,46 +81,61 @@ touch META-INF/MANIFEST.MF
zip -u build/xml-apis-ext.jar META-INF/MANIFEST.MF
# Jars
-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
+install -pD -T build/xml-apis.jar %{buildroot}%{_javadir}/%{name}.jar
+install -pDm 644 xml-apis-[0-9]*.pom %{buildroot}/%{_mavenpomdir}/JPP-%{name}.pom
+%add_to_maven_depmap xml-apis xml-apis %{version} JPP %{name}
+
+install -pD -T build/xml-apis-ext.jar %{buildroot}%{_javadir}/%{name}-ext.jar
+install -pDm 644 xml-apis-ext*.pom %{buildroot}/%{_mavenpomdir}/JPP-%{name}-ext.pom
+%add_to_maven_depmap xml-apis xml-apis-ext %{version} JPP %{name}-ext
-# Jar versioning
-(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 %{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 %{buildroot}%{_javadocdir}/%{name}-%{version}
-cp -pr build/docs/javadoc/* \
- %{buildroot}%{_javadocdir}/%{name}-%{version}
-ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}
+mkdir -p %{buildroot}%{_javadocdir}/%{name}
+cp -pr build/docs/javadoc/* %{buildroot}%{_javadocdir}/%{name}
# prevent apis javadoc from being included in doc
rm -rf build/docs/javadoc
-%clean
-rm -rf %{buildroot}
+%pre javadoc
+# workaround for rpm bug, can be removed in F-18
+[ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \
+rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
+
+
+%post
+%update_maven_depmap
+
+%postun
+%update_maven_depmap
+
%files
-%defattr(-,root,root,-)
-%doc LICENSE NOTICE
+%doc LICENSE NOTICE
%doc LICENSE.dom-documentation.txt README.dom.txt
%doc LICENSE.dom-software.txt LICENSE.sac.html
%doc LICENSE.sax.txt README-sax README.sax.txt
%{_javadir}/*
+%{_mavendepmapfragdir}/%{name}
+%{_mavenpomdir}/JPP-%{name}.pom
+%{_mavenpomdir}/JPP-%{name}-ext.pom
%files manual
-%defattr(-,root,root,-)
%doc build/docs/*
%files javadoc
-%defattr(-,root,root,-)
%{_javadocdir}/*
%changelog
+* Fri May 6 2011 Stanislav Ochotnicky - 1.4.01-4
+- Add maven metadata
+- Few guidelines tweaks (buildroot, clean, defattr)
+- Versionless jars & javadocs
+
* Mon Feb 07 2011 Fedora Release Engineering - 1.4.01-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild