Add missing dependencies on junit and hamcrest OBS-URL: https://build.opensuse.org/request/show/1264746 OBS-URL: https://build.opensuse.org/package/show/Java:packages/testfx?expand=0&rev=3
134 lines
4.4 KiB
RPMSpec
134 lines
4.4 KiB
RPMSpec
#
|
|
# spec file for package testfx
|
|
#
|
|
# Copyright (c) 2025 SUSE LLC
|
|
#
|
|
# 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/
|
|
#
|
|
|
|
|
|
Name: testfx
|
|
Version: 4.0.17
|
|
Release: 0
|
|
Summary: Simple and clean testing for JavaFX
|
|
License: EUPL-1.1
|
|
Group: Development/Libraries/Java
|
|
URL: https://github.com/TestFX/TestFX
|
|
Source0: %{url}/archive/refs/tags/v%{version}.tar.gz
|
|
Source1: https://repo1.maven.org/maven2/org/%{name}/%{name}-core/%{version}/%{name}-core-%{version}.pom
|
|
Source2: https://repo1.maven.org/maven2/org/%{name}/%{name}-junit/%{version}/%{name}-junit-%{version}.pom
|
|
Source3: https://repo1.maven.org/maven2/org/%{name}/%{name}-junit5/%{version}/%{name}-junit5-%{version}.pom
|
|
BuildRequires: fdupes
|
|
BuildRequires: maven-local
|
|
BuildRequires: mvn(junit:junit)
|
|
BuildRequires: mvn(org.apiguardian:apiguardian-api)
|
|
BuildRequires: mvn(org.assertj:assertj-core)
|
|
BuildRequires: mvn(org.hamcrest:hamcrest)
|
|
BuildRequires: mvn(org.junit.jupiter:junit-jupiter-api)
|
|
BuildRequires: mvn(org.openjfx:javafx.controls)
|
|
BuildRequires: mvn(org.openjfx:javafx.graphics)
|
|
BuildRequires: mvn(org.openjfx:javafx.swing)
|
|
BuildRequires: mvn(org.osgi:osgi.core)
|
|
BuildArch: noarch
|
|
|
|
%description
|
|
Simple and clean testing for JavaFX.
|
|
|
|
%package javadoc
|
|
Summary: API documentation for %{name}
|
|
Group: Documentation/HTML
|
|
|
|
%description javadoc
|
|
API documentation for %{name}.
|
|
|
|
%prep
|
|
%setup -q -n TestFX-%{version}
|
|
|
|
cp %{SOURCE1} subprojects/%{name}-core/pom.xml
|
|
cp %{SOURCE2} subprojects/%{name}-junit/pom.xml
|
|
cp %{SOURCE3} subprojects/%{name}-junit5/pom.xml
|
|
|
|
cat >pom.xml <<__POM__
|
|
<project
|
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
|
|
xmlns="http://maven.apache.org/POM/4.0.0"
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
>
|
|
<modelVersion>4.0.0</modelVersion>
|
|
<groupId>org.%{name}</groupId>
|
|
<artifactId>%{name}-parent</artifactId>
|
|
<version>%{version}</version>
|
|
<packaging>pom</packaging>
|
|
<modules>
|
|
<module>subprojects/%{name}-core</module>
|
|
<module>subprojects/%{name}-junit</module>
|
|
<module>subprojects/%{name}-junit5</module>
|
|
</modules>
|
|
</project>
|
|
__POM__
|
|
|
|
%pom_xpath_remove -r 'pom:scope[text()="runtime"]'
|
|
|
|
%pom_add_dep org.openjfx:javafx.graphics subprojects/%{name}-core
|
|
%pom_add_dep org.openjfx:javafx.controls subprojects/%{name}-core
|
|
%pom_add_dep org.openjfx:javafx.swing subprojects/%{name}-core
|
|
%pom_add_dep org.junit.jupiter:junit-jupiter-api subprojects/%{name}-junit5
|
|
%pom_add_dep org.apiguardian:apiguardian-api subprojects/%{name}-junit5
|
|
%pom_change_dep org.osgi:org.osgi.core org.osgi:osgi.core subprojects/%{name}-core
|
|
|
|
%pom_add_plugin org.apache.maven.plugins:maven-jar-plugin subprojects/%{name}-core \
|
|
'<configuration>
|
|
<archive>
|
|
<manifestEntries>
|
|
<Automatic-Module-Name>org.testfx</Automatic-Module-Name>
|
|
</manifestEntries>
|
|
</archive>
|
|
</configuration>'
|
|
|
|
%pom_add_plugin org.apache.maven.plugins:maven-jar-plugin subprojects/%{name}-junit \
|
|
'<configuration>
|
|
<archive>
|
|
<manifestEntries>
|
|
<Automatic-Module-Name>org.testfx.junit</Automatic-Module-Name>
|
|
</manifestEntries>
|
|
</archive>
|
|
</configuration>'
|
|
|
|
%pom_add_plugin org.apache.maven.plugins:maven-jar-plugin subprojects/%{name}-junit5 \
|
|
'<configuration>
|
|
<archive>
|
|
<manifestEntries>
|
|
<Automatic-Module-Name>org.testfx.junit5</Automatic-Module-Name>
|
|
</manifestEntries>
|
|
</archive>
|
|
</configuration>'
|
|
|
|
%build
|
|
%{mvn_build} -f -- \
|
|
-Dproject.build.outputTimestamp=$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ) \
|
|
-Dsource=8
|
|
|
|
%install
|
|
%{mvn_package} :%{name}-parent __noinstall
|
|
|
|
%mvn_install
|
|
%fdupes %{buildroot}%{_javadocdir}/%{name}
|
|
|
|
%files -f .mfiles
|
|
%license LICENSE.txt
|
|
%doc {CHANGES,README}.md
|
|
|
|
%files javadoc -f .mfiles-javadoc
|
|
%license LICENSE.txt
|
|
|
|
%changelog
|