File bea-stax.spec of Package bea-stax

# spec file for package bea-stax
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%define name            bea-stax
%define version         1.2.0
%define release         0.rc1.2jpp
%define section         free
Summary:        Streaming API for XML
License:        Apache-2.0
Group:          Development/Libraries/Java
Patch0:         bea-stax-target15.patch
Patch1:         bea-stax-gcj43-build.patch
Patch2:         bea-stax-gcj-build.patch

Name:           bea-stax
Version:        %{version}
Release:        0
BuildArch:      noarch
BuildRequires:  javapackages-tools
%if %defined suse_version
BuildRequires:  ant
BuildRequires:  java-1_5_0-gcj-compat-devel
BuildRequires:  unzip
#BuildRequires:  xerces-j2-bootstrap
#!BuildIgnore:  xerces-j2-bootstrap
BuildRequires:  xml-commons-apis-bootstrap
BuildRequires:  xml-commons-resolver-bootstrap
BuildRequires:  xml-commons-which-bootstrap
#!BuildIgnore: antlr antlr-java
#!BuildIgnore:  xerces-j2 xml-commons xml-commons-apis xml-commons-resolver xml-commons-which
#!BuildIgnore:  xml-commons-jaxp-1.3-apis
Requires:       %{name}-api = %{version}-%{release}
Requires:       javapackages-tools
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

The Streaming API for XML (StAX) is a groundbreaking new Java API for
parsing and writing XML easily and efficiently.

%package api
Summary:        The StAX API
Group:          Development/Libraries/Java

%description api
Streaming API for XML


%setup -q -c -n %{name}-%{version}
%patch0 -b .target15
%if %suse_version <= 1110
%patch1 -b .gcj43-build
%patch2 -b .gcj-build

ant all

# jar
install -d -m 0755 $RPM_BUILD_ROOT%{_javadir}
install -p -m 0644 build/stax-api-1.0.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-api-%{version}.jar
install -p -m 0644 build/stax-1.2.0_rc1-dev.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-ri-%{version}.jar
ln -s %{name}-api-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-api.jar
ln -s %{name}-ri-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-ri.jar


%files api

openSUSE Build Service is sponsored by