2019-11-13 06:09:37 +00:00
|
|
|
#
|
|
|
|
# spec file for package test-interface
|
|
|
|
#
|
2024-09-24 11:24:12 +00:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2019-11-13 06:09:37 +00:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%global test_interface_version 1.0
|
|
|
|
Name: test-interface
|
|
|
|
Version: %{test_interface_version}
|
|
|
|
Release: 0
|
|
|
|
Summary: Uniform interface to Scala and Java test frameworks
|
|
|
|
License: BSD-3-Clause
|
|
|
|
Group: Development/Libraries/Java
|
|
|
|
URL: https://github.com/sbt/test-interface
|
|
|
|
Source0: https://github.com/sbt/test-interface/archive/v%{test_interface_version}.tar.gz
|
2022-03-23 18:57:44 +00:00
|
|
|
Source1: https://repo1.maven.org/maven2/org/scala-sbt/%{name}/%{version}/%{name}-%{version}.pom
|
2019-11-13 06:09:37 +00:00
|
|
|
BuildRequires: fdupes
|
2022-03-23 18:57:44 +00:00
|
|
|
BuildRequires: java-devel >= 1.8
|
2024-09-24 11:26:23 +00:00
|
|
|
BuildRequires: javapackages-local >= 6
|
2019-11-13 06:09:37 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
|
|
|
Uniform test interface to Scala/Java test frameworks (specs,
|
|
|
|
ScalaCheck, ScalaTest, JUnit and other)
|
|
|
|
|
|
|
|
%package javadoc
|
|
|
|
Summary: Javadoc for %{name}
|
|
|
|
Group: Documentation/HTML
|
|
|
|
|
|
|
|
%description javadoc
|
|
|
|
Javadoc for %{name}.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
%{mvn_file} org.scala-sbt:test-interface %{name}
|
|
|
|
|
|
|
|
%build
|
|
|
|
mkdir -p classes target/api
|
2024-09-29 19:39:13 +00:00
|
|
|
javac -source 8 -target 8 -d classes $(find src/main/java -name "*.java")
|
2019-11-13 06:09:37 +00:00
|
|
|
|
|
|
|
(
|
|
|
|
cd classes
|
|
|
|
mkdir -p META-INF
|
|
|
|
cat > META-INF/MANIFEST.MF << 'EOF'
|
|
|
|
Manifest-Version: 1.0
|
|
|
|
Implementation-Vendor: org.scala-sbt
|
|
|
|
Implementation-Title: %{name}
|
|
|
|
Implementation-Version: %{version}
|
|
|
|
Implementation-Vendor-Id: org.scala-sbt
|
|
|
|
Specification-Vendor: org.scala-sbt
|
|
|
|
Specification-Title: %{name}
|
|
|
|
Specification-Version: %{version}
|
|
|
|
EOF
|
2024-09-29 19:39:13 +00:00
|
|
|
jar \
|
2024-09-24 11:24:12 +00:00
|
|
|
%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 17}%{!?pkg_vcmp:0}
|
|
|
|
--date="$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ)" \
|
|
|
|
%endif
|
|
|
|
--create --no-manifest --file=../target/%{name}.jar *
|
2019-11-13 06:09:37 +00:00
|
|
|
)
|
|
|
|
|
2024-09-29 19:39:13 +00:00
|
|
|
javadoc -notimestamp -source 8 -d target/api \
|
2024-09-24 11:24:12 +00:00
|
|
|
-classpath $PWD/target/%{name}.jar $(find src/main/java -name "*.java")
|
2019-11-13 06:09:37 +00:00
|
|
|
|
|
|
|
%install
|
2022-03-23 18:57:44 +00:00
|
|
|
# jar
|
|
|
|
install -dm 0755 %{buildroot}%{_javadir}/%{name}
|
|
|
|
install -pm 0644 target/%{name}.jar %{buildroot}%{_javadir}/%{name}/%{name}.jar
|
|
|
|
|
|
|
|
# pom
|
|
|
|
install -dm 0755 %{buildroot}%{_mavenpomdir}/%{name}
|
2024-09-24 11:26:23 +00:00
|
|
|
%{mvn_install_pom} %{SOURCE1} %{buildroot}%{_mavenpomdir}/%{name}/%{name}.pom
|
2022-03-23 18:57:44 +00:00
|
|
|
%add_maven_depmap %{name}/%{name}.pom %{name}/%{name}.jar
|
|
|
|
|
|
|
|
# javadoc
|
|
|
|
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}
|
|
|
|
cp -pr target/api/* %{buildroot}%{_javadocdir}/%{name}
|
2019-11-13 06:09:37 +00:00
|
|
|
%fdupes -s %{buildroot}%{_javadocdir}
|
|
|
|
|
|
|
|
%files -f .mfiles
|
|
|
|
%license LICENSE
|
|
|
|
%doc README
|
|
|
|
|
2022-03-23 18:57:44 +00:00
|
|
|
%files javadoc
|
|
|
|
%{_javadocdir}/%{name}
|
2019-11-13 06:09:37 +00:00
|
|
|
%license LICENSE
|
|
|
|
|
|
|
|
%changelog
|