Accepting request 1205272 from Java:packages

Spec file cleanup

OBS-URL: https://build.opensuse.org/request/show/1205272
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/opentest4j?expand=0&rev=6
This commit is contained in:
Ana Guerrero 2024-10-02 19:36:02 +00:00 committed by Git OBS Bridge
commit e5fd029324
2 changed files with 8 additions and 34 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Oct 2 15:55:50 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Spec file cleanup
-------------------------------------------------------------------
Tue Oct 17 03:49:22 UTC 2023 - ming li <mli@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package opentest4j
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -30,7 +30,7 @@ Source100: https://repo1.maven.org/maven2/org/opentest4j/opentest4j/%{versi
BuildRequires: ant
BuildRequires: fdupes
BuildRequires: java-devel >= 1.8
BuildRequires: javapackages-local
BuildRequires: javapackages-local >= 6
BuildArch: noarch
%if %{with tests}
BuildRequires: ant-junit
@ -60,37 +60,6 @@ find -name \*.jar -delete
cp %{SOURCE1} build.xml
cp %{SOURCE100} pom.xml
%pom_add_dep junit:junit::test
%pom_xpath_inject pom:project "
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestEntries>
<Automatic-Module-Name>org.opentest4j</Automatic-Module-Name>
<Implementation-Title>opentest4j</Implementation-Title>
<Implementation-Vendor>opentest4j.org</Implementation-Vendor>
<Implementation-Version>%{version}</Implementation-Version>
<Specification-Title>opentest4j</Specification-Title>
<Specification-Vendor>opentest4j.org</Specification-Vendor>
<Specification-Version>%{version}</Specification-Version>
<!-- OSGi metadata required by Eclipse -->
<Bundle-ManifestVersion>2</Bundle-ManifestVersion>
<Bundle-SymbolicName>org.opentest4j</Bundle-SymbolicName>
<Bundle-Version>%{version}</Bundle-Version>
<Export-Package>org.opentest4j;version=\"%{version}\"</Export-Package>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>"
%build
%{ant} \
%if %{without tests}
@ -104,7 +73,7 @@ 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
%{mvn_install_pom} %{SOURCE100} %{buildroot}%{_mavenpomdir}/%{name}/%{name}.pom
%add_maven_depmap %{name}/%{name}.pom %{name}/%{name}.jar
# javadoc
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}