packages java-xpp3.spec
      Pages: < 1 >  DOWNLOAD      
%define        pkgver    1.1.4c
%define        javahome   %{_jvmdir}/jdk
Name:          java-xpp3
Version:       1.1.4c
Release:       4mamba
Summary:       Xml Pull Parser
Group:         Applications/Publishing
Vendor:        openmamba
Distribution:  openmamba
Packager:      Silvan Calarco <silvan.calarco@...>
URL:           http://www.extreme.indiana.edu/xgws/xsoap/xpp/mxp1/index.html
Source0:       http://www.extreme.indiana.edu/dist/java-repository/xpp3/distributions/xpp3-%{pkgver}_src.zip
Source1:       http://repo1.maven.org/maven2/xpp3/xpp3/%{version}/xpp3-%{version}.pom
Source2:       http://repo1.maven.org/maven2/xpp3/xpp3_min/%{version}/xpp3_min-%{version}.pom
Source3:       http://repo1.maven.org/maven2/xpp3/xpp3_xpath/%{version}/xpp3_xpath-%{version}.pom
Patch0:        java-xpp3-1.1.3.8-link-docs-locally.patch
License:       Apache Software License 1.1
BuildRequires: apache-ant
BuildRequires: java-gcj-compat
BuildRequires: java-junit3
BuildRequires: jpackage-utils
BuildRequires: xml-commons-apis
Requires:      java-junit3
Requires:      jpackage-utils
Requires:      xml-commons-apis
BuildRoot:     %{_tmppath}/%{name}-%{version}-root

%description
Xml Pull Parser 3rd Edition (XPP3) MXP1 is a new XmlPull parsing engine that is based on ideas from XPP and in particular XPP2 but completely revised and rewritten to take best advantage of latest JIT JVMs such as Hotspot in JDK 1.4.

%package mini
Group:         Applications/Publishing
Summary:       minimal XML Pull Parser
Requires:      java-junit3
Requires:      jpackage-utils
Requires:      xml-commons-apis

%description mini
Xml Pull Parser 3rd Edition (XPP3) MXP1 is a new XmlPull parsing engine that is based on ideas from XPP and in particular XPP2 but completely revised and rewritten to take best advantage of latest JIT JVMs such as Hotspot in JDK 1.4.

This package contains minimal XML pull parser implementation.

%package javadoc
Group:          Documentation
Summary:        Javadoc for %{name}

%description javadoc
Xml Pull Parser 3rd Edition (XPP3) MXP1 is a new XmlPull parsing engine that is based on ideas from XPP and in particular XPP2 but completely revised and rewritten to take best advantage of latest JIT JVMs such as Hotspot in JDK 1.4.

This package contains javadoc for %{name}.

%prep
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%setup -q -n xpp3-%{pkgver}

for j in $(find . -name "*.jar"); do
	mv $j ${j}.no
done

for j in $(find . -name "*.class"); do
	mv $j ${j}.no
done
# % patch0

%build
mkdir -p src/java/addons_tests
export JAVA_HOME=%javahome
export CLASSPATH=$(build-classpath xml-commons-apis junit)
ant \
  xpp3 \
  junit \
  apidoc

%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

mkdir -p %{buildroot}%{_javadir}
mkdir -p %{buildroot}%{_datadir}/maven2/poms
install -pm 644 build/xpp3-%{pkgver}.jar \
	%{buildroot}%{_javadir}/xpp3-%{version}.jar
%add_to_maven_depmap xpp3 xpp3 %{version} JPP xpp3
install -m 644 %{SOURCE1} %{buildroot}%{_datadir}/maven2/poms/JPP-xpp3.pom
install -pm 644 build/xpp3_min-%{pkgver}.jar \
	%{buildroot}%{_javadir}/xpp3-minimal-%{version}.jar
%add_to_maven_depmap xpp3 xpp3_min %{version} JPP xpp3-minimal
install -m 644 %{SOURCE2} %{buildroot}%{_datadir}/maven2/poms/JPP-xpp3-minimal.pom
install -pm 644 build/xpp3_xpath-%{pkgver}.jar \
	%{buildroot}%{_javadir}/xpp3-xpath-%{version}.jar
%add_to_maven_depmap xpp3 xpp3_xpath %{version} JPP xpp3-xpath
install -m 644 %{SOURCE3} %{buildroot}%{_datadir}/maven2/poms/JPP-xpp3-xpath.pom

(
  cd %{buildroot}%{_javadir}
  for jar in *-%{version}.jar; do 
    ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`
  done
)

mkdir -p %{buildroot}%{_javadocdir}/xpp3-%{version}
cp -pr doc/api/* %{buildroot}%{_javadocdir}/xpp3-%{version}

rm -rf doc/build
rm -rf doc/txt
rm -rf doc/api

%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

%post
%update_maven_depmap

%postun
%update_maven_depmap

%files
%defattr(-,root,root)
%{_javadir}/xpp3-%{version}.jar
%{_javadir}/xpp3.jar
%{_javadir}/xpp3-xpath-%{version}.jar
%{_javadir}/xpp3-xpath.jar
%{_datadir}/maven2/poms
%{_mavendepmapfragdir}
%doc LICENSE.txt README.html doc/*

%files mini
%defattr(-,root,root)
%{_javadir}/xpp3-minimal-%{version}.jar
%{_javadir}/xpp3-minimal.jar
%doc LICENSE.txt

%files  javadoc
%defattr(-,root,root)
%{_javadocdir}/xpp3-%{version}

%changelog
* Thu Mar 24 2011 gil <puntogil@...> 1.1.4c-4mamba
- rebuilt with java-gcj-compat support

* Sun Nov 07 2010 gil <puntogil@...> 1.1.4c-3mamba
- rebuilt devel

* Mon Jun 29 2009 gil <puntogil@...> 1.1.4c-2mamba
- add maven 2 poms

* Fri Apr 17 2009 gil <puntogil@...> 1.1.4c-1mamba
- update to 1.1.4c

* Thu Feb 26 2009 gil <puntogil@...> 1.1.3.8-1mamba
- package created by autospec