Fridrich Strba 2023-08-30 21:35:28 +00:00 committed by Git OBS Bridge
parent 982ec89dfe
commit 911a1a4d8d
4 changed files with 56 additions and 45 deletions

3
_multibuild Normal file
View File

@ -0,0 +1,3 @@
<multibuild>
<flavor>bootstrap</flavor>
</multibuild>

View File

@ -1,23 +0,0 @@
Index: commons-lang3-3.12.0-src/pom.xml
===================================================================
--- commons-lang3-3.12.0-src.orig/pom.xml
+++ commons-lang3-3.12.0-src/pom.xml
@@ -513,18 +513,6 @@
</contributor>
</contributors>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.junit</groupId>
- <artifactId>junit-bom</artifactId>
- <version>5.7.1</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
<!-- Lang should depend on very little -->
<dependencies>
<!-- testing -->

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Wed Aug 30 20:57:36 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Split into bootstrap and full package using the _multibuild
* this should allow to build the new bcel without cycles
- Removed patch:
* apache-commons-lang3-junit-bom.patch
+ not needed since we install the pom file using the new
%%mvn_install_pom macro which sanitizes the pom file to the
bare runtime dependencies.
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Dec 29 15:18:48 UTC 2021 - Pedro Monreal <pmonreal@suse.com> Wed Dec 29 15:18:48 UTC 2021 - Pedro Monreal <pmonreal@suse.com>

View File

@ -1,7 +1,7 @@
# #
# spec file # spec file
# #
# Copyright (c) 2021 SUSE LLC # Copyright (c) 2023 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -18,7 +18,13 @@
%define base_name lang3 %define base_name lang3
%define short_name commons-%{base_name} %define short_name commons-%{base_name}
Name: apache-%{short_name} %define full_name apache-%{short_name}
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "bootstrap"
%bcond_without bootstrap
%else
%bcond_with bootstrap
%endif
Version: 3.12.0 Version: 3.12.0
Release: 0 Release: 0
Summary: Apache Commons Lang Package Summary: Apache Commons Lang Package
@ -28,13 +34,20 @@ URL: https://commons.apache.org/proper/commons-lang/
Source0: https://dlcdn.apache.org/commons/lang/source/%{short_name}-%{version}-src.tar.gz Source0: https://dlcdn.apache.org/commons/lang/source/%{short_name}-%{version}-src.tar.gz
Source1: build.xml Source1: build.xml
Source2: default.properties Source2: default.properties
Patch0: apache-commons-lang3-junit-bom.patch BuildRequires: java-devel >= 1.8
BuildArch: noarch
%if %{with bootstrap}
Name: %{full_name}-bootstrap
Conflicts: %{full_name}
%else
Name: %{full_name}
BuildRequires: ant BuildRequires: ant
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: java-devel >= 1.8 BuildRequires: javapackages-local >= 6
BuildRequires: javapackages-local Conflicts: %{full_name}-bootstrap
Provides: %{short_name} = %{version}-%{release} Provides: %{short_name} = %{version}-%{release}
BuildArch: noarch Obsoletes: %{full_name}-bootstrap
%endif
%description %description
The standard Java libraries fail to provide enough methods for The standard Java libraries fail to provide enough methods for
@ -58,43 +71,42 @@ Javadoc for %{name}.
%prep %prep
%setup -q -n %{short_name}-%{version}-src %setup -q -n %{short_name}-%{version}-src
%patch0 -p1
cp %{SOURCE1} . cp %{SOURCE1} .
cp %{SOURCE2} . cp %{SOURCE2} .
sed -i 's/\r//' *.txt sed -i 's/\r//' *.txt
# Not needed since we don't build with maven
%pom_remove_parent
%pom_xpath_inject "pom:project" "<groupId>org.apache.commons</groupId>"
%pom_xpath_remove pom:project/pom:reporting
%pom_xpath_remove pom:project/pom:build
%pom_xpath_remove pom:project/pom:profiles
%pom_remove_dep :::test
%build %build
%if %{without bootstrap}
export OPT_JAR_LIST=`cat %{_sysconfdir}/ant.d/junit` export OPT_JAR_LIST=`cat %{_sysconfdir}/ant.d/junit`
export CLASSPATH= export CLASSPATH=
ant \ ant \
-Dcompile.source=1.8 -Dcompile.target=1.8 \ -Dcompile.source=1.8 -Dcompile.target=1.8 \
-Dfinal.name=%{short_name} \ -Dfinal.name=%{short_name} \
jar javadoc jar javadoc
%else
mkdir -p target/classes
javac -source 8 -target 8 -encoding utf-8 -d target/classes $(find src/main/java -name \*.java | xargs)
jar -cf target/%{short_name}.jar -C target/classes .
%endif
%install %install
# jars # jars
install -dm 755 %{buildroot}%{_javadir} install -dm 755 %{buildroot}%{_javadir}
install -m 0644 target/%{short_name}.jar %{buildroot}%{_javadir}/%{name}.jar install -m 0644 target/%{short_name}.jar %{buildroot}%{_javadir}/%{full_name}.jar
ln -sf %{name}.jar %{buildroot}%{_javadir}/%{short_name}.jar ln -sf %{full_name}.jar %{buildroot}%{_javadir}/%{short_name}.jar
%if %{without bootstrap}
# pom # pom
install -dm 755 %{buildroot}%{_mavenpomdir} install -dm 755 %{buildroot}%{_mavenpomdir}
install -m 0644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}.pom %mvn_install_pom pom.xml %{buildroot}%{_mavenpomdir}/%{full_name}.pom
%add_maven_depmap %{name}.pom %{name}.jar %add_maven_depmap %{full_name}.pom %{full_name}.jar
# javadoc # javadoc
install -dm 755 %{buildroot}%{_javadocdir}/%{name} install -dm 755 %{buildroot}%{_javadocdir}/%{name}
cp -pr target/apidocs/* %{buildroot}%{_javadocdir}/%{name}/ cp -pr target/apidocs/* %{buildroot}%{_javadocdir}/%{full_name}/
%fdupes -s %{buildroot}%{_javadocdir}/%{name}/ %fdupes -s %{buildroot}%{_javadocdir}/%{full_name}/
%files -f .mfiles %files -f .mfiles
%license LICENSE.txt NOTICE.txt %license LICENSE.txt NOTICE.txt
@ -102,6 +114,14 @@ cp -pr target/apidocs/* %{buildroot}%{_javadocdir}/%{name}/
%{_javadir}/%{short_name}.jar %{_javadir}/%{short_name}.jar
%files javadoc %files javadoc
%{_javadocdir}/%{name} %{_javadocdir}/%{full_name}
%else
%files
%license LICENSE.txt NOTICE.txt
%{_javadir}/*.jar
%endif
%changelog %changelog