packages java-wstx.spec
      Pages: < 1 >  DOWNLOAD      
%define        stax2_version  2.1
%define        javahome       %{_jvmdir}/jdk
Name:          java-wstx
Version:       3.2.9
Release:       3mamba
Summary:       Woodstox, the Fast XML-processor
Group:         Development/Libraries/Java
Vendor:        openmamba
Distribution:  openmamba
Packager:      Silvan Calarco <silvan.calarco@...>
URL:           http://woodstox.codehaus.org/
Source0:       http://woodstox.codehaus.org/%{version}/wstx-src-%{version}.tar.gz
Patch0:        java-wstx-3.2.1-build_xml.patch
Patch1:        java-wstx-3.2.9-no_build-maven-deploy.patch
License:       Apache Software License 2.0
BuildRequires: apache-ant
BuildRequires: apache-ant-bcel
BuildRequires: apache-ant-trax
BuildRequires: java-bea-stax-api
#BuildRequires: java-cobertura
BuildRequires: java-emma
BuildRequires: java-gcj-compat
BuildRequires: java-junit3
BuildRequires: java-msv-msv
BuildRequires: java-msv-rngconv
BuildRequires: java-msv-xsdlib
BuildRequires: java-relaxngDatatype
BuildRequires: java-sax2
BuildRequires: jpackage-utils
Requires:      java-bea-stax-api
Requires:      java-msv-msv
BuildRoot:     %{_tmppath}/%{name}-%{version}-root

%description
Woodstox is a high-performance validating namespace-aware StAX-compliant (JSR-173) Open Source XML-processor written in Java.

%package j2me
Group:          Development/Libraries/Java
Summary:        J2ME libraries for %{name}

%description j2me
Woodstox is a high-performance validating namespace-aware StAX-compliant (JSR-173) Open Source XML-processor written in Java.
This package contains J2ME libraries for %{name}

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

%description javadoc
Woodstox is a high-performance validating namespace-aware StAX-compliant (JSR-173) Open Source XML-processor written in Java.
This package contains javadoc for %{name}

%package manual
Group:          Documentation
Summary:        Documents for %{name}

%description manual
Woodstox is a high-performance validating namespace-aware StAX-compliant (JSR-173) Open Source XML-processor written in Java.
This package contains %{name} documentation.

%prep
%setup -q -c -n wstx-%{version}
%patch0 -p1
%patch1 -p1

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

pushd lib
  pushd msv
    ln -sf $(build-classpath msv-msv) msv.jar
    ln -sf $(build-classpath msv-xsdlib) xsdlib.jar
    ln -sf $(build-classpath relaxngDatatype) .
  popd
  ln -sf $(build-classpath emma) .
  ln -sf $(build-classpath emma_ant) .
  ln -sf $(build-classpath bea-stax-api) stax-api-1.0.1.jar
  ln -sf $(build-classpath sax2) sax2.jar
popd

%build
export JAVA_HOME=%javahome
export CLASSPATH=$(build-classpath bcel ant/ant-apache-bcel ant/ant-trax junit-3.8.2)
ant jars jars.j2me javadoc
# test staxtest

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

mkdir -p %{buildroot}%{_javadir}/wstx

install -m 644 build/stax2-%{stax2_version}.jar \
  %{buildroot}%{_javadir}/wstx/
install -m 644 build/wstx-api-%{version}.jar \
  %{buildroot}%{_javadir}/wstx/wstx-api-%{version}.jar
install -m 644 build/wstx-asl-%{version}.jar \
  %{buildroot}%{_javadir}/wstx/wstx-asl-%{version}.jar
install -m 644 build/wstx-lgpl-%{version}.jar \
  %{buildroot}%{_javadir}/wstx/wstx-lgpl-%{version}.jar
install -m 644 build/wstx-j2me-min-both.jar \
  %{buildroot}%{_javadir}/wstx/wstx-j2me-min-both-%{version}.jar
install -m 644 build/wstx-j2me-min-input.jar \
  %{buildroot}%{_javadir}/wstx/wstx-j2me-min-input-%{version}.jar
install -m 644 build/wstx-j2me-min-output.jar \
  %{buildroot}%{_javadir}/wstx/wstx-j2me-min-output-%{version}.jar

(
  cd %{buildroot}%{_javadir}/wstx
  for jar in *-%{version}*; do
    ln -sf ${jar} ${jar/-%{version}/}
  done
  ln -sf stax2-%{stax2_version}.jar stax2.jar
)

mkdir -p %{buildroot}%{_javadocdir}/wstx-%{version}
cp -pr build/javadoc/* %{buildroot}%{_javadocdir}/wstx-%{version}
ln -s wstx-%{version} %{buildroot}%{_javadocdir}/wstx

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

%files
%defattr(-,root,root)
%{_javadir}/wstx/stax2-2.1.jar
%{_javadir}/wstx/stax2.jar
%{_javadir}/wstx/wstx-api-%{version}.jar
%{_javadir}/wstx/wstx-api.jar
%{_javadir}/wstx/wstx-asl-%{version}.jar
%{_javadir}/wstx/wstx-asl.jar
%{_javadir}/wstx/wstx-lgpl-%{version}.jar
%{_javadir}/wstx/wstx-lgpl.jar

%files j2me
%defattr(-,root,root)
%{_javadir}/wstx/wstx-j2me-min-both-%{version}.jar
%{_javadir}/wstx/wstx-j2me-min-both.jar
%{_javadir}/wstx/wstx-j2me-min-input-%{version}.jar
%{_javadir}/wstx/wstx-j2me-min-input.jar
%{_javadir}/wstx/wstx-j2me-min-output-%{version}.jar
%{_javadir}/wstx/wstx-j2me-min-output.jar

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

%files manual
%defattr(-,root,root)
%doc release-notes

%changelog
* Fri Mar 25 2011 gil <puntogil@...> 3.2.9-3mamba
- rebuilt with java-gcj-compat support

* Wed Nov 24 2010 gil <puntogil@...> 3.2.9-2mamba
- rebuilt devel

* Sat May 23 2009 gil <puntogil@...> 3.2.9-1mamba
- update to 3.2.9

* Thu Mar 12 2009 gil <puntogil@...> 3.2.1-1mamba
- package created by autospec