From 01e253444cea372734caaae65d291f874b80386095fa8701a0f7c461727903d9 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Thu, 10 Mar 2022 14:04:27 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/Java:packages/apache-commons-text?expand=0&rev=8 --- apache-commons-text-build.xml | 149 ++++++++++++++++++++++++++++++++++ apache-commons-text.changes | 7 ++ apache-commons-text.spec | 36 ++++++-- 3 files changed, 183 insertions(+), 9 deletions(-) create mode 100644 apache-commons-text-build.xml diff --git a/apache-commons-text-build.xml b/apache-commons-text-build.xml new file mode 100644 index 0000000..ddb86bc --- /dev/null +++ b/apache-commons-text-build.xml @@ -0,0 +1,149 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apache-commons-text.changes b/apache-commons-text.changes index 9a4b42c..e1c30d8 100644 --- a/apache-commons-text.changes +++ b/apache-commons-text.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Mar 10 14:03:25 UTC 2022 - Fridrich Strba + +- Rewrite build system to build with ant in order to avoid build + cycles. + * This package is now the dependency of maven-javadoc-plugin + ------------------------------------------------------------------- Sat Nov 9 18:36:06 UTC 2019 - Fridrich Strba diff --git a/apache-commons-text.spec b/apache-commons-text.spec index 87d79ec..5214ec4 100644 --- a/apache-commons-text.spec +++ b/apache-commons-text.spec @@ -1,7 +1,7 @@ # -# spec file for package apache-commons-text +# spec file # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,12 +26,12 @@ License: Apache-2.0 Group: Development/Libraries/Java URL: https://commons.apache.org/proper/commons-text/ Source0: http://archive.apache.org/dist/commons/text/source/commons-text-%{version}-src.tar.gz +Source1: %{name}-build.xml +BuildRequires: ant +BuildRequires: apache-commons-lang3 BuildRequires: fdupes BuildRequires: java-devel >= 1.8 -BuildRequires: maven-local -BuildRequires: mvn(org.apache.commons:commons-lang3) -BuildRequires: mvn(org.apache.commons:commons-parent:pom:) -BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin) +BuildRequires: javapackages-local BuildArch: noarch %description @@ -46,18 +46,36 @@ This package contains the API documentation for %{name}. %prep %setup -q -n commons-text-%{version}-src +cp %{SOURCE1} build.xml + +%pom_remove_parent +%pom_xpath_inject pom:project "org.apache.commons" %build -%{mvn_build} -f -- -Dsource=8 +mkdir -p lib +build-jar-repository -s lib apache-commons-lang3 +%{ant} package javadoc %install -%mvn_install +# jars +install -dm 755 %{buildroot}%{_javadir}/%{name} +install -m 0644 target/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{name}/%{short_name}.jar + +# pom +install -dm 755 %{buildroot}%{_mavenpomdir}/%{name} +install -m 0644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}/%{short_name}.pom +%add_maven_depmap %{name}/%{short_name}.pom %{name}/%{short_name}.jar + +# javadoc +install -dm 755 %{buildroot}/%{_javadocdir}/%{name} +cp -r target/site/apidocs/* %{buildroot}/%{_javadocdir}/%{name} %fdupes -s %{buildroot}%{_javadocdir} %files -f .mfiles %license LICENSE.txt NOTICE.txt -%files javadoc -f .mfiles-javadoc +%files javadoc +%{_javadocdir}/%{name} %license LICENSE.txt NOTICE.txt %changelog