File xmlbeans-mini.spec of Package xmlbeans
#
# spec file for package xmlbeans-mini
#
# 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/
#
##### WARNING: please do not edit this auto generated spec file. Use the xmlbeans.spec! #####
%global bootstrap 1
%define real xmlbeans
Name: xmlbeans-mini
Version: 2.4.0
Release: 0
Summary: XML-Java binding tool
License: Apache-2.0
Group: Development/Libraries/Java
Url: http://xmlbeans.apache.org
#Source0: http://www.apache.org/dist/xmlbeans/source/%{real}-%{version}-src.tgz
Source0: %{real}-%{version}-src.tgz
Source1000: pre_checkin.sh
Patch0: xmlbeans-2.4.0-nodownload.patch
#PATCH-FIX-UPSTREAM: saxon 9.3+ moved VirtualNode interface
Patch1: xmlbeans-saxon-virtualnode.patch
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: ant >= 1.6
BuildRequires: bea-stax-api
BuildRequires: jpackage-utils >= 1.5
%if %{bootstrap}
BuildRequires: java-1_5_0-gcj-compat-devel
#BuildRequires: xerces-j2-bootstrap
#!BuildIgnore: xerces-j2-bootstrap
BuildRequires: xml-commons-apis-bootstrap
BuildRequires: xml-commons-resolver-bootstrap
#!BuildIgnore: xerces-j2 xml-commons xml-commons-apis xml-commons-resolver
%else
BuildRequires: ant-contrib
BuildRequires: ant-junit
BuildRequires: ant-nodeps
BuildRequires: ant-trax
BuildRequires: java-devel
BuildRequires: junit
BuildRequires: saxon9
BuildRequires: xml-commons-resolver >= 1.1
BuildRequires: xmlbeans
%endif
BuildRequires: unzip
#!BuildIgnore: antlr antlr-java
#!BuildIgnore: xml-commons-jaxp-1.3-apis xml-commons-resolver12
%description
XMLBeans is a tool that allows you to access the full power of XML in a
Java friendly way. It is an XML-Java binding tool. The idea is that you
can take advantage the richness and features of XML and XML Schema and
have these features mapped as naturally as possible to the equivalent
Java language and typing constructs. XMLBeans uses XML Schema to
compile Java interfaces and classes that you can then use to access and
modify XML instance data. Using XMLBeans is similar to using any other
Java interface/class, you will see things like getFoo or setFoo just as
you would expect when working with Java. While a major use of XMLBeans
is to access your XML instance data with strongly typed Java classes
there are also API's that allow you access to the full XML infoset
(XMLBeans keeps full XML Infoset fidelity) as well as to allow you to
reflect into the XML schema itself through an XML Schema Object model.
%package javadoc
Summary: XML-Java binding tool
Group: Development/Libraries/Java
%description javadoc
XMLBeans is a tool that allows you to access the full power of XML in a
Java friendly way. It is an XML-Java binding tool. The idea is that you
can take advantage the richness and features of XML and XML Schema and
have these features mapped as naturally as possible to the equivalent
Java language and typing constructs. XMLBeans uses XML Schema to
compile Java interfaces and classes that you can then use to access and
modify XML instance data. Using XMLBeans is similar to using any other
Java interface/class, you will see things like getFoo or setFoo just as
you would expect when working with Java. While a major use of XMLBeans
is to access your XML instance data with strongly typed Java classes
there are also API's that allow you access to the full XML infoset
(XMLBeans keeps full XML Infoset fidelity) as well as to allow you to
reflect into the XML schema itself through an XML Schema Object model.
%package manual
Summary: XML-Java binding tool
Group: Development/Libraries/Java
%description manual
XMLBeans is a tool that allows you to access the full power of XML in a
Java friendly way. It is an XML-Java binding tool. The idea is that you
can take advantage the richness and features of XML and XML Schema and
have these features mapped as naturally as possible to the equivalent
Java language and typing constructs. XMLBeans uses XML Schema to
compile Java interfaces and classes that you can then use to access and
modify XML instance data. Using XMLBeans is similar to using any other
Java interface/class, you will see things like getFoo or setFoo just as
you would expect when working with Java. While a major use of XMLBeans
is to access your XML instance data with strongly typed Java classes
there are also API's that allow you access to the full XML infoset
(XMLBeans keeps full XML Infoset fidelity) as well as to allow you to
reflect into the XML schema itself through an XML Schema Object model.
%package scripts
Summary: XML-Java binding tool
Group: Development/Libraries/Java
Requires: %{name} = %{version}
%description scripts
XMLBeans is a tool that allows you to access the full power of XML in a
Java friendly way. It is an XML-Java binding tool. The idea is that you
can take advantage the richness and features of XML and XML Schema and
have these features mapped as naturally as possible to the equivalent
Java language and typing constructs. XMLBeans uses XML Schema to
compile Java interfaces and classes that you can then use to access and
modify XML instance data. Using XMLBeans is similar to using any other
Java interface/class, you will see things like getFoo or setFoo just as
you would expect when working with Java. While a major use of XMLBeans
is to access your XML instance data with strongly typed Java classes
there are also API's that allow you access to the full XML infoset
(XMLBeans keeps full XML Infoset fidelity) as well as to allow you to
reflect into the XML schema itself through an XML Schema Object model.
%prep
%setup -q -n %{real}-%{version}
%patch0 -p1 -b .nodownload
%patch1 -p1
%build
# Piccolo and jam are rebuilt from source and bundled with xbean
# ant clean.jars leaves some dangling jars around, do not use it
find . \( -name '*.jar' -o -name '*.zip' \) \
-not -name 'piccolo*.jar' -not -name 'jam*.jar' \
%if %{bootstrap}
-not -name 'oldxbean.jar' \
%endif
-print -delete
# Replace bundled libraries
mkdir -p build/lib
ln -sf $(build-classpath xml-commons-resolver) build/lib/resolver.jar
ln -sf $(build-classpath xmlbeans/xbean) external/lib/oldxbean.jar
ln -sf $(build-classpath bea-stax-api) external/lib/jsr173_1.0_api.jar
ln -sf $(build-classpath saxon9) external/lib/saxon9.jar
ln -sf $(build-classpath saxon9) external/lib/saxon9-dom.jar
# Fix CRLF
sed 's/\r//' -i LICENSE.txt NOTICE.txt README.txt docs/stylesheet.css
%if %{bootstrap}
ant xmlpublic.jar
%else
ant default docs
%endif
%install
# jar
install -d -m 0755 $RPM_BUILD_ROOT%{_javadir}/%{real}
install -p -m 0644 build/lib/xmlpublic.jar $RPM_BUILD_ROOT%{_javadir}/%{real}/xmlpublic-%{version}.jar
ln -s xmlpublic-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{real}/xmlpublic.jar
%if ! %{bootstrap}
install -p -m 0644 build/lib/xbean_xpath.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/xbean_xpath-%{version}.jar
install -p -m 0644 build/lib/xbean.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/xbean-%{version}.jar
ln -s xbean_xpath-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/xbean_xpath.jar
ln -s xbean-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/xbean.jar
# bin
install -d -m 0755 $RPM_BUILD_ROOT%{_bindir}
install -p -m 0755 bin/dumpxsb $RPM_BUILD_ROOT%{_bindir}
install -p -m 0755 bin/inst2xsd $RPM_BUILD_ROOT%{_bindir}
install -p -m 0755 bin/scomp $RPM_BUILD_ROOT%{_bindir}
install -p -m 0755 bin/sdownload $RPM_BUILD_ROOT%{_bindir}
install -p -m 0755 bin/sfactor $RPM_BUILD_ROOT%{_bindir}
install -p -m 0755 bin/svalidate $RPM_BUILD_ROOT%{_bindir}
install -p -m 0755 bin/validate $RPM_BUILD_ROOT%{_bindir}
install -p -m 0755 bin/xpretty $RPM_BUILD_ROOT%{_bindir}
install -p -m 0755 bin/xsd2inst $RPM_BUILD_ROOT%{_bindir}
install -p -m 0755 bin/xsdtree $RPM_BUILD_ROOT%{_bindir}
install -p -m 0755 bin/xstc $RPM_BUILD_ROOT%{_bindir}
# javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
cp -pr build/docs/reference/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
rm -rf build/docs/reference
# manual
install -d -m 755 $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
cp -pr build/docs/* $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
%endif #if ! %{bootstrap}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc LICENSE.txt NOTICE.txt README.txt
%{_javadir}/*
%if ! %{bootstrap}
%files javadoc
%defattr(0644,root,root,0755)
%doc %{_javadocdir}/%{name}
%files manual
%defattr(0644,root,root,0755)
%{_docdir}/%{name}-%{version}
%files scripts
%defattr(0644,root,root,0755)
%attr(0755,root,root) %{_bindir}/*
%endif #!bootstrap
%changelog