SHA256
1
0
forked from pool/opentest4j
opentest4j/opentest4j.spec

90 lines
2.8 KiB
RPMSpec

#
# spec file for package opentest4j
#
# Copyright (c) 2019 SUSE LINUX 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 https://bugs.opensuse.org/
#
%bcond_with tests
Name: opentest4j
Version: 1.0.0
Release: 0
Summary: Open Test Alliance for the JVM
License: Apache-2.0
Group: Development/Libraries/Java
URL: https://github.com/ota4j-team/opentest4j
Source0: https://github.com/ota4j-team/opentest4j/archive/r%{version}.tar.gz
Source1: %{name}-build.xml
Source100: https://repo1.maven.org/maven2/org/opentest4j/opentest4j/%{version}/opentest4j-%{version}.pom
BuildRequires: ant
BuildRequires: fdupes
BuildRequires: javapackages-local
BuildArch: noarch
%if %{with tests}
BuildRequires: ant-junit
%endif
%description
Open Test Alliance for the JVM is a minimal common foundation for
testing libraries on the JVM. The primary goal of the project is to
enable testing frameworks like JUnit, TestNG, Spock, etc. and
third-party assertion libraries like Hamcrest, AssertJ, etc. to use a
common set of exceptions that IDEs and build tools can support in a
consistent manner across all testing scenarios -- for example, for
consistent handling of failed assertions and failed assumptions as
well as visualization of test execution in IDEs and reports.
%package javadoc
Summary: Javadoc for %{name}
Group: Documentation/HTML
%description javadoc
API documentation for %{name}.
%prep
%setup -q -n opentest4j-r%{version}
find -name \*.jar -delete
cp %{SOURCE1} build.xml
%build
%ant \
%if %{without tests}
-Dtest.skip=true \
%endif
jar javadoc
%install
# jar
install -dm 0755 %{buildroot}%{_javadir}/%{name}
install -pm 0644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}/%{name}.jar
# pom
install -dm 0755 %{buildroot}%{_mavenpomdir}/%{name}
install -pm 0644 %{SOURCE100} %{buildroot}%{_mavenpomdir}/%{name}/%{name}.pom
%add_maven_depmap %{name}/%{name}.pom %{name}/%{name}.jar
# javadoc
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}
cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/
%fdupes -s %{buildroot}%{_javadocdir}
%files -f .mfiles
%license LICENSE
%doc README.md
%files javadoc
%license LICENSE
%{_javadocdir}/%{name}
%changelog