forked from pool/bea-stax
157 lines
4.5 KiB
RPMSpec
157 lines
4.5 KiB
RPMSpec
#
|
|
# 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 http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%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
|
|
Url: http://dev2dev.bea.com/technologies/stax/index.jsp
|
|
Source0: stax-src-1.2.0_rc1-dev.zip
|
|
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: jpackage-utils >= 1.6
|
|
%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
|
|
%endif
|
|
Requires: %{name}-api = %{version}-%{release}
|
|
Requires: jpackage-utils >= 1.6
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%description
|
|
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
|
|
|
|
|
|
|
|
%{summary}
|
|
|
|
%package javadoc
|
|
Summary: Javadoc for bea-stax
|
|
Group: Development/Libraries/Java
|
|
|
|
%description javadoc
|
|
Streaming API for XML
|
|
|
|
|
|
|
|
%{summary}
|
|
#%package manual
|
|
#Summary: Documents for %{name}
|
|
#Group: Development/Documentation
|
|
#%description manual
|
|
#%{summary}
|
|
#%package demo
|
|
#Summary: Examples for %{name}
|
|
#Group: Development/Documentation
|
|
#%description demo
|
|
#%{summary}
|
|
|
|
%prep
|
|
%setup -q -c -n %{name}-%{version}
|
|
%patch0 -b .target15
|
|
%if %suse_version <= 1110
|
|
%patch1 -b .gcj43-build
|
|
%endif
|
|
%patch2 -b .gcj-build
|
|
|
|
%build
|
|
ant all javadoc
|
|
|
|
%install
|
|
# 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
|
|
# javadoc
|
|
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
|
cp -pr build/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
|
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink
|
|
# demo
|
|
#install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}
|
|
#cp -pr examples/* $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}
|
|
# manual
|
|
#install -d -m 755 $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
|
|
#cp docs/license/BEA*.doc $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
|
|
#cp README.txt $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
|
|
#cp jsr173_1.0.pdf $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
|
|
|
|
%post javadoc
|
|
rm -f %{_javadocdir}/%{name}
|
|
ln -sf %{name}-%{version} %{_javadocdir}/%{name}
|
|
|
|
%postun javadoc
|
|
if [ "$1" = "0" ]; then
|
|
rm -f %{_javadocdir}/%{name}
|
|
fi
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
#%{_docdir}/%{name}-%{version}/BEA*.doc
|
|
#%{_docdir}/%{name}-%{version}/README.txt
|
|
#%{_datadir}/%{name}-%{version}
|
|
%{_javadir}/%{name}-ri-%{version}.jar
|
|
%{_javadir}/%{name}-ri.jar
|
|
|
|
%files api
|
|
%defattr(-,root,root,-)
|
|
%{_javadir}/%{name}-api-%{version}.jar
|
|
%{_javadir}/%{name}-api.jar
|
|
|
|
%files javadoc
|
|
%defattr(0644,root,root,0755)
|
|
%{_javadocdir}/%{name}-%{version}
|
|
%ghost %doc %{_javadocdir}/%{name}
|
|
#%files manual
|
|
#%defattr(0644,root,root,0755)
|
|
#%{_docdir}/%{name}-%{version}/jsr173_1.0.pdf
|
|
#%files demo
|
|
#%defattr(0644,root,root,0755)
|
|
#%{_datadir}/%{name}-%{version}
|
|
|
|
%changelog
|