1
0
dom2-core-tests/dom2-core-tests.spec

104 lines
3.4 KiB
RPMSpec

#
# spec file for package dom2-core-tests
#
# Copyright (c) 2011 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 section free
Name: dom2-core-tests
Summary: DOM Conformance Test Suite
Version: 0.0.1
Release: 4
Group: Development/Libraries/Java
License: W3C
Url: http://www.w3.org/DOM/Test/
BuildArch: noarch
Source0: http://www.w3.org/2004/04/dom2-core-tests-20040405.jar
Source1: LICENSE.html
Patch0: dom2-core-tests-build_xml.patch
Patch1: dom2-core-tests-explicit-javadoc.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: ant
BuildRequires: java-1_5_0-gcj-compat-devel
BuildRequires: jpackage-utils >= 1.5
BuildRequires: unzip
BuildRequires: junit
%description
The DOM Test Suites (DOM TS) will consist of a number of tests for each
level of the DOM specification. The tests will be represented in an XML
grammar which ensures that tests can easily be ported from the
description format to a number of specific language bindings. This
grammar will be specified in XML Schema and DTD form. The grammar will
be automatically generated from the DOM specifications themselves, to
ensure stability and correctness.
%package javadoc
License: W3C
Group: Development/Libraries/Java
Summary: DOM Conformance Test Suite
%description javadoc
The DOM Test Suites (DOM TS) will consist of a number of tests for each
level of the DOM specification. The tests will be represented in an XML
grammar which ensures that tests can easily be ported from the
description format to a number of specific language bindings. This
grammar will be specified in XML Schema and DTD form. The grammar will
be automatically generated from the DOM specifications themselves, to
ensure stability and correctness.
%prep
%setup -q -c -n %{name}-%{version}
rm -rf junit
find . -name "*.class" -exec rm {} \;
%patch0 -b .orig
%patch1 -b .explicit-javadoc
cp %{SOURCE1} .
%build
export CLASSPATH=$(build-classpath junit)
ant -Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5 dist
ant javadoc
%install
# jars
install -d -m 0755 $RPM_BUILD_ROOT%{_javadir}
vjar=$(echo %{name}.jar | sed s+.jar+-%{version}.jar+g)
install -m 644 %{name}-%{version}/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/$vjar
pushd $RPM_BUILD_ROOT%{_javadir}
ln -fs $vjar %{name}.jar
popd
# javadoc
install -d -m 0755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr %{name}-%{version}/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
%files
%defattr(0644,root,root,0755)
%doc LICENSE.html
%{_javadir}/*
%files javadoc
%defattr(0644,root,root,0755)
%{_javadocdir}/%{name}-%{version}
%{_javadocdir}/%{name}
%changelog